public final class ProjectHierarchy
extends java.lang.Object| Constructor and Description |
|---|
ProjectHierarchy(boolean isTransactional, TransactionManager txmgr) |
ProjectHierarchy(TransactionManager txmgr) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(Ref ref)
Adds a particular reference to the hierarchy
|
void |
deleteNode(Ref theref)
Removes a node from the hierarchy.
|
boolean |
exists(Ref ref)
Returns true if a node exists in the hierarchy
|
java.util.Set<Ref> |
expand(java.util.Collection<Ref> initialrefs)
Expands a given collection of references and returns a set of resource references.
|
java.util.Set<Ref> |
expand(RefValueDomain valueDomain)
Returns a set of references to existing resources that belong to the given value domain
|
java.util.Set<Ref> |
getChildren(Ref root, boolean recursive)
Returns children of a node.
|
java.util.Set<Ref> |
getLocations(Ref root, boolean recursive)
Returns all the projects/folders below this node.
|
java.util.Set<Ref> |
getResources(Ref root, boolean recursive)
Returns all resources below this node.
|
void |
rename(Ref oldref, Ref newref)
Renames a given reference
|
public ProjectHierarchy(TransactionManager txmgr)
public ProjectHierarchy(boolean isTransactional,
TransactionManager txmgr)public void addNode(Ref ref) throws AlreadyExistsException
AlreadyExistsExceptionpublic void deleteNode(Ref theref) throws NotFoundException
NotFoundExceptionpublic boolean exists(Ref ref)
public java.util.Set<Ref> getChildren(Ref root, boolean recursive) throws NotFoundException, java.lang.IllegalArgumentException
root -recursive - if true returns all descendants. otherwise returns only immediate childrenNotFoundException - if the given root location does not existjava.lang.IllegalArgumentException - if the root refers to a resourcepublic java.util.Set<Ref> getLocations(Ref root, boolean recursive) throws NotFoundException, java.lang.IllegalArgumentException
root - reference to domain, project or folder.recursive - if true, recursively gets locations from childrenNotFoundException - if the given root location does not existjava.lang.IllegalArgumentException - if the root refers to a resourcepublic java.util.Set<Ref> getResources(Ref root, boolean recursive) throws NotFoundException, java.lang.IllegalArgumentException
root - reference to domain, project or folderrecursive - if true, recursively gets resources from childrenNotFoundException - if the given root location does not existjava.lang.IllegalArgumentException - if the root refers to a resourcepublic void rename(Ref oldref, Ref newref) throws NotFoundException, AlreadyExistsException
NotFoundException - if oldref is not foundAlreadyExistsException - if newref already existspublic java.util.Set<Ref> expand(java.util.Collection<Ref> initialrefs) throws NotFoundException
Ref.DOMAIN). Project, folder, and domain references are expanded by obtaining references to all resources under these entities.initialrefs - a collection of references to resources, projects, or folders. projects and folders are expanded and replaced with references to resources within those projects/folders. The collection can contain the special domain reference, Ref.DOMAIN, in which case the result contains version information about all the resources in the domain. A null value essentially behaves as if Ref.DOMAIN is passed, that is it will cause the result to contain version information for all the resources in the damain.NotFoundExceptionpublic java.util.Set<Ref> expand(RefValueDomain valueDomain)