Interface OublietteHierarchySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for traversing a hierarchy of
Oubliette objects. Each node in the hierarchy is a unique
Oubliette . The hierarchy may be traversed recursively to establish the
tree structure through getParentOubliette() and
getChildOubliettes() . To relate these Ids to another OSID,
getOublietteNodes() can be used for retrievals that can be used
for bulk lookups in other OSIDs. Any Oubliette available in the
Hold OSID is known to this hierarchy but does not appear in the hierarchy
traversal until added as a root issue or a child of another issue.
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 getParentOubliettes() or getChildOubliettes() in lieu
of a PERMISSION_DENIED error that may disrupt the traversal
through authorized effortways.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative oubliette view: oubliette elements may be silently omitted or re-ordered
- plenary oubliette view: provides a complete set or is an error condition
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform hierarchy queries.getChildOublietteIds(Id oublietteId) Gets the childIdsof the given oubliette.getChildOubliettes(Id oublietteId) Gets the children of the given oubliette.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.getOublietteNodeIds(Id oublietteId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given oubliette.getOublietteNodes(Id oublietteId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given oubliette.getParentOublietteIds(Id oublietteId) Gets the parentIdsof the given oubliette.getParentOubliettes(Id oublietteId) Gets the parents of the given oubliette.Gets the root oublietteIdsin this hierarchy.Gets the root oubliette in the oubliette hierarchy.booleanhasChildOubliettes(Id oublietteId) Tests if an oubliette has any children.booleanhasParentOubliettes(Id oublietteId) Tests if theOubliettehas any parents.booleanisAncestorOfOubliette(Id id, Id oublietteId) Tests if anIdis an ancestor of an oubliette.booleanisChildOfOubliette(Id id, Id oublietteId) Tests if an oubliette is a direct child of another.booleanisDescendantOfOubliette(Id id, Id oublietteId) Tests if anIdis a descendant of an oubliette.booleanisParentOfOubliette(Id id, Id oublietteId) Tests if anIdis a direct parent of oubliette.voidThe returns from the oubliette methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidsMethods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getOublietteHierarchyId
Id getOublietteHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOublietteHierarchy
Gets the hierarchy associated with this session.- Returns:
- the hierarchy associated with this session
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canAccessOublietteHierarchy
boolean canAccessOublietteHierarchy()Tests if this user can perform hierarchy queries. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.- Returns:
falseif hierarchy traversal methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeOublietteView
void useComparativeOublietteView()The returns from the oubliette methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryOublietteView
void usePlenaryOublietteView()s- Compliance:
mandatory- This method is must be implemented.
-
getRootOublietteIds
Gets the root oublietteIdsin this hierarchy.- Returns:
- the root oubliette
Ids - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRootOubliettes
Gets the root oubliette in the oubliette hierarchy. An oubliette with no parents is an orphan. While all oublietteIdsare known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root issue or child of another issue.- Returns:
- the root oubliettes
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
hasParentOubliettes
boolean hasParentOubliettes(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if theOubliettehas any parents.- Parameters:
oublietteId- an oublietteId- Returns:
trueif the oubliette has parents, falseotherwise- Throws:
NotFoundException-oublietteIdis not foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isParentOfOubliette
boolean isParentOfOubliette(Id id, Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a direct parent of oubliette.- Parameters:
id- anIdoublietteId- theIdof an oubliette- Returns:
trueif thisidis a parent ofoublietteId, falseotherwise- Throws:
NotFoundException-oublietteIdis not foundNullArgumentException-idoroublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getParentOublietteIds
IdList getParentOublietteIds(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parentIdsof the given oubliette.- Parameters:
oublietteId- an oublietteId- Returns:
- the parent
Idsof the oubliette - Throws:
NotFoundException-oublietteIdis not foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getParentOubliettes
OublietteList getParentOubliettes(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parents of the given oubliette.- Parameters:
oublietteId- theIdto query- Returns:
- the parents of the oubliette
- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isAncestorOfOubliette
boolean isAncestorOfOubliette(Id id, Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis an ancestor of an oubliette.- Parameters:
id- anIdoublietteId- theIdof an oubliette- Returns:
trueif thisidis an ancestor ofoublietteId,falseotherwise- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdoridisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
hasChildOubliettes
boolean hasChildOubliettes(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an oubliette has any children.- Parameters:
oublietteId- an oublietteId- Returns:
trueif theoublietteIdhas children,falseotherwise- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isChildOfOubliette
boolean isChildOfOubliette(Id id, Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an oubliette is a direct child of another.- Parameters:
id- anIdoublietteId- theIdof an oubliette- Returns:
trueif theidis a child ofoublietteId,falseotherwise- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-idoroublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getChildOublietteIds
IdList getChildOublietteIds(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the childIdsof the given oubliette.- Parameters:
oublietteId- theIdto query- Returns:
- the children of the oubliette
- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getChildOubliettes
OublietteList getChildOubliettes(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the children of the given oubliette.- Parameters:
oublietteId- theIdto query- Returns:
- the children of the oubliette
- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isDescendantOfOubliette
boolean isDescendantOfOubliette(Id id, Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a descendant of an oubliette.- Parameters:
id- anIdoublietteId- theIdof an oubliette- Returns:
trueif theidis a descendant of theoublietteId,falseotherwise- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-idoroublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} is not found return {@code false} .
-
getOublietteNodeIds
Node getOublietteNodeIds(Id oublietteId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given oubliette.- Parameters:
oublietteId- theIdto queryancestorLevels- the maximum number of ancestor levels to include. A value of 0 returns no parents in the issue.descendantLevels- the maximum number of descendant levels to include. A value of 0 returns no children in the issue.includeSiblings-trueto include the siblings of the given issue,falseto omit the siblings- Returns:
- an oubliette node
- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOublietteNodes
OublietteNode getOublietteNodes(Id oublietteId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given oubliette.- Parameters:
oublietteId- theIdto queryancestorLevels- the maximum number of ancestor levels to include. A value of 0 returns no parents in the issue.descendantLevels- the maximum number of descendant levels to include. A value of 0 returns no children in the issue.includeSiblings-trueto include the siblings of the given issue,falseto omit the siblings- Returns:
- an oubliette node
- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-