public interface ConfigurationHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Configuration
objects. Each node in the hierarchy is a unique
Configuration.
The hierarchy may be traversed recursively
to establish the tree structure through getParentConfigurations()
and getChildConfigurations().
To relate these
Ids
to another OSID, getConfigurationNodes()
can be used for retrievals that can be used for bulk lookups in other
OSIDs. Any Configuration
available in the Configuration
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 getParentConfigurationss()
or
getChildConfigurations()
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 |
canAccessConfigurationHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildConfigurationIds(Id configurationId)
Gets the child
Ids of the given configuration. |
ConfigurationList |
getChildConfigurations(Id configurationId)
Gets the children of the given configuration.
|
Hierarchy |
getConfigurationHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getConfigurationHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getConfigurationNodeIds(Id configurationId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given configuration.
|
ConfigurationNode |
getConfigurationNodes(Id configurationId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given configuration.
|
IdList |
getParentConfigurationIds(Id configurationId)
Gets the parent
Ids of the given configuration. |
ConfigurationList |
getParentConfigurations(Id configurationId)
Gets the parents of the given configuration.
|
IdList |
getRootConfigurationIds()
Gets the root configuration
Ids in this hierarchy. |
ConfigurationList |
getRootConfigurations()
Gets the root configurations in the configuration hierarchy.
|
boolean |
hasChildConfigurations(Id configurationId)
Tests if a configuration has any children.
|
boolean |
hasParentConfigurations(Id configurationId)
Tests if the
Configuration has any parents. |
boolean |
isAncestorOfConfiguration(Id id,
Id configurationId)
Tests if an Id is an ancestor of a configuration.
|
boolean |
isChildOfConfiguration(Id id,
Id configurationId)
Tests if a node is a direct child of another.
|
boolean |
isDescendantOfConfiguration(Id id,
Id configurationId)
Tests if an
Id is a descendant of a configuration. |
boolean |
isParentOfConfiguration(Id id,
Id configurationId)
Tests if an
Id is a direct parent of configuration. |
void |
useComparativeConfigurationView()
The returns from the configuration methods may omit or translate
elements based on this session, such as authorization, and not result
in an error.
|
void |
usePlenaryConfigurationView()
A complete view of the
Configuration returns is
desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getConfigurationHierarchyId()
Id
associated with this session. Id
associated with this
sessionmandatory
- This method must be implemented. Hierarchy getConfigurationHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAccessConfigurationHierarchy()
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 useComparativeConfigurationView()
mandatory
- This method is must be implemented. void usePlenaryConfigurationView()
Configuration
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 getRootConfigurationIds() throws OperationFailedException, PermissionDeniedException
Ids
in this hierarchy. Ids
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ConfigurationList getRootConfigurations() 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 hasParentConfigurations(Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Configuration
has any parents.configurationId
- a configuration Id true
if the configuration has parents, f
alse
otherwiseNotFoundException
- configurationId
is
not foundNullArgumentException
- configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isParentOfConfiguration(Id id, Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a direct parent of configuration.id
- an Id
configurationId
- a configuration Id true
if this id
is a parent of
configurationId,
f alse
otherwiseNotFoundException
- configurationId
is
not foundNullArgumentException
- id
or
configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getParentConfigurationIds(Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given configuration.configurationId
- a configuration IdNotFoundException
- configurationId
is
not foundNullArgumentException
- configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ConfigurationList getParentConfigurations(Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
configurationId
- the Id
to queryNotFoundException
- configurationId
not
foundNullArgumentException
- configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isAncestorOfConfiguration(Id id, Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
configurationId
- the Id
of a configuration tru
e if this id
is an ancestor
of configurationId,
false
otherwiseNotFoundException
- configurationId
is
not foundNullArgumentException
- id
or
configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
boolean hasChildConfigurations(Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
configurationId
- a configurationId
true
if the configurationId
has
children, false
otherwiseNotFoundException
- configurationId
not
foundNullArgumentException
- configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isChildOfConfiguration(Id id, Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
configurationId
- the Id
of a configuration true
if the id
is a child of
configurationId,
false
otherwiseNotFoundException
- configurationId
not
foundNullArgumentException
- id
or
configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getChildConfigurationIds(Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given configuration.configurationId
- the Id
to queryNotFoundException
- configurationId
is
not foundNullArgumentException
- configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ConfigurationList getChildConfigurations(Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
configurationId
- the Id
to queryNotFoundException
- configurationId
not
foundNullArgumentException
- configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isDescendantOfConfiguration(Id id, Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a descendant of a configuration.id
- an Id
configurationId
- the Id
of a configuration true
if the id
is a descendant
of the configurationId,
false
otherwiseNotFoundException
- configurationId
is
not foundNullArgumentException
- id
or
configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
is not found return false.
Node getConfigurationNodeIds(Id configurationId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
configurationId
- 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
- configurationId
not
foundNullArgumentException
- configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ConfigurationNode getConfigurationNodes(Id configurationId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
configurationId
- 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
- configurationId
not
foundNullArgumentException
- configurationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.