Class BuildServiceHelper


  • @ApplicationScoped
    public class BuildServiceHelper
    extends Object
    Helper class for performing module build tasks. This class is mainly used by the BuildServiceImpl and hides the interactions with the underlying build system.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.guvnor.common.services.project.builder.model.BuildResults localBuild​(org.guvnor.common.services.project.model.Module module)
      Performs the full build of a module.
      void localBuild​(org.guvnor.common.services.project.model.Module module, Consumer<LocalBinaryConfig> consumer)
      Performs the full build of a module.
      org.guvnor.common.services.project.builder.model.IncrementalBuildResults localBuild​(org.guvnor.common.services.project.model.Module module, Map<org.uberfire.backend.vfs.Path,​Collection<org.uberfire.workbench.events.ResourceChange>> resourceChanges)
      Performs the incremental build of a module when a set of resources has been changed.
      org.guvnor.common.services.project.builder.model.IncrementalBuildResults localBuild​(org.guvnor.common.services.project.model.Module module, LocalBuildConfig.BuildType buildType, org.uberfire.backend.vfs.Path resource)
      Performs the incremental build of a module.
      org.guvnor.common.services.project.builder.model.BuildResults localBuildAndDeploy​(org.guvnor.common.services.project.model.Module module, org.guvnor.common.services.project.service.DeploymentMode mode, boolean suppressHandlers)
      Performs the full build of a module and deploys the generated maven artifact in current server m2Repository.
    • Constructor Detail

      • BuildServiceHelper

        public BuildServiceHelper()
    • Method Detail

      • localBuild

        public org.guvnor.common.services.project.builder.model.BuildResults localBuild​(org.guvnor.common.services.project.model.Module module)
        Performs the full build of a module.
        Parameters:
        module - the module to build.
        Returns:
        the BuildResults for the module full build operation. Interested parties may check the results for knowing if the build produced errors.
      • localBuild

        public void localBuild​(org.guvnor.common.services.project.model.Module module,
                               Consumer<LocalBinaryConfig> consumer)
        Performs the full build of a module.
        Parameters:
        module - the module to build.
        consumer - a consumer for consuming the BuildResults for the module full build operation. Interested parties may check the results for knowing if the build produced errors.
      • localBuild

        public org.guvnor.common.services.project.builder.model.IncrementalBuildResults localBuild​(org.guvnor.common.services.project.model.Module module,
                                                                                                   LocalBuildConfig.BuildType buildType,
                                                                                                   org.uberfire.backend.vfs.Path resource)
        Performs the incremental build of a module.
        Parameters:
        module - the module to build incrementally.
        buildType - the incremental build type to perform.
        resource - the Path to the resource for which the incremental build will be produced.
        Returns:
        the IncrementalBuildResults for the incremental build operation. Interested parties may check the results for knowing if the incremental build produced errors.
      • localBuild

        public org.guvnor.common.services.project.builder.model.IncrementalBuildResults localBuild​(org.guvnor.common.services.project.model.Module module,
                                                                                                   Map<org.uberfire.backend.vfs.Path,​Collection<org.uberfire.workbench.events.ResourceChange>> resourceChanges)
        Performs the incremental build of a module when a set of resources has been changed. This method is typically used when batch operations were performed and a set of resources has changed as part of the same operation.
        Parameters:
        module - the module to build incrementally.
        resourceChanges - a Map which holds the collection of changes produced by resource.
        Returns:
        the IncrementalBuildResults for the incremental build operation. Interested parties may check the results for knowing if the incremental build produced errors.
      • localBuildAndDeploy

        public org.guvnor.common.services.project.builder.model.BuildResults localBuildAndDeploy​(org.guvnor.common.services.project.model.Module module,
                                                                                                 org.guvnor.common.services.project.service.DeploymentMode mode,
                                                                                                 boolean suppressHandlers)
        Performs the full build of a module and deploys the generated maven artifact in current server m2Repository.
        Parameters:
        module - the module to build incrementally.
        mode - the DeploymentMode do use.
        suppressHandlers - true of PostBuildHandlers invocation should be suppressed, false in any other case.
        Returns:
        the BuildResults for the module build and deploy operation. Interested parties may check the results for knowing if errors has occurred.
        See Also:
        DeploymentMode, PostBuildHandler