Interface FrontOfficeHierarchySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for traversing a hierarchy of
FrontOffice objects. Each node in the hierarchy is a unique
FrontOffice . The hierarchy may be traversed recursively to establish the
tree structure through getParentFrontOffices() and
getChildFrontOffices() . To relate these Ids to another OSID,
getFrontOfficeNodes() can be used for retrievals that can be used
for bulk lookups in other OSIDs. Any FrontOffice available in the
Tracking 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 getParentFrontOffices() or getChildFrontOffices() 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 front office view: front office elements may be silently omitted or re-ordered
- plenary front office view: provides a complete set or is an error condition
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform hierarchy queries.getChildFrontOfficeIds(Id frontOfficeId) Gets the childIdsof the given front office.getChildFrontOffices(Id frontOfficeId) Gets the children of the given front office.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.getFrontOfficeNodeIds(Id frontOfficeId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given front office.getFrontOfficeNodes(Id frontOfficeId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given front office.getParentFrontOfficeIds(Id frontOfficeId) Gets the parentIdsof the given front office.getParentFrontOffices(Id frontOfficeId) Gets the parents of the given front office.Gets the root front officeIdsin this hierarchy.Gets the root front office in the front office hierarchy.booleanhasChildFrontOffices(Id frontOfficeId) Tests if a front office has any children.booleanhasParentFrontOffices(Id frontOfficeId) Tests if theFrontOfficehas any parents.booleanisAncestorOfFrontOffice(Id id, Id frontOfficeId) Tests if anIdis an ancestor of a front office.booleanisChildOfFrontOffice(Id id, Id frontOfficeId) Tests if a front office is a direct child of another.booleanisDescendantOfFrontOffice(Id id, Id frontOfficeId) Tests if anIdis a descendant of a front office.booleanisParentOfFrontOffice(Id id, Id frontOfficeId) Tests if anIdis a direct parent of front office.voidThe returns from the front office methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidA complete view of theFrontOfficesreturns 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
-
getFrontOfficeHierarchyId
Id getFrontOfficeHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFrontOfficeHierarchy
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.
-
canAccessFrontOfficeHierarchy
boolean canAccessFrontOfficeHierarchy()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.
-
useComparativeFrontOfficeView
void useComparativeFrontOfficeView()The returns from the front office 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.
-
usePlenaryFrontOfficeView
void usePlenaryFrontOfficeView()A complete view of theFrontOfficesreturns 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.
-
getRootFrontOfficeIds
Gets the root front officeIdsin this hierarchy.- Returns:
- the root front office
Ids - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRootFrontOffices
Gets the root front office in the front office hierarchy. A issue with no parents is an orphan. While all front officeIdsare 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 frontOffices
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
hasParentFrontOffices
boolean hasParentFrontOffices(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if theFrontOfficehas any parents.- Parameters:
frontOfficeId- a front officeId- Returns:
trueif the front office has parents, falseotherwise- Throws:
NotFoundException-frontOfficeIdis not foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isParentOfFrontOffice
boolean isParentOfFrontOffice(Id id, Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a direct parent of front office.- Parameters:
id- anIdfrontOfficeId- theIdof a front office- Returns:
trueif thisidis a parent offrontOfficeId, falseotherwise- Throws:
NotFoundException-frontOfficeIdis not foundNullArgumentException-idorfrontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getParentFrontOfficeIds
IdList getParentFrontOfficeIds(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parentIdsof the given front office.- Parameters:
frontOfficeId- a front officeId- Returns:
- the parent
Idsof the front office - Throws:
NotFoundException-frontOfficeIdis not foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getParentFrontOffices
FrontOfficeList getParentFrontOffices(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parents of the given front office.- Parameters:
frontOfficeId- theIdto query- Returns:
- the parents of the front office
- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isAncestorOfFrontOffice
boolean isAncestorOfFrontOffice(Id id, Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis an ancestor of a front office.- Parameters:
id- anIdfrontOfficeId- theIdof a front office- Returns:
trueif thisidis an ancestor offrontOfficeId,falseotherwise- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdoridisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
hasChildFrontOffices
boolean hasChildFrontOffices(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if a front office has any children.- Parameters:
frontOfficeId- a front officeId- Returns:
trueif thefrontOfficeIdhas children,falseotherwise- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isChildOfFrontOffice
boolean isChildOfFrontOffice(Id id, Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if a front office is a direct child of another.- Parameters:
id- anIdfrontOfficeId- theIdof a front office- Returns:
trueif theidis a child offrontOfficeId,falseotherwise- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-idorfrontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getChildFrontOfficeIds
IdList getChildFrontOfficeIds(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the childIdsof the given front office.- Parameters:
frontOfficeId- theIdto query- Returns:
- the children of the front office
- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getChildFrontOffices
FrontOfficeList getChildFrontOffices(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the children of the given front office.- Parameters:
frontOfficeId- theIdto query- Returns:
- the children of the front office
- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isDescendantOfFrontOffice
boolean isDescendantOfFrontOffice(Id id, Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a descendant of a front office.- Parameters:
id- anIdfrontOfficeId- theIdof a front office- Returns:
trueif theidis a descendant of thefrontOfficeId,falseotherwise- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-idorfrontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} is not found return {@code false} .
-
getFrontOfficeNodeIds
Node getFrontOfficeNodeIds(Id frontOfficeId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given front office.- Parameters:
frontOfficeId- 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:
- a front office node
- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getFrontOfficeNodes
FrontOfficeNode getFrontOfficeNodes(Id frontOfficeId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given front office.- Parameters:
frontOfficeId- 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:
- a front office node
- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-