Interface InquestHierarchySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for traversing a hierarchy of
Inquests . Each node in the hierarchy is a unique Inquest . The
hierarchy may be traversed recursively to establish the tree structure
through getParentInquests() and getChildInquests() . To
relate these Ids to another OSID, getInquestNodes() can be
used for retrievals that can be used for bulk lookups in other OSIDs. Any
Inquest available in the Control OSID is known to this hierarchy
but does not appear in the hierarchy traversal until added as a root
inquest or a child of another inquest.
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 getParentInquests() or getChildInquests() in lieu of a
PERMISSION_DENIED error that may disrupt the traversal through
authorized inquiryways.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative inquest view: inquest elements may be silently omitted or re-ordered
- plenary inquest view: provides a complete set or is an error condition
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform hierarchy queries.getChildInquestIds(Id inquestId) Gets the childIdsof the given inquest.getChildInquests(Id inquestId) Gets the children of the given inquest.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.getInquestNodeIds(Id inquestId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given inquest.getInquestNodes(Id inquestId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given inquest.getParentInquestIds(Id inquestId) Gets the parentIdsof the given inquest.getParentInquests(Id inquestId) Gets the parents of the given inquest.Gets the root inquestIdsin this hierarchy.Gets the root inquest in the inquest hierarchy.booleanhasChildInquests(Id inquestId) Tests if an inquest has any children.booleanhasParentInquests(Id inquestId) Tests if theInquesthas any parents.booleanisAncestorOfInquest(Id id, Id inquestId) Tests if anIdis an ancestor of an inquest.booleanisChildOfInquest(Id id, Id inquestId) Tests if an inquest is a direct child of another.booleanisDescendantOfInquest(Id id, Id inquestId) Tests if anIdis a descendant of an inquest.booleanisParentOfInquest(Id id, Id inquestId) Tests if anIdis a direct parent of inquest.voidThe returns from the inquest methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidA complete view of theInquestsreturns is desired.Methods 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
-
getInquestHierarchyId
Id getInquestHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getInquestHierarchy
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.
-
canAccessInquestHierarchy
boolean canAccessInquestHierarchy()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.
-
useComparativeInquestView
void useComparativeInquestView()The returns from the inquest 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.
-
usePlenaryInquestView
void usePlenaryInquestView()A complete view of theInquestsreturns 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.- Compliance:
mandatory- This method is must be implemented.
-
getRootInquestIds
Gets the root inquestIdsin this hierarchy.- Returns:
- the root inquest
Ids - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRootInquests
Gets the root inquest in the inquest hierarchy. an inquest with no parents is an orphan. While all inquestIdsare known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root inquest or child of another inquest.- Returns:
- the root inquests
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
hasParentInquests
boolean hasParentInquests(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if theInquesthas any parents.- Parameters:
inquestId- an inquestId- Returns:
trueif the inquest has parents, falseotherwise- Throws:
NotFoundException-inquestIdis not foundNullArgumentException-inquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isParentOfInquest
boolean isParentOfInquest(Id id, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a direct parent of inquest.- Parameters:
id- anIdinquestId- theIdof an inquest- Returns:
trueif thisidis a parent ofinquestId, falseotherwise- Throws:
NotFoundException-inquestIdis not foundNullArgumentException-idorinquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getParentInquestIds
IdList getParentInquestIds(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parentIdsof the given inquest.- Parameters:
inquestId- an inquestId- Returns:
- the parent
Idsof the inquest - Throws:
NotFoundException-inquestIdis not foundNullArgumentException-inquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getParentInquests
InquestList getParentInquests(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parents of the given inquest.- Parameters:
inquestId- theIdto query- Returns:
- the parents of the inquest
- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-inquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isAncestorOfInquest
boolean isAncestorOfInquest(Id id, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis an ancestor of an inquest.- Parameters:
id- anIdinquestId- theIdof an inquest- Returns:
trueif thisidis an ancestor ofinquestId,falseotherwise- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-inquestIdoridisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
hasChildInquests
boolean hasChildInquests(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an inquest has any children.- Parameters:
inquestId- an inquestId- Returns:
trueif theinquestIdhas children,falseotherwise- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-inquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isChildOfInquest
boolean isChildOfInquest(Id id, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an inquest is a direct child of another.- Parameters:
id- anIdinquestId- theIdof an inquest- Returns:
trueif theidis a child ofinquestId,falseotherwise- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-idorinquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getChildInquestIds
IdList getChildInquestIds(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the childIdsof the given inquest.- Parameters:
inquestId- theIdto query- Returns:
- the children of the inquest
- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-inquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getChildInquests
InquestList getChildInquests(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the children of the given inquest.- Parameters:
inquestId- theIdto query- Returns:
- the children of the inquest
- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-inquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isDescendantOfInquest
boolean isDescendantOfInquest(Id id, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a descendant of an inquest.- Parameters:
id- anIdinquestId- theIdof an inquest- Returns:
trueif theidis a descendant of theinquestId,falseotherwise- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-idorinquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} is not found return {@code false} .
-
getInquestNodeIds
Node getInquestNodeIds(Id inquestId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given inquest.- Parameters:
inquestId- theIdto queryancestorLevels- the maximum number of ancestor levels to include. A value of 0 returns no parents in the inquest.descendantLevels- the maximum number of descendant levels to include. A value of 0 returns no children in the inquest.includeSiblings-trueto include the siblings of the given inquest,falseto omit the siblings- Returns:
- an inquest node
- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-inquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInquestNodes
InquestNode getInquestNodes(Id inquestId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given inquest.- Parameters:
inquestId- theIdto queryancestorLevels- the maximum number of ancestor levels to include. A value of 0 returns no parents in the hierarchy.descendantLevels- the maximum number of descendant levels to include. A value of 0 returns no children in the hierarchy.includeSiblings-trueto include the siblings of the given inquest,falseto omit the siblings- Returns:
- an inquest node
- Throws:
NotFoundException-inquestIdnot foundNullArgumentException-inquestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-