public interface FrontOfficeHierarchySession extends 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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAccessFrontOfficeHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildFrontOfficeIds(Id frontOfficeId)
Gets the child
Ids of the given front office. |
FrontOfficeList |
getChildFrontOffices(Id frontOfficeId)
Gets the children of the given front office.
|
Hierarchy |
getFrontOfficeHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getFrontOfficeHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getFrontOfficeNodeIds(Id frontOfficeId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given front office.
|
FrontOfficeNode |
getFrontOfficeNodes(Id frontOfficeId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given front office.
|
IdList |
getParentFrontOfficeIds(Id frontOfficeId)
Gets the parent
Ids of the given front office. |
FrontOfficeList |
getParentFrontOffices(Id frontOfficeId)
Gets the parents of the given front office.
|
IdList |
getRootFrontOfficeIds()
Gets the root front office
Ids in this hierarchy. |
FrontOfficeList |
getRootFrontOffices()
Gets the root front office in the front office hierarchy.
|
boolean |
hasChildFrontOffices(Id frontOfficeId)
Tests if a front office has any children.
|
boolean |
hasParentFrontOffices(Id frontOfficeId)
Tests if the
FrontOffice has any parents. |
boolean |
isAncestorOfFrontOffice(Id id,
Id frontOfficeId)
Tests if an
Id is an ancestor of a front office. |
boolean |
isChildOfFrontOffice(Id id,
Id frontOfficeId)
Tests if a front office is a direct child of another.
|
boolean |
isDescendantOfFrontOffice(Id id,
Id frontOfficeId)
Tests if an
Id is a descendant of a front office. |
boolean |
isParentOfFrontOffice(Id id,
Id frontOfficeId)
Tests if an
Id is a direct parent of front office. |
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.
|
void |
usePlenaryFrontOfficeView()
A complete view of the
FrontOffices returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getFrontOfficeHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getFrontOfficeHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessFrontOfficeHierarchy()
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 useComparativeFrontOfficeView()
mandatory - This method is must be implemented. void usePlenaryFrontOfficeView()
FrontOffices 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 getRootFrontOfficeIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FrontOfficeList getRootFrontOffices() throws OperationFailedException, PermissionDeniedException
Ids are
known to the hierarchy, an orphan does not appear in the hierarchy
unless explicitly added as a root issue or child of another issue.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. boolean hasParentFrontOffices(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
FrontOffice has any parents.frontOfficeId - a front office Id true if the front office has parents, f
alse otherwiseNotFoundException - frontOfficeId is not
foundNullArgumentException - frontOfficeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfFrontOffice(Id id, Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of front office.id - an Id frontOfficeId - the Id of a front office true if this id is a parent of
frontOfficeId, f alse otherwiseNotFoundException - frontOfficeId is not
foundNullArgumentException - id or
frontOfficeId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentFrontOfficeIds(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given front office.frontOfficeId - a front office Id Ids of the front officeNotFoundException - frontOfficeId is not
foundNullArgumentException - frontOfficeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FrontOfficeList getParentFrontOffices(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
frontOfficeId - the Id to queryNotFoundException - frontOfficeId not
foundNullArgumentException - frontOfficeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfFrontOffice(Id id, Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of a front office.id - an Id frontOfficeId - the Id of a front office tru e if this id is an ancestor
of frontOfficeId, false
otherwiseNotFoundException - frontOfficeId not
foundNullArgumentException - frontOfficeId or
id is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildFrontOffices(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
frontOfficeId - a front office Id true if the frontOfficeId has
children, false otherwiseNotFoundException - frontOfficeId not
foundNullArgumentException - frontOfficeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfFrontOffice(Id id, Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id frontOfficeId - the Id of a front office true if the id is a child of
frontOfficeId, false otherwiseNotFoundException - frontOfficeId not
foundNullArgumentException - id or
frontOfficeId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildFrontOfficeIds(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given front office.frontOfficeId - the Id to queryNotFoundException - frontOfficeId not
foundNullArgumentException - frontOfficeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FrontOfficeList getChildFrontOffices(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
frontOfficeId - the Id to queryNotFoundException - frontOfficeId not
foundNullArgumentException - frontOfficeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfFrontOffice(Id id, Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of a front office.id - an Id frontOfficeId - the Id of a front office true if the id is a descendant
of the frontOfficeId, false
otherwiseNotFoundException - frontOfficeId not
foundNullArgumentException - id or
frontOfficeId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getFrontOfficeNodeIds(Id frontOfficeId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
frontOfficeId - the Id to 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 - true to include the siblings of
the given issue, false to omit the siblingsNotFoundException - frontOfficeId not
foundNullArgumentException - frontOfficeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FrontOfficeNode getFrontOfficeNodes(Id frontOfficeId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
frontOfficeId - the Id to 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 - true to include the siblings of
the given issue, false to omit the siblingsNotFoundException - frontOfficeId not
foundNullArgumentException - frontOfficeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.