Package 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
buildMapExists(java.lang.String buildFile)
Check whether a build map for the provided buildFile exists within this build groupboolean
buildResultExists(java.lang.String label)
Check whether a build result existsboolean
collectionExists(java.lang.String name)
Check whether a collection exists within this build groupCollection
copyCollection(Collection collection, java.lang.String newName)
Copy a collection to this build groupCollection
copyCollection(java.lang.String name, java.lang.String newName)
Copy a collection within this build groupBuildMap
createBuildMap(java.lang.String buildFile)
Create a build mapBuildMap
createBuildMap(java.lang.String buildFile, java.lang.String result, java.lang.String description)
Create a build map within this build groupBuildMap
createBuildMap(java.lang.String buildFile, java.lang.String result, java.lang.String description, java.lang.String owner, java.lang.String team, int permission)
Create a build map within this build groupBuildResult
createBuildResult(java.lang.String label)
Create a build resultBuildResult
createBuildResult(java.lang.String label, java.lang.String owner, java.lang.String team, int permission)
Create a build resultCollection
createCollection(java.lang.String name)
Create a collection with the specified nameCollection
createCollection(java.lang.String name, java.lang.String owner, java.lang.String team, int permission)
Create a collection with the specified attributesvoid
deleteBuildMap(BuildMap buildMap)
Delete a build mapvoid
deleteBuildMap(java.lang.String buildFile)
Delete a build mapvoid
deleteBuildMaps()
Delete all build maps in the build groupvoid
deleteBuildResult(BuildResult buildResult)
Delete a build result from this build groupvoid
deleteBuildResult(java.lang.String label)
Delete a build result from this build groupvoid
deleteBuildResults()
Delete all build results from this build groupvoid
deleteCollection(Collection collection)
Delete a collectionvoid
deleteCollection(java.lang.String name)
Delete a collectionvoid
deleteCollections()
Delete all collections in a build groupboolean
equals(java.lang.Object obj)
UTILITY METHODSjava.util.List<BuildMap>
findBuildMaps(java.lang.String member, java.lang.String dataset, java.lang.String path, java.lang.String deployType)
Find all build maps which have an Output matching all of the provided Output members.BuildMap
getBuildMap(java.lang.String buildFile)
Get a build mapjava.util.List<BuildMap>
getBuildMaps()
Get all build maps within this build groupBuildResult
getBuildResult(java.lang.String label)
Get a build result by the provided labeljava.util.List<java.lang.String>
getBuildResultLabels()
Get all build result labels within this BuildGroupjava.util.List<BuildResult>
getBuildResults()
Get all build results within this BuildGroupjava.util.List<BuildResult>
getBuildResults(int state, int status)
Get all build results which have the specifed state and statusCollection
getCollection(java.lang.String name)
Get a collection by namejava.util.List<Collection>
getCollections()
Get all collections within this build groupjava.util.List<Collection>
getImpactedFiles(java.util.List<java.lang.String> collections, java.util.List<LogicalDependency> lds)
Get a list of impacted files in a list of collections with dependencies on a list of logical dependencies.BuildResult
getLastBuildResult(int state, int status)
Get the most recent build result which have the specifed state and statusjava.lang.String
getName()
-
-
-
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 groupowner
-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
-
getBuildResults
java.util.List<BuildResult> getBuildResults() throws BuildException
Get all build results within this BuildGroup- Returns:
- a list of BuildResult objects
- 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
-
deleteBuildResults
void deleteBuildResults() throws BuildException
Delete all build results from this build group- 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 groupowner
- the owner of the collectionteam
-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
-
getCollections
java.util.List<Collection> getCollections() throws BuildException
Get all collections within this build group- Returns:
- a List of Collection objects
- 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 copynewName
- 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 copiednewName
- 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
-
deleteCollection
void deleteCollection(Collection collection) throws BuildException
Delete a collection- Parameters:
collection
- 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 describeresult
- the result of the build of this programdescription
- 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 describeresult
- the result of the build of this programdescription
- user-customizable description fieldowner
-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
-
getBuildMaps
java.util.List<BuildMap> getBuildMaps() throws BuildException
Get all build maps within this build group- Returns:
- a List of BuildMap objects
- 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 memberdataset
- - the Output's datasetpath
- - the Output's pathdeployType
- - 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
-
deleteBuildMap
void deleteBuildMap(BuildMap buildMap) throws BuildException
Delete a build map- Parameters:
buildMap
- the BuildMap 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 classjava.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 searchlds
- 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 {@link MetadataStore.getCollection(String)}.
- Throws:
BuildException
-
-