public interface ObjectiveBankHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
ObjectiveBank
objects. Each node in the hierarchy is a unique
ObjectiveBank.
The hierarchy may be traversed recursively
to establish the tree structure through getParentObjectiveBanks()
and getChildObjectiveBanks().
To relate these
Ids
to another OSID, getObjectiveBankNodes()
can be used for retrievals that can be used for bulk lookups in other
OSIDs. Any ObjectiveBank
available in the ObjectiveBanking
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 getParentObjectiveBanks()
or
getChildObjectiveBanks()
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 |
canAccessObjectiveBankHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildObjectiveBankIds(Id objectiveBankId)
Gets the child
Ids of the given objective bank. |
ObjectiveBankList |
getChildObjectiveBanks(Id objectiveBankId)
Gets the children of the given objective bank.
|
Hierarchy |
getObjectiveBankHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getObjectiveBankHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getObjectiveBankNodeIds(Id objectiveBankId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given objective bank.
|
ObjectiveBankNode |
getObjectiveBankNodes(Id objectiveBankId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given objective bank.
|
IdList |
getParentObjectiveBankIds(Id objectiveBankId)
Gets the parent
Ids of the given objective bank. |
ObjectiveBankList |
getParentObjectiveBanks(Id objectiveBankId)
Gets the parents of the given objective bank.
|
IdList |
getRootObjectiveBankIds()
Gets the root objective bank
Ids in this hierarchy. |
ObjectiveBankList |
getRootObjectiveBanks()
Gets the root objective banks in this objective bank hierarchy.
|
boolean |
hasChildObjectiveBanks(Id objectiveBankId)
Tests if an objective bank has any children.
|
boolean |
hasParentObjectiveBanks(Id objectiveBankId)
Tests if the
ObjectiveBank has any parents. |
boolean |
isAncestorOfObjectiveBank(Id id,
Id objectiveBankId)
Tests if an
Id is an ancestor of an objective bank. |
boolean |
isChildOfObjectiveBank(Id id,
Id objectiveBankId)
Tests if an objective bank is a direct child of another.
|
boolean |
isDescendantOfObjectiveBank(Id id,
Id objectiveBankId)
Tests if an
Id is a descendant of an objective bank. |
boolean |
isParentOfObjectiveBank(Id id,
Id objectiveBankId)
Tests if an
Id is a direct parent of an objective bank. |
void |
useComparativeObjectiveBankView()
The returns from the objective bank methods may omit or translate
elements based on this session, such as authorization, and not result
in an error.
|
void |
usePlenaryObjectiveBankView()
A complete view of the
Hierarchy returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getObjectiveBankHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getObjectiveBankHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAccessObjectiveBankHierarchy()
PERMISSION_DENIED.
This is intended as a hint to an
an application that may not offer traversal functions to unauthorized
users. false
if hierarchy traversal methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeObjectiveBankView()
mandatory
- This method is must be implemented. void usePlenaryObjectiveBankView()
Hierarchy
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 getRootObjectiveBankIds() throws OperationFailedException, PermissionDeniedException
Ids
in this hierarchy. Ids
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ObjectiveBankList getRootObjectiveBanks() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. boolean hasParentObjectiveBanks(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ObjectiveBank
has any parents.objectiveBankId
- the Id
of an objective bank true
if the objective bank has parents,
false
otherwiseNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isParentOfObjectiveBank(Id id, Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a direct parent of an objective bank.id
- an Id
objectiveBankId
- the Id
of an objective bank true
if this id
is a parent of
objectiveBankId,
false
otherwiseNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- id
or
objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getParentObjectiveBankIds(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given objective bank.objectiveBankId
- the Id
of an objective bank Ids
of the objective bankNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ObjectiveBankList getParentObjectiveBanks(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
objectiveBankId
- the Id
of an objective bankNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isAncestorOfObjectiveBank(Id id, Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is an ancestor of an objective bank.id
- an Id
objectiveBankId
- the Id
of an objective bank true
if this id
is an ancestor
of objectiveBankId,
false
otherwiseNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- id
or
objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
boolean hasChildObjectiveBanks(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
objectiveBankId
- the Id
of an objective bank true
if the objectiveBankId
has
children, false
otherwiseNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isChildOfObjectiveBank(Id id, Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
objectiveBankId
- the Id
of an objective bank true
if the id
is a child of
objectiveBankId,
false
otherwiseNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- id
or
objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getChildObjectiveBankIds(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given objective bank.objectiveBankId
- the Id
to queryNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ObjectiveBankList getChildObjectiveBanks(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
objectiveBankId
- the Id
to queryNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isDescendantOfObjectiveBank(Id id, Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a descendant of an objective bank.id
- an Id
objectiveBankId
- the Id
of an objective bank true
if the id
is a descendant
of the objectiveBankId,
false
otherwiseNotFoundException
- objectiveBankId
is
not foundNullArgumentException
- id
or
objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
is not found return false.
Node getObjectiveBankNodeIds(Id objectiveBankId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
objectiveBankId
- 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
- objectiveBankId
not
foundNullArgumentException
- objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ObjectiveBankNode getObjectiveBankNodes(Id objectiveBankId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
objectiveBankId
- 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
- objectiveBankId
not
foundNullArgumentException
- objectiveBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.