public interface CourseCatalogHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
CourseCatalog
objects. Each node in the hierarchy is a unique
CourseCatalog.
The hierarchy may be traversed recursively
to establish the tree structure through getParentCourseCatalogs()
and getChildCourseCatalogs().
To relate these
Ids
to another OSID, getCourseCatalogNodes()
can be used for retrievals that can be used for bulk lookups in other
OSIDs. Any CourseCatalog
available in the Course 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 getParentCourseCatalogs()
or
getChildCourseCatalog()
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 |
canAccessCourseCatalogHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildCourseCatalogIds(Id courseCatalogId)
Gets the child
Ids of the given course catalog. |
CourseCatalogList |
getChildCourseCatalogs(Id courseCatalogId)
Gets the children of the given course catalog.
|
Hierarchy |
getCourseCatalogHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getCourseCatalogHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getCourseCatalogNodeIds(Id courseCatalogId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given course catalog.
|
CourseCatalogNode |
getCourseCatalogNodes(Id courseCatalogId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given course catalog.
|
IdList |
getParentCourseCatalogIds(Id courseCatalogId)
Gets the parent
Ids of the given course catalog. |
CourseCatalogList |
getParentCourseCatalogs(Id courseCatalogId)
Gets the parents of the given course catalog.
|
IdList |
getRootCourseCatalogIds()
Gets the root course catalog
Ids in this hierarchy. |
CourseCatalogList |
getRootCourseCatalogs()
Gets the root course catalogs in the course catalog hierarchy.
|
boolean |
hasChildCourseCatalogs(Id courseCatalogId)
Tests if a course catalog has any children.
|
boolean |
hasParentCourseCatalogs(Id courseCatalogId)
Tests if the
CourseCatalog has any parents. |
boolean |
isAncestorOfCourseCatalog(Id id,
Id courseCatalogId)
Tests if an
Id is an ancestor of a course catalog. |
boolean |
isChildOfCourseCatalog(Id id,
Id courseCatalogId)
Tests if a course catalog is a direct child of another.
|
boolean |
isDescendantOfCourseCatalog(Id id,
Id courseCatalogId)
Tests if an
Id is a descendant of a course catalog. |
boolean |
isParentOfCourseCatalog(Id id,
Id courseCatalogId)
Tests if an
Id is a direct parent of course catalog. |
void |
useComparativeCourseCatalogView()
The returns from the course catalog methods may omit or translate
elements based on this session, such as authorization, and not result
in an error.
|
void |
usePlenaryCourseCatalogView()
A complete view of the
CourseCatalogs returns is
desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCourseCatalogHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getCourseCatalogHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAccessCourseCatalogHierarchy()
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 useComparativeCourseCatalogView()
mandatory
- This method is must be implemented. void usePlenaryCourseCatalogView()
CourseCatalogs
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 getRootCourseCatalogIds() throws OperationFailedException, PermissionDeniedException
Ids
in this hierarchy. Ids
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CourseCatalogList getRootCourseCatalogs() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. boolean hasParentCourseCatalogs(Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CourseCatalog
has any parents.courseCatalogId
- a catalog Id
true
if the catalog has parents, f alse
otherwiseNotFoundException
- courseCatalogId
is
not foundNullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isParentOfCourseCatalog(Id id, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a direct parent of course catalog.id
- an Id
courseCatalogId
- the Id
of a catalog true
if this id
is a parent of
courseCatalogId,
f alse
otherwiseNotFoundException
- courseCatalogId
is
not foundNullArgumentException
- id
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getParentCourseCatalogIds(Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given course catalog.courseCatalogId
- a catalog Id
NotFoundException
- courseCatalogId
is
not foundNullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CourseCatalogList getParentCourseCatalogs(Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseCatalogId
- the Id
to queryNotFoundException
- courseCatalogId
not
foundNullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isAncestorOfCourseCatalog(Id id, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is an ancestor of a course catalog.id
- an Id
courseCatalogId
- the Id
of a catalog tru
e if this id
is an ancestor
of courseCatalogId,
false
otherwiseNotFoundException
- courseCatalogId
not
foundNullArgumentException
- courseCatalogId
or id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
boolean hasChildCourseCatalogs(Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseCatalogId
- a course catalog Id
true
if the courseCatalogId
has
children, false
otherwiseNotFoundException
- courseCatalogId
not
foundNullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isChildOfCourseCatalog(Id id, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
courseCatalogId
- the Id
of a catalog true
if the id
is a child of
courseCatalogId,
false
otherwiseNotFoundException
- courseCatalogId
not
foundNullArgumentException
- id
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getChildCourseCatalogIds(Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given course catalog.courseCatalogId
- the Id
to queryNotFoundException
- courseCatalogId
not
foundNullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CourseCatalogList getChildCourseCatalogs(Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseCatalogId
- the Id
to queryNotFoundException
- courseCatalogId
not
foundNullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isDescendantOfCourseCatalog(Id id, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a descendant of a course catalog.id
- an Id
courseCatalogId
- the Id
of a catalog true
if the id
is a descendant
of the courseCatalogId,
false
otherwiseNotFoundException
- courseCatalogId
not
foundNullArgumentException
- id
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
is not found return false.
Node getCourseCatalogNodeIds(Id courseCatalogId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseCatalogId
- 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
- courseCatalogId
not
foundNullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CourseCatalogNode getCourseCatalogNodes(Id courseCatalogId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseCatalogId
- 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
- courseCatalogId
not
foundNullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.