public interface ProcessHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Process objects. Each node in the hierarchy is a unique
Process. The hierarchy may be traversed recursively to establish
the tree structure through getParentProcesses() and
getChildProcesses(). To relate these Ids to another
OSID, getProcessNodes() can be used for retrievals that can
be used for bulk lookups in other OSIDs. Any Process
available in the Process OSID is known to this hierarchy but does not
appear in the hierarchy traversal until added as a root node or a child of
another node.
A user may not be authorized to traverse the entire hierarchy. Parts
of the hierarchy may be made invisible through omission from the returns
of getParentProcesses() or getChildProcesses()
in lieu of a PERMISSION_DENIED error that may
disrupt the traversal through authorized pathways.
This session defines views that offer differing behaviors when retrieving multiple objects.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAccessProcessHierarchy()
Tests if this user can perform hierarchy queries.
|
ProcessList |
getChildProcesses(Id processId)
Gets the children of the given process.
|
IdList |
getChildProcessIds(Id processId)
Gets the child
Ids of the given process. |
ProcessList |
getParentProcesses(Id processId)
Gets the parents of the given process.
|
IdList |
getParentProcessIds(Id processId)
Gets the parent
Ids of the given process. |
Hierarchy |
getProcessHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getProcessHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getProcessNodeIds(Id processId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given process.
|
ProcessNode |
getProcessNodes(Id processId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given process.
|
ProcessList |
getRootProcesses()
Gets the root processes in the process hierarchy.
|
IdList |
getRootProcessIds()
Gets the root process
Ids in this hierarchy. |
boolean |
hasChildProcesses(Id processId)
Tests if a process has any children.
|
boolean |
hasParentProcesses(Id processId)
Tests if the
Process has any parents. |
boolean |
isAncestorOfProcess(Id id,
Id processId)
Tests if an
Id is an ancestor of a process. |
boolean |
isChildOfProcess(Id id,
Id processId)
Tests if a process is a direct child of another.
|
boolean |
isDescendantOfProcess(Id id,
Id processId)
Tests if an
Id is a descendant of a process. |
boolean |
isParentOfProcess(Id id,
Id processId)
Tests if an
Id is a direct parent of a process. |
void |
useComparativeProcessView()
The returns from the process methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryProcessView()
A complete view of the
Process returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getProcessHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getProcessHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessProcessHierarchy()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer lookup operations. false if hierarchy traversal methods are not
authorized, true otherwisemandatory - This method must be implemented. void useComparativeProcessView()
mandatory - This method is must be implemented. void usePlenaryProcessView()
Process returns is desired.
Methods will return what is requested or result in an error. This view
is used when greater precision is desired at the expense of
interoperability.mandatory - This method is must be implemented. IdList getRootProcessIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProcessList getRootProcesses() throws OperationFailedException, PermissionDeniedException
Ids are known
to the hierarchy, an orphan does not appear in the hierarchy unless
explicitly added as a root node or child of another node.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. boolean hasParentProcesses(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Process has any parents.processId - a process Id true if the process has parents, false
otherwiseNotFoundException - processId is not
foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfProcess(Id id, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of a process.id - an Id processId - a process Id true if this id is a parent of
processId, false otherwiseNotFoundException - processId is not
foundNullArgumentException - id or
processId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentProcessIds(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given process.processId - a process Id Ids of the processNotFoundException - processId is not
foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProcessList getParentProcesses(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
processId - the Id to queryNotFoundException - processId not foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfProcess(Id id, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of a process.id - an Id processId - the Id of a process true if this id is an ancestor
of processId, false otherwiseNotFoundException - processId not foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildProcesses(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
processId - a processId true if the processId has
children, false otherwiseNotFoundException - processId not foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfProcess(Id id, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id processId - the Id of a process true if the id is a child of
processId, false otherwiseNotFoundException - processId not foundNullArgumentException - processId or
id is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildProcessIds(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given process.processId - the Id to queryNotFoundException - processId not foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProcessList getChildProcesses(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
processId - the Id to queryNotFoundException - processId not foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfProcess(Id id, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of a process.id - an Id processId - the Id of a process true if the id is a descendant
of the processId, false
otherwiseNotFoundException - processId not foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getProcessNodeIds(Id processId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
processId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the node.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the node.includeSiblings - true to include the siblings of
the given node, false to omit the siblingsNotFoundException - processId not foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProcessNode getProcessNodes(Id processId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
processId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the node.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the node.includeSiblings - true to include the siblings of
the given node, false to omit the siblingsNotFoundException - processId not foundNullArgumentException - processId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.