Interface BuildMap

  • All Superinterfaces:
    ManagedObject, MetadataObject, com.ibm.dbb.metadata.common.MetadataStoreConstants

    public interface BuildMap
    extends ManagedObject
    The build map is a metadata object that can be used to store several types of build metadata produced/collected while building a single program:
    • Basic - Singleton properties identifying the build map program, group, build result and description
    • Sources - List of source repositories used during the build including branch and snapshot information
    • Inputs - List of resolved and unresolved inputs from dependency search including SCM information
    • Binary Inputs - List of resolved and unresolved statically linked compile units from the load module scanner
    • Outputs - List of outputs gathered from DBB execute DDStatements. Member and dataset fields are required for bridging impact analysis gap.

    Build maps are contained within a BuildGroup. To create and delete build maps use the BuildGroup helper methods to do so.

    • Field Summary

      • Fields inherited from interface com.ibm.dbb.metadata.common.MetadataStoreConstants

        AMPERSAND, AND, APPLICATION_JSON, ARTIFACT, ASC, ATTACHMENT, ATTACHMENTS, BASIC_AUTHENTICATION, BRANCH, BUILD, BUILD_REPORT, BUILD_REPORT_DATA, BUILD_RESULT, CATEGORY, CICS, COLLECTION, COMMA, CONTENT, CONTENT_TYPE, CREATED, CREATED_BY, DATASET, DATE, DEFAULT_GROUP, DEFAULT_SSL_PROTOCOLS, DEPLOY_TYPE, DESC, DLI, EQUALS, FILE, FORM_AUTHENTICATION, GROUP, GROUPS, ID, IMPACT_FILES, LABEL, LABELS, LANGUAGE, LAST_UPDATED, LAST_UPDATED_BY, LD_PREFIX, LIBRARY, LNAME, LOG, LOGICAL_DEPENDENCIES, LOGICAL_FILE, MEMBER, MINIMAL, MQ, NAME, ORDER, ORDER_BY, OWNER, PATH, PERMISSION, PROPERTIES, PROPERTY, QUESTION_MARK, QUOTE, REST, SELF, SIZE, SLASH, SOURCE, SPACE, SQL, STATE, STATUS, TEAM, TEXT_HTML, TYPE, VALUE, VERSION
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addBinaryInput​(java.lang.String member, java.lang.String dataset)
      Add a binary input to the build map
      void addBinaryInput​(java.lang.String member, java.lang.String dataset, java.lang.String path, java.lang.String sourceRef, java.lang.String version)
      Add a binary input to the build map
      void addInput​(java.lang.String lName, java.lang.String category)
      Add an input to the build map
      void addInput​(java.lang.String lName, java.lang.String category, java.lang.String path)
      Add an input to the build map
      void addInput​(java.lang.String lName, java.lang.String category, java.lang.String path, java.lang.String sourceRef, java.lang.String version)
      Add an input to the build map
      void addOutput​(java.lang.String member, java.lang.String dataset, java.lang.String deployType)
      Adds an output to the build map
      void addOutput​(java.lang.String path, java.lang.String deployType, java.lang.String fingerprint, java.lang.String version)
      Adds an output to the build map
      void addOutput​(java.lang.String member, java.lang.String dataset, java.lang.String deployType, java.lang.String fingerprint, java.lang.String version)
      Adds an output to the build map
      void addSource​(java.lang.String ref, java.lang.String type, java.lang.String url, java.lang.String branch, java.lang.String location, java.lang.String snapshot)
      Adds a source to the build map
      java.util.List<BuildMap.BinaryInput> getBinaryInputs()  
      java.lang.String getBuildFile()  
      java.lang.String getDescription()  
      java.lang.String getGroup()  
      java.util.List<BuildMap.Input> getInputs()  
      java.util.List<BuildMap.Output> getOutputs()  
      java.lang.String getResult()  
      BuildMap.Source getSource​(java.lang.String sourceRef)  
      java.util.List<BuildMap.Source> getSources()  
      void populateBinaryInputs​(java.lang.String loadDataset, java.lang.String loadMember)
      Populates the binary inputs list using the load module scanner without SCM metadata
      void populateBinaryInputsFromGit​(java.lang.String loadDataset, java.lang.String loadMember)
      Populates the binary inputs list using the load module scanner including SCM metadata from git.
      void populateGitSources​(java.util.List<java.io.File> directories)
      Populates the sources list by providing a list of local Git clone directories to introspect
      void populateInputs​(java.lang.String sourceDir, java.lang.String searchPath)
      Populates the inputs list using dependency resolution without SCM metadata.
      void populateInputsFromGit​(java.lang.String sourceDir, java.lang.String searchPath)
      Populates the inputs list using dependency resolution including SCM metadata from git.
      void populateOutputs​(java.util.List<IExecute> execs)
      Populates the output list with outputs derived from DBB executable command DD Statements
      void setBuildFile​(java.lang.String buildFile)  
      void setDescription​(java.lang.String description)  
      void setResult​(java.lang.String result)  
    • Method Detail

      • addSource

        void addSource​(java.lang.String ref,
                       java.lang.String type,
                       java.lang.String url,
                       java.lang.String branch,
                       java.lang.String location,
                       java.lang.String snapshot)
                throws BuildException
        Adds a source to the build map
        Parameters:
        ref - the reference for this source, used when linking inputs and binary inputs to this source
        type - the type of source
        url - the url of this source
        branch - the branch of this source
        location - the location of this source
        snapshot - the current snapshot of this source
        Throws:
        BuildException - if there is an issue adding the source
      • populateGitSources

        void populateGitSources​(java.util.List<java.io.File> directories)
                         throws BuildException
        Populates the sources list by providing a list of local Git clone directories to introspect
        Parameters:
        directories - list of git repository paths to populate sources for using Git scm metadata discovery
        Throws:
        BuildException - if there is an issue populating the sources or calculating scm metadata from git
      • addInput

        void addInput​(java.lang.String lName,
                      java.lang.String category)
               throws BuildException
        Add an input to the build map
        Parameters:
        lName - the logical name
        category - the category of the input. The "SELF" input category denotes the source file this build map represents.
        Throws:
        BuildException - if there is an issue adding the input
      • addInput

        void addInput​(java.lang.String lName,
                      java.lang.String category,
                      java.lang.String path)
               throws BuildException
        Add an input to the build map
        Parameters:
        lName - the logical name
        category - the category of the input. The "SELF" input category denotes the source file this build map represents.
        path - the path to the source file represented by the input
        Throws:
        BuildException - if there is an issue adding the input
      • addInput

        void addInput​(java.lang.String lName,
                      java.lang.String category,
                      java.lang.String path,
                      java.lang.String sourceRef,
                      java.lang.String version)
               throws BuildException
        Add an input to the build map
        Parameters:
        lName - the logical name
        category - the category of the input. The "SELF" input category denotes the source file this build map represents.
        path - the path to the source file represented by the input
        sourceRef - the source reference. A source with this reference must have already been added to this build map
        version - the version, typically a git commit hash
        Throws:
        BuildException - if there is an issue adding the input, or if no source exists within the build map for the provided sourceRef
      • populateInputs

        void populateInputs​(java.lang.String sourceDir,
                            java.lang.String searchPath)
                     throws BuildException
        Populates the inputs list using dependency resolution without SCM metadata.
        Parameters:
        sourceDir - the source directory containing the build file and its dependencies
        searchPath - the search path used in dependency resolution. Passing a null argument will skip DBB dependency resolution and only populate an input for SELF. The "SELF" input category denotes the source file this build map represents.
        Throws:
        BuildException - if there is an issue populating the inputs or an error occurrs during dependency resolution
      • populateInputsFromGit

        void populateInputsFromGit​(java.lang.String sourceDir,
                                   java.lang.String searchPath)
                            throws BuildException
        Populates the inputs list using dependency resolution including SCM metadata from git. This method will also populate the sources list with referenced input sources.
        Parameters:
        sourceDir - the source directory containing the build file and its dependencies
        searchPath - the search path used in dependency resolution. Passing a null argument will skip DBB dependency resolution and only populate an input for SELF. The "SELF" input category denotes the source file this build map represents.
        Throws:
        BuildException - if there is an issue populating the inputs, an error occurrs during dependency resolution, or if there is an issue calculating metadata from git
      • addBinaryInput

        void addBinaryInput​(java.lang.String member,
                            java.lang.String dataset)
                     throws BuildException
        Add a binary input to the build map
        Parameters:
        member - the member within the dataset
        dataset - the dataset containing the binary input member
        Throws:
        BuildException - if there is an issue adding the binary input
      • addBinaryInput

        void addBinaryInput​(java.lang.String member,
                            java.lang.String dataset,
                            java.lang.String path,
                            java.lang.String sourceRef,
                            java.lang.String version)
                     throws BuildException
        Add a binary input to the build map
        Parameters:
        member - the member within the dataset
        dataset - the dataset containing the binary input member
        path - the path
        sourceRef - the source reference. A source with this reference must have already been added to this build map
        version - the version, typically a git hash
        Throws:
        BuildException - if there is an issue adding the binary input or if no source exists within the build map for the provided sourceRef
      • populateBinaryInputs

        void populateBinaryInputs​(java.lang.String loadDataset,
                                  java.lang.String loadMember)
                           throws BuildException
        Populates the binary inputs list using the load module scanner without SCM metadata
        Parameters:
        loadDataset - the name of PDS containing the load module
        loadMember - the name of the load PDS member to scan
        Throws:
        BuildException - if there is an issue populating the binary inputs
      • populateBinaryInputsFromGit

        void populateBinaryInputsFromGit​(java.lang.String loadDataset,
                                         java.lang.String loadMember)
                                  throws BuildException
        Populates the binary inputs list using the load module scanner including SCM metadata from git. This method will also populate the sources list with referenced input sources.
        Parameters:
        loadDataset - the name of PDS containing the load module
        loadMember - the name of the load PDS member to scan
        Throws:
        BuildException - if there is an issue populating the binary inputs or calculating git metadata
      • addOutput

        void addOutput​(java.lang.String member,
                       java.lang.String dataset,
                       java.lang.String deployType)
                throws BuildException
        Adds an output to the build map
        Parameters:
        member - the member or logical name
        dataset - the dataset containing the output member
        deployType - the deploy type of the output
        Throws:
        BuildException - if there is an issue adding the output
      • addOutput

        void addOutput​(java.lang.String member,
                       java.lang.String dataset,
                       java.lang.String deployType,
                       java.lang.String fingerprint,
                       java.lang.String version)
                throws BuildException
        Adds an output to the build map
        Parameters:
        member - the member or logical name
        dataset - the dataset containing the output member
        deployType - the deploy type of the output
        fingerprint -
        version - the version of the output
        Throws:
        BuildException - if there is an issue adding the output
      • addOutput

        void addOutput​(java.lang.String path,
                       java.lang.String deployType,
                       java.lang.String fingerprint,
                       java.lang.String version)
                throws BuildException
        Adds an output to the build map
        Parameters:
        path - the path to the output
        deployType - the type of the output
        fingerprint -
        version - the version of the output
        Throws:
        BuildException - if there is an issue adding the output
      • populateOutputs

        void populateOutputs​(java.util.List<IExecute> execs)
                      throws BuildException
        Populates the output list with outputs derived from DBB executable command DD Statements
        Parameters:
        execs - list of IExecute objects of which to derive outputs from
        Throws:
        BuildException - if there is an issue populating the outputs