public interface AcademyHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Academy objects. Each node in the hierarchy is a unique
Academy. The hierarchy may be traversed recursively to establish
the tree structure through getParentAcademies() and
getChildAcademies(). To relate these Ids to another
OSID, getAcademyNodes() can be used for retrievals that can
be used for bulk lookups in other OSIDs. Any Academy
available in the Conferral 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 getParentAcademies() or getChildAcademies()
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 |
canAccessAcademyHierarchy()
Tests if this user can perform hierarchy queries.
|
Hierarchy |
getAcademyHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getAcademyHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getAcademyNodeIds(Id academyId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given academy.
|
AcademyNode |
getAcademyNodes(Id academyId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given academy.
|
AcademyList |
getChildAcademies(Id academyId)
Gets the child academies of the given
id. |
IdList |
getChildAcademyIds(Id academyId)
Gets the child
Ids of the given academy. |
AcademyList |
getParentAcademies(Id academyId)
Gets the parent academies of the given
id. |
IdList |
getParentAcademyIds(Id academyId)
Gets the parent
Ids of the given academy. |
AcademyList |
getRootAcademies()
Gets the root academies in the academy hierarchy.
|
IdList |
getRootAcademyIds()
Gets the root academy
Ids in this hierarchy. |
boolean |
hasChildAcademies(Id academyId)
Tests if an academy has any children.
|
boolean |
hasParentAcademies(Id academyId)
Tests if the
Academy has any parents. |
boolean |
isAncestorOfAcademy(Id id,
Id academyId)
Tests if an
Id is an ancestor of an academy. |
boolean |
isChildOfAcademy(Id id,
Id academyId)
Tests if an academy is a direct child of another.
|
boolean |
isDescendantOfAcademy(Id id,
Id academyId)
Tests if an
Id is a descendant of an academy. |
boolean |
isParentOfAcademy(Id id,
Id academyId)
Tests if an
Id is a direct parent of academy. |
void |
useComparativeAcademyView()
The returns from the academy methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryAcademyView()
A complete view of the
Academy returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getAcademyHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getAcademyHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessAcademyHierarchy()
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 useComparativeAcademyView()
mandatory - This method is must be implemented. void usePlenaryAcademyView()
Academy 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 getRootAcademyIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AcademyList getRootAcademies() 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 hasParentAcademies(Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Academy has any parents.academyId - an academy Id true if the academy has parents, f alse
otherwiseNotFoundException - academyId is not
foundNullArgumentException - academyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfAcademy(Id id, Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of academy.id - an Id academyId - the Id of an academy true if this id is a parent of
academyId, f alse otherwiseNotFoundException - academyId is not
foundNullArgumentException - id or
academyId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentAcademyIds(Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given academy.academyId - an academy Id Ids of the academyNotFoundException - academyId is not
foundNullArgumentException - academyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AcademyList getParentAcademies(Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id. academyId - the Id of the Academy
to query id NotFoundException - an Academy
identified by Id is not foundNullArgumentException - academyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfAcademy(Id id, Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of an academy.id - an Id academyId - the Id of an academy tru e if this id is an ancestor
of academyId, false otherwiseNotFoundException - academyId is not
foundNullArgumentException - id or
academyId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildAcademies(Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
academyId - an academy Id true if the academyId has
children, false otherwiseNotFoundException - academyId is not
foundNullArgumentException - academyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfAcademy(Id id, Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id academyId - the Id of an academy true if the id is a child of
academyId, false otherwiseNotFoundException - academyId is not
foundNullArgumentException - id or
academyId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildAcademyIds(Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given academy.academyId - the Id to queryNotFoundException - academyId is not
foundNullArgumentException - academyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AcademyList getChildAcademies(Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id. academyId - the Id of the Academy
to query id NotFoundException - an Academy
identified by Id is not foundNullArgumentException - academyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfAcademy(Id id, Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of an academy.id - an Id academyId - the Id of an academy true if the id is a descendant
of the academyId, false
otherwiseNotFoundException - academyId is not
foundNullArgumentException - id or
academyId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getAcademyNodeIds(Id academyId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
academyId - 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 - academyId is not
foundNullArgumentException - academyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AcademyNode getAcademyNodes(Id academyId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
academyId - 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 - academyId is not
foundNullArgumentException - academyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.