com.ibm.dbb.metadata

Interface BuildGroup



  • public interface BuildGroup
    A build group is a DBB metadata container object. Build groups can contain collections, build results, and build maps. These metadata objects should be created and accessed within a build group using the helper methods within this class.
    • Method Detail

      • createBuildResult

        BuildResult createBuildResult(java.lang.String label)
                               throws BuildException
        Create a build result
        Parameters:
        label - the label. Must be unique within this build group
        Returns:
        A new BuildResult object
        Throws:
        BuildException
      • createBuildResult

        BuildResult createBuildResult(java.lang.String label,
                                      java.lang.String owner,
                                      java.lang.String team,
                                      int permission)
                               throws BuildException
        Create a build result
        Parameters:
        label - the label of the build result. Must be unique within this build group
        owner -
        team -
        permission -
        Returns:
        Throws:
        BuildException
      • buildResultExists

        boolean buildResultExists(java.lang.String label)
                           throws BuildException
        Check whether a build result exists
        Parameters:
        label - the label of the build result
        Returns:
        Throws:
        BuildException
      • getBuildResult

        BuildResult getBuildResult(java.lang.String label)
                            throws BuildException
        Get a build result by the provided label
        Parameters:
        label - the label of the build result
        Returns:
        the BuildResult
        Throws:
        BuildException
      • getBuildResultLabels

        java.util.List<java.lang.String> getBuildResultLabels()
                                                       throws BuildException
        Get all build result labels within this BuildGroup
        Returns:
        a list of build result labels as Strings
        Throws:
        BuildException
      • getBuildResults

        java.util.List<BuildResult> getBuildResults(int state,
                                                    int status)
                                             throws BuildException
        Get all build results which have the specifed state and status
        Parameters:
        state -
        status -
        Returns:
        list of build results
        Throws:
        BuildException
      • getLastBuildResult

        BuildResult getLastBuildResult(int state,
                                       int status)
                                throws BuildException
        Get the most recent build result which have the specifed state and status
        Parameters:
        state -
        status -
        Returns:
        a BuildResult with the provided state and status
        Throws:
        BuildException
      • deleteBuildResult

        void deleteBuildResult(java.lang.String label)
                        throws BuildException
        Delete a build result from this build group
        Parameters:
        label - the label of the result to delete
        Throws:
        BuildException
      • deleteBuildResult

        void deleteBuildResult(BuildResult buildResult)
                        throws BuildException
        Delete a build result from this build group
        Parameters:
        buildResult - the BuildResult to be deleted
        Throws:
        BuildException
      • createCollection

        Collection createCollection(java.lang.String name)
                             throws BuildException
        Create a collection with the specified name
        Parameters:
        name - desired name for the collection. Must be unique within this build group
        Returns:
        a new Collection object
        Throws:
        BuildException
      • createCollection

        Collection createCollection(java.lang.String name,
                                    java.lang.String owner,
                                    java.lang.String team,
                                    int permission)
                             throws BuildException
        Create a collection with the specified attributes
        Parameters:
        name - desired name for the collection. Must be unique within this build group
        owner - the owner of the collection
        team -
        permission -
        Returns:
        A new Collection object
        Throws:
        BuildException
      • collectionExists

        boolean collectionExists(java.lang.String name)
                          throws BuildException
        Check whether a collection exists within this build group
        Throws:
        BuildException
      • getCollection

        Collection getCollection(java.lang.String name)
                          throws BuildException
        Get a collection by name
        Parameters:
        name - the name of the collection to get
        Returns:
        the collection, if it exists. Null otherwise
        Throws:
        BuildException
      • copyCollection

        Collection copyCollection(java.lang.String name,
                                  java.lang.String newName)
                           throws BuildException
        Copy a collection within this build group
        Parameters:
        name - the name of the collection to copy
        newName - the desired name of the new collection. Must be unique
        Returns:
        a new Collection
        Throws:
        BuildException
      • copyCollection

        Collection copyCollection(Collection collection,
                                  java.lang.String newName)
                           throws BuildException
        Copy a collection to this build group
        Parameters:
        collection - the Collection to be copied
        newName - the desired name of the new collection. Must be unique
        Returns:
        a new Collection
        Throws:
        BuildException
      • deleteCollection

        void deleteCollection(java.lang.String name)
                       throws BuildException
        Delete a collection
        Parameters:
        name - the name of the collection to delete
        Throws:
        BuildException
      • deleteCollections

        void deleteCollections()
                        throws BuildException
        Delete all collections in a build group
        Parameters:
        name - the name of the collection to delete
        Throws:
        BuildException
      • createBuildMap

        BuildMap createBuildMap(java.lang.String buildFile)
                         throws BuildException
        Create a build map
        Parameters:
        buildFile - the file path which this build map will describe
        Returns:
        A new BuildMap
        Throws:
        BuildException
      • createBuildMap

        BuildMap createBuildMap(java.lang.String buildFile,
                                java.lang.String result,
                                java.lang.String description)
                         throws BuildException
        Create a build map within this build group
        Parameters:
        buildFile - the file path which this build map will describe
        result - the result of the build of this program
        description - user-customizable description field
        Returns:
        a new BuildMap
        Throws:
        BuildException
      • createBuildMap

        BuildMap createBuildMap(java.lang.String buildFile,
                                java.lang.String result,
                                java.lang.String description,
                                java.lang.String owner,
                                java.lang.String team,
                                int permission)
                         throws BuildException
        Create a build map within this build group
        Parameters:
        buildFile - the file path which this build map will describe
        result - the result of the build of this program
        description - user-customizable description field
        owner -
        team -
        permission -
        Returns:
        a new BuildMap
        Throws:
        BuildException
      • buildMapExists

        boolean buildMapExists(java.lang.String buildFile)
                        throws BuildException
        Check whether a build map for the provided buildFile exists within this build group
        Parameters:
        buildFile - the file of the build map
        Returns:
        true if a build map exists, false if not
        Throws:
        BuildException
      • getBuildMap

        BuildMap getBuildMap(java.lang.String buildFile)
                      throws BuildException
        Get a build map
        Parameters:
        buildFile - the file of the build map
        Returns:
        the BuildMap. Returns null if there is no build map for the provided buildFile path within this build group
        Throws:
        BuildException
      • findBuildMaps

        java.util.List<BuildMap> findBuildMaps(java.lang.String member,
                                               java.lang.String dataset,
                                               java.lang.String path,
                                               java.lang.String deployType)
                                        throws BuildException
        Find all build maps which have an Output matching all of the provided Output members. To ignore parameters during the search, pass null. Note: Filesystem implementation is limited to searching only by member and dataset members. Passing non-null values for path and deployType will cause an exception.
        Parameters:
        member - - the Output's member
        dataset - - the Output's dataset
        path - - the Output's path
        deployType - - the Output's deployType
        Returns:
        - a list of BuildMap objects with an output matching the provided criteria.
        Throws:
        BuildException
      • deleteBuildMap

        void deleteBuildMap(java.lang.String buildFile)
                     throws BuildException
        Delete a build map
        Parameters:
        buildFile - the build-file path of the build map to delete
        Throws:
        BuildException
      • deleteBuildMaps

        void deleteBuildMaps()
                      throws BuildException
        Delete all build maps in the build group
        Parameters:
        buildMap - the BuildMap to delete
        Throws:
        BuildException
      • getName

        java.lang.String getName()
      • equals

        boolean equals(java.lang.Object obj)
        UTILITY METHODS
        Overrides:
        equals in class java.lang.Object
      • getImpactedFiles

        java.util.List<Collection> getImpactedFiles(java.util.List<java.lang.String> collections,
                                                    java.util.List<LogicalDependency> lds)
                                             throws BuildException
        Get a list of impacted files in a list of collections with dependencies on a list of logical dependencies.
        Parameters:
        collections - List of collections to search
        lds - List of dependencies
        Returns:
        list of impacted collections with their impacted logical files. Note that collections returned from this method have no connection to the metadata store and may not be complete (ie may not contain a full list of logical files). To get a full list of logical files or to update the collection, a corresponding collection must be obtained from the metadata store MetadataStore.getCollection(String).
        Throws:
        BuildException

<IBM Copyright © 2018 IBM Corp. All Rights Reserved.