public interface InquestHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Inquest
objects. Each node in the hierarchy is a unique
Inquest.
The hierarchy may be traversed recursively to establish
the tree structure through getParentInquests()
and
getChildInquests().
To relate these Ids
to another
OSID, getInquestNodes()
can be used for retrievals that can
be used for bulk lookups in other OSIDs. Any Inquest
available in the Control OSID is known to this hierarchy but does not
appear in the hierarchy traversal until added as a root inquest or a child
of another inquest.
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 getParentInquests()
or getChildInquests()
in lieu of a PERMISSION_DENIED
error that may disrupt the
traversal through authorized inquiryways.
This session defines views that offer differing behaviors when retrieving multiple objects.
Modifier and Type | Method and Description |
---|---|
boolean |
canAccessInquestHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildInquestIds(Id inquestId)
Gets the child
Ids of the given inquest. |
InquestList |
getChildInquests(Id inquestId)
Gets the children of the given inquest.
|
Hierarchy |
getInquestHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getInquestHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getInquestNodeIds(Id inquestId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given inquest.
|
InquestNode |
getInquestNodes(Id inquestId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given inquest.
|
IdList |
getParentInquestIds(Id inquestId)
Gets the parent
Ids of the given inquest. |
InquestList |
getParentInquests(Id inquestId)
Gets the parents of the given inquest.
|
IdList |
getRootInquestIds()
Gets the root inquest
Ids in this hierarchy. |
InquestList |
getRootInquests()
Gets the root inquest in the inquest hierarchy.
|
boolean |
hasChildInquests(Id inquestId)
Tests if an inquest has any children.
|
boolean |
hasParentInquests(Id inquestId)
Tests if the
Inquest has any parents. |
boolean |
isAncestorOfInquest(Id id,
Id inquestId)
Tests if an
Id is an ancestor of an inquest. |
boolean |
isChildOfInquest(Id id,
Id inquestId)
Tests if an inquest is a direct child of another.
|
boolean |
isDescendantOfInquest(Id id,
Id inquestId)
Tests if an
Id is a descendant of an inquest. |
boolean |
isParentOfInquest(Id id,
Id inquestId)
Tests if an
Id is a direct parent of inquest. |
void |
useComparativeInquestView()
The returns from the inquest methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryInquestView()
A complete view of the
Inquests returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getInquestHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getInquestHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAccessInquestHierarchy()
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 useComparativeInquestView()
mandatory
- This method is must be implemented. void usePlenaryInquestView()
Inquests
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 getRootInquestIds() throws OperationFailedException, PermissionDeniedException
Ids
in this hierarchy. Ids
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InquestList getRootInquests() throws OperationFailedException, PermissionDeniedException
Ids
are known
to the hierarchy, an orphan does not appear in the hierarchy unless
explicitly added as a root inquest or child of another inquest.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. boolean hasParentInquests(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Inquest
has any parents.inquestId
- an inquest Id
true
if the inquest has parents, f alse
otherwiseNotFoundException
- inquestId
is not
foundNullArgumentException
- inquestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isParentOfInquest(Id id, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a direct parent of inquest.id
- an Id
inquestId
- the Id
of an inquest true
if this id
is a parent of
inquestId,
f alse
otherwiseNotFoundException
- inquestId
is not
foundNullArgumentException
- id
or
inquestId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getParentInquestIds(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given inquest.inquestId
- an inquest Id
Ids
of the inquestNotFoundException
- inquestId
is not
foundNullArgumentException
- inquestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InquestList getParentInquests(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquestId
- the Id
to queryNotFoundException
- inquestId
not foundNullArgumentException
- inquestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isAncestorOfInquest(Id id, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is an ancestor of an inquest.id
- an Id
inquestId
- the Id
of an inquest tru
e if this id
is an ancestor
of inquestId,
false
otherwiseNotFoundException
- inquestId
not foundNullArgumentException
- inquestId
or
id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
boolean hasChildInquests(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquestId
- an inquest Id
true
if the inquestId
has
children, false
otherwiseNotFoundException
- inquestId
not foundNullArgumentException
- inquestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isChildOfInquest(Id id, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
inquestId
- the Id
of an inquest true
if the id
is a child of
inquestId,
false
otherwiseNotFoundException
- inquestId
not foundNullArgumentException
- id
or
inquestId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getChildInquestIds(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given inquest.inquestId
- the Id
to queryNotFoundException
- inquestId
not foundNullArgumentException
- inquestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InquestList getChildInquests(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquestId
- the Id
to queryNotFoundException
- inquestId
not foundNullArgumentException
- inquestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isDescendantOfInquest(Id id, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a descendant of an inquest.id
- an Id
inquestId
- the Id
of an inquest true
if the id
is a descendant
of the inquestId,
false
otherwiseNotFoundException
- inquestId
not foundNullArgumentException
- id
or
inquestId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
is not found return false.
Node getInquestNodeIds(Id inquestId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquestId
- the Id
to queryancestorLevels
- the maximum number of ancestor levels to
include. A value of 0 returns no parents in the inquest.descendantLevels
- the maximum number of descendant levels to
include. A value of 0 returns no children in the inquest.includeSiblings
- true
to include the siblings of
the given inquest, false
to omit the siblingsNotFoundException
- inquestId
not foundNullArgumentException
- inquestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InquestNode getInquestNodes(Id inquestId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquestId
- the Id
to queryancestorLevels
- the maximum number of ancestor levels to
include. A value of 0 returns no parents in the hierarchy.descendantLevels
- the maximum number of descendant levels to
include. A value of 0 returns no children in the hierarchy.includeSiblings
- true
to include the siblings of
the given inquest, false
to omit the siblingsNotFoundException
- inquestId
not foundNullArgumentException
- inquestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.