public interface QualifierHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Qualifier
objects. Each node in the hierarchy is a unique
Qualifier.
The hierarchy may be traversed recursively to establish
the tree structure through getParentQualifiers()
and
getChildQualifiers().
To relate these Ids
to
another OSID, getQualifierNodes()
can be used for
retrievals that can be used for bulk lookups in other OSIDs. Any
Qualifier
available in the Authorization 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 getParentQualifiers()
or getChildQualifiers()
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 |
canAccessQualifierHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildQualifierIds(Id qualifierId)
Gets the child
Ids of the given qualifier. |
QualifierList |
getChildQualifiers(Id qualifierId)
Gets the children of the given qualifier.
|
IdList |
getParentQualifierIds(Id qualifierId)
Gets the parent
Ids of the given qualifier. |
QualifierList |
getParentQualifiers(Id qualifierId)
Gets the parents of the given qualifier.
|
Hierarchy |
getQualifierHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getQualifierHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getQualifierNodeIds(Id qualifierId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given qualifier.
|
QualifierNode |
getQualifierNodes(Id qualifierId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given qualifier.
|
IdList |
getRootQualifierIds()
Gets the root qualifier
Ids in this hierarchy. |
QualifierList |
getRootQualifiers()
Gets the root qualifiers in this qualifier hierarchy.
|
boolean |
hasChildQualifiers(Id qualifierId)
Tests if a qualifier has any children.
|
boolean |
hasParentQualifiers(Id qualifierId)
Tests if the
Qualifier has any parents. |
boolean |
isAncestorOfQualifier(Id id,
Id qualifierId)
Tests if an
Id is an ancestor of a qualifier. |
boolean |
isChildOfQualifier(Id id,
Id qualifierId)
Tests if a node is a direct child of another.
|
boolean |
isDescendantOfQualifier(Id id,
Id qualifierId)
Tests if an
Id is a descendant of a qualifier. |
boolean |
isParentOfQualifier(Id id,
Id qualifierId)
Tests if an
Id is a direct parent of qualifier. |
void |
useComparativeQualifierView()
The returns from the qualifier methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryQualifierView()
A complete view of the
Hierarchy returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getQualifierHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getQualifierHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAccessQualifierHierarchy()
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 useComparativeQualifierView()
mandatory
- This method is must be implemented. void usePlenaryQualifierView()
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 getRootQualifierIds() throws OperationFailedException, PermissionDeniedException
Ids
in this hierarchy. Ids
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. QualifierList getRootQualifiers() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. boolean hasParentQualifiers(Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Qualifier
has any parents.qualifierId
- a qualifier Id
true
if the qualifier has parents, false
otherwiseNotFoundException
- qualifierId
is not
foundNullArgumentException
- qualifierId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isParentOfQualifier(Id id, Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a direct parent of qualifier.id
- an Id
qualifierId
- the Id
of a qualifier true
if this id
is a parent of
qualifierId,
false
otherwiseNotFoundException
- qualifierId
is not
foundNullArgumentException
- id
or
qualifierId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getParentQualifierIds(Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given qualifier.qualifierId
- a qualifier Id
Ids
of the qualifierNotFoundException
- qualifierId
is not
foundNullArgumentException
- qualifierId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. QualifierList getParentQualifiers(Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
qualifierId
- a qualifier Id
NotFoundException
- qualifierId
is not
foundNullArgumentException
- qualifierId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isAncestorOfQualifier(Id id, Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is an ancestor of a qualifier.id
- an Id
qualifierId
- the Id
of a qualifier true
if this id
is an ancestor
of qualifierId,
false
otherwiseNotFoundException
- qualifierId
not
foundNullArgumentException
- qualifierId
or
id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
boolean hasChildQualifiers(Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
qualifierId
- a qualifier Id
true
if the qualifierId
has
children, false
otherwiseNotFoundException
- qualifierId
not
foundNullArgumentException
- qualifierId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isChildOfQualifier(Id id, Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
qualifierId
- the Id
of a qualifier true
if the id
is a child of
qualifierId,
false
otherwiseNotFoundException
- qualifierId
not
foundNullArgumentException
- qualifierId
or
id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getChildQualifierIds(Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given qualifier.qualifierId
- the Id
to queryNotFoundException
- qualifierId
is not
foundNullArgumentException
- qualifierId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. QualifierList getChildQualifiers(Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
qualifierId
- the Id
to queryNotFoundException
- qualifierId
is not
foundNullArgumentException
- qualifierId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isDescendantOfQualifier(Id id, Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a descendant of a qualifier.id
- an Id
qualifierId
- the Id
of a qualifier true
if the id
is a descendant
of the qualifierId,
false
otherwiseNotFoundException
- qualifierId
not
foundNullArgumentException
- qualifierId
or
id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
is not found return false.
Node getQualifierNodeIds(Id qualifierId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
qualifierId
- 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
- functionId
is not
foundNullArgumentException
- functionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. QualifierNode getQualifierNodes(Id qualifierId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
qualifierId
- 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
- functionId
is not
foundNullArgumentException
- functionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.