public interface GradebookHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Gradebook
objects. Each node in the hierarchy is a unique
Gradebook.
The hierarchy may be traversed recursively to establish
the tree structure through getParentGradebooks()
and
getChildGradebooks().
To relate these Ids
to
another OSID, getGradebookNodes()
can be used for
retrievals that can be used for bulk lookups in other OSIDs. Any
Gradebook
available in the Gradebooking 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 getParentGradebooks()
or getChildGradebooks()
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 |
canAccessGradebookHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildGradebookIds(Id gradebookId)
Gets the child
Ids of the given gradebook. |
GradebookList |
getChildGradebooks(Id gradebookId)
Gets the children of the given gradebook.
|
Hierarchy |
getGradebookHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getGradebookHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getGradebookNodeIds(Id gradebookId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given gradebook.
|
GradebookNode |
getGradebookNodes(Id gradebookId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given gradebook.
|
IdList |
getParentGradebookIds(Id gradebookId)
Gets the parent
Ids of the given gradebook. |
GradebookList |
getParentGradebooks(Id gradebookId)
Gets the parents of the given gradebook.
|
IdList |
getRootGradebookIds()
Gets the root gradebook
Ids in this hierarchy. |
GradebookList |
getRootGradebooks()
Gets the root gradebooks in this gradebook hierarchy.
|
boolean |
hasChildGradebooks(Id gradebookId)
Tests if a gradebook has any children.
|
boolean |
hasParentGradebooks(Id gradebookId)
Tests if the
Gradebook has any parents. |
boolean |
isAncestorOfGradebook(Id id,
Id gradebookId)
Tests if an
Id is an ancestor of a gradebook. |
boolean |
isChildOfGradebook(Id id,
Id gradebookId)
Tests if a gradebook is a direct child of another.
|
boolean |
isDescendantOfGradebook(Id id,
Id gradebookId)
Tests if an
Id is a descendant of a gradebook. |
boolean |
isParentOfGradebook(Id id,
Id gradebookId)
Tests if an
Id is a direct parent of a gradebook. |
void |
useComparativeGradebookView()
The returns from the gradebook methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryGradebookView()
A complete view of the
Hierarchy returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getGradebookHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getGradebookHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAccessGradebookHierarchy()
PERMISSION_DENIED.
This is intended as a hint to an
an application that may not offer hierrachy traversal operations to
unauthorized users. false
if hierarchy traversal methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeGradebookView()
mandatory
- This method is must be implemented. void usePlenaryGradebookView()
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 getRootGradebookIds() throws OperationFailedException, PermissionDeniedException
Ids
in this hierarchy. Ids
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. GradebookList getRootGradebooks() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. boolean hasParentGradebooks(Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Gradebook
has any parents.gradebookId
- the Id
of a gradebook true
if the gradebook has parents, false
otherwiseNotFoundException
- gradebookId
is not
foundNullArgumentException
- gradebookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isParentOfGradebook(Id id, Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a direct parent of a gradebook.id
- an Id
gradebookId
- the Id
of a gradebook true
if this id
is a parent of
gradebookId,
false
otherwiseNotFoundException
- gradebookId
is not
foundNullArgumentException
- id
or
gradebookId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getParentGradebookIds(Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given gradebook.gradebookId
- the Id
of a gradebook Ids
of the gradebookNotFoundException
- gradebookId
is not
foundNullArgumentException
- gradebookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. GradebookList getParentGradebooks(Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
gradebookId
- the Id
of a gradebookNotFoundException
- gradebookId
is not
foundNullArgumentException
- gradebookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isAncestorOfGradebook(Id id, Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is an ancestor of a gradebook.id
- an Id
gradebookId
- the Id
of a gradebook true
if this id
is an ancestor
of gradebookId,
false
otherwiseNotFoundException
- gradebookId
is not
foundNullArgumentException
- id
or
gradebookId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
boolean hasChildGradebooks(Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
gradebookId
- the Id
of a gradebook true
if the gradebookId
has
children, false
otherwiseNotFoundException
- gradebookId
is not
foundNullArgumentException
- gradebookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isChildOfGradebook(Id id, Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
gradebookId
- the Id
of a gradebook true
if the id
is a child of
gradebookId,
false
otherwiseNotFoundException
- gradebookId
is not
foundNullArgumentException
- id
or
gradebookId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getChildGradebookIds(Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given gradebook.gradebookId
- the Id
to queryNotFoundException
- gradebookId
is not
foundNullArgumentException
- gradebookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. GradebookList getChildGradebooks(Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
gradebookId
- the Id
to queryNotFoundException
- gradebookId
is not
foundNullArgumentException
- gradebookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isDescendantOfGradebook(Id id, Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a descendant of a gradebook.id
- an Id
gradebookId
- the Id
of a gradebook true
if the id
is a descendant
of the gradebookId,
false
otherwiseNotFoundException
- gradebookId
is not
foundNullArgumentException
- id
or
gradebookId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
is not found return false.
Node getGradebookNodeIds(Id gradebookId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
gradebookId
- 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
- gradebookId
is not
foundNullArgumentException
- gradebookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. GradebookNode getGradebookNodes(Id gradebookId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
gradebookId
- 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
- gradebookId
is not
foundNullArgumentException
- gradebookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.