Class BuildExecutionBuilder


  • public final class BuildExecutionBuilder
    extends Object
    A builder for a deployer execution.
    Author:
    David M. Lloyd
    • Constructor Detail

      • BuildExecutionBuilder

        BuildExecutionBuilder​(BuildChain buildChain,
                              String buildTargetName)
    • Method Detail

      • getBuildTargetName

        public String getBuildTargetName()
        Get the name of this build target. The resultant string is useful for diagnostic messages and does not have any other significance.
        Returns:
        the name of this build target (not null)
      • produce

        public <T extends BuildItemBuildExecutionBuilder produce​(T item)
        Provide an initial item.
        Parameters:
        item - the item value
        Returns:
        this builder
        Throws:
        IllegalArgumentException - if this deployer chain was not declared to initially produce type, or if the item does not allow multiplicity but this method is called more than one time
      • produce

        public <T extends BuildItemBuildExecutionBuilder produce​(Class<T> type,
                                                                   T item)
        Provide an initial item.
        Parameters:
        type - the item type (must not be null)
        item - the item value
        Returns:
        this builder
        Throws:
        IllegalArgumentException - if this deployer chain was not declared to initially produce type, or if type is null, or if the item does not allow multiplicity but this method is called more than one time
      • execute

        public BuildResult execute()
                            throws BuildException
        Run the build. The chain may run in one or many threads.
        Returns:
        the build result (not null)
        Throws:
        BuildException - if build failed