com.ibm.dbb.metadata

Interface MetadataStore



  • public interface MetadataStore
    • Method Detail

      • 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
      • createCollection

        Collection createCollection(java.lang.String collectionName)
                             throws BuildException
        Create a collection with the new name. Duplicate collections names are not allowed. Recommend using #collectionExits(String) to check for the existence before creating a new collection.
        Parameters:
        collectionName - The name of the new collection
        Returns:
        A new collection
        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 new name. Duplicate collections names are not allowed. It's better to use #collectionExits(String) to check for the existence before creating a new collection.
        Parameters:
        collectionName - The name of the new collection
        owner - the userid of the owner of this object.
        team - the team for this object.
        permission - The owner, team, and other permissions for this object.
        Returns:
        A new collection
        Throws:
        BuildException
      • collectionExists

        boolean collectionExists(java.lang.String collectionName)
                          throws BuildException
        Check to see if a collection by this name already exists
        Parameters:
        collectionName - The name of the collection
        Returns:
        true or false
        Throws:
        BuildException
      • getCollection

        Collection getCollection(java.lang.String name)
                          throws BuildException
        Get a collection by a specific name.
        Parameters:
        name - Name of the collection
        Returns:
        collection or null if collection doesn't exist.
        Throws:
        BuildException
      • deleteCollection

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

        void deleteCollection(Collection collection)
                       throws BuildException
        Delete a collection given the collection object
        Parameters:
        collection - Collection object representing the metadata store collection.
        Throws:
        BuildException
      • copyCollection

        Collection copyCollection(Collection collection,
                                  java.lang.String newName)
                           throws BuildException
        Copy a collection to a new collection with the new name
        Parameters:
        collection - Collection to be copied
        newName - Name of the new collection
        Returns:
        The new collection
        Throws:
        BuildException
      • copyCollection

        Collection copyCollection(java.lang.String collectionName,
                                  java.lang.String newName)
                           throws BuildException
        Copy a collection to a new collection with the new name
        Parameters:
        collectionName - Name of collection to be copied
        newName - Name of the new collection
        Returns:
        The new collection
        Throws:
        BuildException
      • createBuildResult

        BuildResult createBuildResult(java.lang.String group,
                                      java.lang.String label,
                                      java.lang.String owner,
                                      java.lang.String team,
                                      int permission)
                               throws BuildException
        Create a BuildResult in the metadata store
        Parameters:
        group - The group associated with the new build result
        label - The unique label within the group for the new build result.
        owner - the userid of the owner of this object.
        team - the team for this object.
        permission - The owner, team, and other permissions for this object.
        Returns:
        The new build result
        Throws:
        BuildException
      • createBuildResult

        BuildResult createBuildResult(java.lang.String group,
                                      java.lang.String label)
                               throws BuildException
        Create a BuildResult in the metadata store
        Parameters:
        group - The group associated with the new build result
        label - The unique label within the group for the new build result.
        Returns:
        The new build result
        Throws:
        BuildException
      • buildResultExists

        boolean buildResultExists(java.lang.String group,
                                  java.lang.String label)
                           throws BuildException
        Check to see if a build result already exists
        Parameters:
        group - The build result group
        label - The label of the build result
        Returns:
        true or false
        Throws:
        BuildException
      • getLastBuildResult

        BuildResult getLastBuildResult(java.lang.String group,
                                       int state,
                                       int status)
                                throws BuildException
        Get the latest build result within a group with the specified state and status. This is commonly used to find the last successful build.
        Parameters:
        group - The build group for the build result
        state - The state of the build result
        status - The status of the build result
        Returns:
        build result
        Throws:
        BuildException
      • getBuildResults

        java.util.List<BuildResult> getBuildResults(java.util.Map<BuildResult.QueryParms,java.lang.String> queryParms)
                                             throws BuildException
        Get a build result based on the query parameters specified (ie, Group, state, status, etc).
        Parameters:
        queryParms - Map of query parameters
        Returns:
        list of build results matching the criteria.
        Throws:
        BuildException
      • getBuildResults

        java.util.List<BuildResult> getBuildResults(java.lang.String group)
                                             throws BuildException
        Get a list of all of the build results in a build group.
        Parameters:
        group - The name of the build group
        Returns:
        list of build results in build group
        Throws:
        BuildException
      • getBuildResult

        BuildResult getBuildResult(java.lang.String group,
                                   java.lang.String label)
                            throws BuildException
        Get a specific build result within a group with the unique label.
        Parameters:
        group - The build group of the build result
        label - The label of the build result
        Returns:
        the build result or null, if the build result doesn't exist.
        Throws:
        BuildException
      • listBuildResultGroups

        java.util.List<java.lang.String> listBuildResultGroups()
                                                        throws BuildException
        Get a list of all of the build result groups.
        Returns:
        list of build groups
        Throws:
        BuildException
      • listBuildResultLabels

        java.util.List<java.lang.String> listBuildResultLabels(java.lang.String group)
                                                        throws BuildException
        Get a list of all build result labels within a build group.
        Parameters:
        group - Name of the build group
        Returns:
        list of build result labels
        Throws:
        BuildException
      • deleteBuildResults

        void deleteBuildResults(java.lang.String group)
                         throws BuildException
        Delete all build results in a build group.
        Parameters:
        group - The name of the build group
        Throws:
        BuildException
      • deleteBuildResult

        void deleteBuildResult(BuildResult buildResult)
                        throws BuildException
        Delete, from the metadata store, the build result represented by the BuildResult.
        Parameters:
        buildResult - build result object to delete.
        Throws:
        BuildException

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