public interface ChecklistHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Checklist
objects. Each node in the hierarchy is a unique
Checklist.
The hierarchy may be traversed recursively to establish
the tree structure through getParentChecklists()
and
getChildChecklists().
To relate these Ids
to
another OSID, getChecklistNodes()
can be used for
retrievals that can be used for bulk lookups in other OSIDs. Any
Checklist
available in the Todoing 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 getParentChecklists()
or getChildChecklists()
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 |
canAccessChecklistHierarchy()
Tests if this user can perform hierarchy queries.
|
Hierarchy |
getChecklistHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getChecklistHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getChecklistNodeIds(Id checklistId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given checklist.
|
ChecklistNode |
getChecklistNodes(Id checklistId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given checklist.
|
IdList |
getChildChecklistIds(Id checklistId)
Gets the child
Ids of the given checklist. |
ChecklistList |
getChildChecklists(Id checklistId)
Gets the child checklists of the given
id. |
IdList |
getParentChecklistIds(Id checklistId)
Gets the parent
Ids of the given checklist. |
ChecklistList |
getParentChecklists(Id checklistId)
Gets the parent checklists of the given
id. |
IdList |
getRootChecklistIds()
Gets the root checklist
Ids in this hierarchy. |
ChecklistList |
getRootChecklists()
Gets the root checklists in the checklist hierarchy.
|
boolean |
hasChildChecklists(Id checklistId)
Tests if a checklist has any children.
|
boolean |
hasParentChecklists(Id checklistId)
Tests if the
Checklist has any parents. |
boolean |
isAncestorOfChecklist(Id id,
Id checklistId)
Tests if an
Id is an ancestor of a checklist. |
boolean |
isChildOfChecklist(Id id,
Id checklistId)
Tests if a checklist is a direct child of another.
|
boolean |
isDescendantOfChecklist(Id id,
Id checklistId)
Tests if an
Id is a descendant of a checklist. |
boolean |
isParentOfChecklist(Id id,
Id checklistId)
Tests if an
Id is a direct parent of checklist. |
void |
useComparativeChecklistView()
The returns from the checklist methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryChecklistView()
A complete view of the
Checklist returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getChecklistHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getChecklistHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAccessChecklistHierarchy()
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 useComparativeChecklistView()
mandatory
- This method is must be implemented. void usePlenaryChecklistView()
Checklist
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 getRootChecklistIds() throws OperationFailedException, PermissionDeniedException
Ids
in this hierarchy. Ids
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChecklistList getRootChecklists() 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 hasParentChecklists(Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Checklist
has any parents.checklistId
- a checklist Id
true
if the checklist has parents, f
alse
otherwiseNotFoundException
- checklistId
is not
foundNullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isParentOfChecklist(Id id, Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a direct parent of checklist.id
- an Id
checklistId
- the Id
of a checklist true
if this id
is a parent of
checklistId,
f alse
otherwiseNotFoundException
- checklistId
is not
foundNullArgumentException
- id
or
checklistId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getParentChecklistIds(Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given checklist.checklistId
- a checklist Id
Ids
of the checklistNotFoundException
- checklistId
is not
foundNullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChecklistList getParentChecklists(Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id.
checklistId
- the Id
of the Checklist
to query id
NotFoundException
- a Checklist
identified by Id is
not foundNullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isAncestorOfChecklist(Id id, Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is an ancestor of a checklist.id
- an Id
checklistId
- the Id
of a checklist tru
e if this id
is an ancestor
of checklistId,
false
otherwiseNotFoundException
- checklistId
is not
foundNullArgumentException
- id
or
checklistId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
boolean hasChildChecklists(Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
checklistId
- a checklist Id
true
if the checklistId
has
children, false
otherwiseNotFoundException
- checklistId
is not
foundNullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isChildOfChecklist(Id id, Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
checklistId
- the Id
of a checklist true
if the id
is a child of
checklistId,
false
otherwiseNotFoundException
- checklistId
is not
foundNullArgumentException
- id
or
checklistId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getChildChecklistIds(Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given checklist.checklistId
- the Id
to queryNotFoundException
- checklistId
is not
foundNullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChecklistList getChildChecklists(Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id.
checklistId
- the Id
of the Checklist
to query id
NotFoundException
- a Checklist
identified by Id is
not foundNullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isDescendantOfChecklist(Id id, Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a descendant of a checklist.id
- an Id
checklistId
- the Id
of a checklist true
if the id
is a descendant
of the checklistId,
false
otherwiseNotFoundException
- checklistId
is not
foundNullArgumentException
- id
or
checklistId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
is not found return false.
Node getChecklistNodeIds(Id checklistId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
checklistId
- 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
- checklistId
is not
foundNullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChecklistNode getChecklistNodes(Id checklistId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
checklistId
- 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
- checklistId
is not
foundNullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.