Package com.ibm.dbb.metadata
Interface MetadataStore
-
public interface MetadataStore
The MetadataStore class represents the highest level metadata container. The metadata store contains build groups. This class contains helper methods for creating, copying, retrieving, and deleting build groups.To access, create, or modify lower-level metadata objects, such as
Collection
,BuildResult
, orBuildMap
objects, first create or get aBuildGroup
using this class. Then use the BuildGroup to access or create the lower level metadata objects that it contains. See theBuildGroup
class for more information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
buildGroupExists(java.lang.String group)
Check wheter a build group existsboolean
buildResultExists(java.lang.String group, java.lang.String label)
Deprecated.As of release 2.0.2, replaced byBuildGroup.buildResultExists(String label)
boolean
collectionExists(java.lang.String collectionName)
Deprecated.As of release 2.0.2, replaced byBuildGroup.collectionExists(String name)
BuildGroup
copyBuildGroup(java.lang.String source, java.lang.String newName, boolean collections, boolean buildResults, boolean buildMaps)
Creates a new build group, copying all collections, build results, and/or all build maps, as selected, to the new build group.Collection
copyCollection(Collection collection, java.lang.String newName)
Deprecated.As of release 2.0.2, replaced byBuildGroup.copyCollection(String, String)
andBuildGroup.copyCollection(Collection, String)
Collection
copyCollection(java.lang.String collectionName, java.lang.String newName)
Deprecated.As of release 2.0.2, replaced byBuildGroup.copyCollection(String, String)
andBuildGroup.copyCollection(Collection, String)
BuildGroup
createBuildGroup(java.lang.String group)
Creates a new build groupBuildResult
createBuildResult(java.lang.String group, java.lang.String label)
Deprecated.As of release 2.0.2, replaced byBuildGroup.createBuildResult(String)
BuildResult
createBuildResult(java.lang.String group, java.lang.String label, java.lang.String owner, java.lang.String team, int permission)
Deprecated.As of release 2.0.2, replaced byBuildGroup.createBuildResult(String,String,String,int)
Collection
createCollection(java.lang.String collectionName)
Deprecated.As of release 2.0.2, replaced byBuildGroup.createCollection(String)
Collection
createCollection(java.lang.String name, java.lang.String owner, java.lang.String team, int permission)
Deprecated.As of release 2.0.2, replaced byBuildGroup.createCollection(String, String, String, int)
BuildGroup
createTopicBuildGroup(java.lang.String source, java.lang.String newName)
Creates a new topic branch build group, copying all collections and the last successful build result to the new build group.void
deleteBuildGroup(BuildGroup group)
Delete an existing build groupvoid
deleteBuildGroup(java.lang.String group)
Delete an existing build groupvoid
deleteBuildResult(BuildResult buildResult)
Deprecated.As of release 2.0.2, replaced byBuildGroup.deleteBuildResult(String)
andBuildGroup.deleteBuildResult(BuildResult)
void
deleteBuildResults(java.lang.String group)
Deprecated.As of release 2.0.2, replaced byBuildGroup#deleteBuildResults(String)
void
deleteCollection(Collection collection)
Deprecated.As of release 2.0.2, replaced byBuildGroup.deleteCollection(Collection)
void
deleteCollection(java.lang.String collectionName)
Deprecated.As of release 2.0.2, replaced byBuildGroup.deleteCollection(String)
BuildGroup
getBuildGroup(java.lang.String group)
Get a build groupjava.util.List<java.lang.String>
getBuildGroupNames()
Get a list of all build group namesjava.util.List<BuildGroup>
getBuildGroups()
Get a list of all build groupsBuildResult
getBuildResult(java.lang.String group, java.lang.String label)
Deprecated.As of release 2.0.2, replaced byBuildGroup.getBuildResult(String label)
java.util.List<BuildResult>
getBuildResults(java.lang.String group)
Deprecated.As of release 2.0.2, replaced byBuildGroup.getBuildResults()
java.util.List<BuildResult>
getBuildResults(java.util.Map<BuildResult.QueryParms,java.lang.String> queryParms)
Deprecated.As of release 2.0.2, replaced byBuildGroup.getBuildResult(String label)
Collection
getCollection(java.lang.String name)
Deprecated.As of release 2.0.2, replaced byBuildGroup.getCollection(String)
java.util.List<Collection>
getCollections()
Deprecated.As of release 2.0.2, replaced byBuildGroup.getCollections()
java.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(java.lang.String group, int state, int status)
Deprecated.As of release 2.0.2, replaced byBuildGroup.getLastBuildResult(int, int)
java.util.List<java.lang.String>
listBuildResultGroups()
Deprecated.As of release 2.0.2, replaced bygetBuildGroupNames()
java.util.List<java.lang.String>
listBuildResultLabels(java.lang.String group)
Deprecated.As of release 2.0.2, replaced byBuildGroup.getBuildResultLabels()
-
-
-
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 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
-
createBuildGroup
BuildGroup createBuildGroup(java.lang.String group) throws BuildException
Creates a new build group- Parameters:
group
- The new group name- Returns:
- The new BuildGroup
- Throws:
BuildException
-
copyBuildGroup
BuildGroup copyBuildGroup(java.lang.String source, java.lang.String newName, boolean collections, boolean buildResults, boolean buildMaps) throws BuildException
Creates a new build group, copying all collections, build results, and/or all build maps, as selected, to the new build group.- Parameters:
source
- The source build group namenewName
- The new build group namecollections
- Pass true to copy all collections; false to skipbuildResults
- Pass true to copy all build results; false to skipbuildMaps
- Pass true to copy all build maps; false to skip- Throws:
BuildException
-
createTopicBuildGroup
BuildGroup createTopicBuildGroup(java.lang.String source, java.lang.String newName) throws BuildException
Creates a new topic branch build group, copying all collections and the last successful build result to the new build group.- Parameters:
source
- The source build group namenewName
- The new topic branch build group name- Throws:
BuildException
-
getBuildGroup
BuildGroup getBuildGroup(java.lang.String group) throws BuildException
Get a build group- Parameters:
group
- the group name- Returns:
- the BuildGroup, if it exists. Returns null if a build group with specified name does not exist
- Throws:
BuildException
-
deleteBuildGroup
void deleteBuildGroup(java.lang.String group) throws BuildException
Delete an existing build groupDeletes all collections, build results, and build maps within this build group
- Parameters:
group
- name of the build group to delete- Throws:
BuildException
-
deleteBuildGroup
void deleteBuildGroup(BuildGroup group) throws BuildException
Delete an existing build groupDeletes all collections, build results, and build maps within this build group
- Parameters:
group
- the BuildGroup object to delete- Throws:
BuildException
-
buildGroupExists
boolean buildGroupExists(java.lang.String group) throws BuildException
Check wheter a build group exists- Parameters:
group
- the name of the build group to check existance- Returns:
- true if the build group exists, false otherwise
- Throws:
BuildException
-
getBuildGroups
java.util.List<BuildGroup> getBuildGroups() throws BuildException
Get a list of all build groups- Returns:
- List of BuildGroup objects
- Throws:
BuildException
-
getBuildGroupNames
java.util.List<java.lang.String> getBuildGroupNames() throws BuildException
Get a list of all build group names- Returns:
- List the names of all build groups (as Strings)
- Throws:
BuildException
-
createCollection
@Deprecated Collection createCollection(java.lang.String collectionName) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.createCollection(String)
Create a legacy 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
@Deprecated Collection createCollection(java.lang.String name, java.lang.String owner, java.lang.String team, int permission) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.createCollection(String, String, String, int)
Create a legacy 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 collectionowner
- 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
@Deprecated boolean collectionExists(java.lang.String collectionName) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.collectionExists(String name)
Check to see if a legacy collection by this name already exists- Parameters:
collectionName
- The name of the collection- Returns:
- true or false
- Throws:
BuildException
-
getCollections
@Deprecated java.util.List<Collection> getCollections() throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.getCollections()
Returns a list of collections from the metadata store- Returns:
- list of collections
- Throws:
BuildException
-
getCollection
@Deprecated Collection getCollection(java.lang.String name) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.getCollection(String)
Get a legacy collection by a specific name.- Parameters:
name
- Name of the collection- Returns:
- collection or null if collection doesn't exist.
- Throws:
BuildException
-
deleteCollection
@Deprecated void deleteCollection(java.lang.String collectionName) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.deleteCollection(String)
Delete a legacy collection by a specific name.- Parameters:
collectionName
- Name of the collection to delete.- Throws:
BuildException
-
deleteCollection
@Deprecated void deleteCollection(Collection collection) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.deleteCollection(Collection)
Delete a legacy collection given the collection object- Parameters:
collection
- Collection object representing the metadata store collection.- Throws:
BuildException
-
copyCollection
@Deprecated Collection copyCollection(Collection collection, java.lang.String newName) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.copyCollection(String, String)
andBuildGroup.copyCollection(Collection, String)
Copy a collection to a new collection with the new name within the same build group- Parameters:
collection
- Collection to be copiednewName
- Name of the new collection- Returns:
- The new collection
- Throws:
BuildException
-
copyCollection
@Deprecated Collection copyCollection(java.lang.String collectionName, java.lang.String newName) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.copyCollection(String, String)
andBuildGroup.copyCollection(Collection, String)
Copy a legacy collection to a new legacy collection with the new name- Parameters:
collectionName
- Name of collection to be copiednewName
- Name of the new collection- Returns:
- The new collection
- Throws:
BuildException
-
createBuildResult
@Deprecated BuildResult createBuildResult(java.lang.String group, java.lang.String label, java.lang.String owner, java.lang.String team, int permission) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.createBuildResult(String,String,String,int)
Create a BuildResult in the metadata store- Parameters:
group
- The group associated with the new build resultlabel
- 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
@Deprecated BuildResult createBuildResult(java.lang.String group, java.lang.String label) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.createBuildResult(String)
Create a BuildResult in the metadata store- Parameters:
group
- The group associated with the new build resultlabel
- The unique label within the group for the new build result.- Returns:
- The new build result
- Throws:
BuildException
-
buildResultExists
@Deprecated boolean buildResultExists(java.lang.String group, java.lang.String label) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.buildResultExists(String label)
Check to see if a build result already exists- Parameters:
group
- The build result grouplabel
- The label of the build result- Returns:
- true or false
- Throws:
BuildException
-
getLastBuildResult
@Deprecated BuildResult getLastBuildResult(java.lang.String group, int state, int status) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.getLastBuildResult(int, int)
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 resultstate
- The state of the build resultstatus
- The status of the build result- Returns:
- build result
- Throws:
BuildException
-
getBuildResults
@Deprecated java.util.List<BuildResult> getBuildResults(java.util.Map<BuildResult.QueryParms,java.lang.String> queryParms) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.getBuildResult(String label)
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
@Deprecated java.util.List<BuildResult> getBuildResults(java.lang.String group) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.getBuildResults()
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
@Deprecated BuildResult getBuildResult(java.lang.String group, java.lang.String label) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.getBuildResult(String label)
Get a specific build result within a group with the unique label.- Parameters:
group
- The build group of the build resultlabel
- The label of the build result- Returns:
- the build result or null, if the build result doesn't exist.
- Throws:
BuildException
-
listBuildResultGroups
@Deprecated java.util.List<java.lang.String> listBuildResultGroups() throws BuildException
Deprecated.As of release 2.0.2, replaced bygetBuildGroupNames()
Get a list of all of the build result groups.- Returns:
- list of build groups
- Throws:
BuildException
-
listBuildResultLabels
@Deprecated java.util.List<java.lang.String> listBuildResultLabels(java.lang.String group) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.getBuildResultLabels()
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
@Deprecated void deleteBuildResults(java.lang.String group) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup#deleteBuildResults(String)
Delete all build results in a build group.- Parameters:
group
- The name of the build group- Throws:
BuildException
-
deleteBuildResult
@Deprecated void deleteBuildResult(BuildResult buildResult) throws BuildException
Deprecated.As of release 2.0.2, replaced byBuildGroup.deleteBuildResult(String)
andBuildGroup.deleteBuildResult(BuildResult)
Delete, from the metadata store, the build result represented by theBuildResult
.- Parameters:
buildResult
- build result object to delete.- Throws:
BuildException
-
-