public interface HierarchyDesignSession extends OsidSession
This session provides methods to manage a hierarchy. Each node is
expressed as an OSID Id
that represents an external object.
The hierarchy only expresses relationships among these Ids. However,
changing the hierarchy may have implications, such as inherited data, in
the associated OSID.
Modifier and Type | Method and Description |
---|---|
void |
addChild(Id id,
Id childId)
Adds a child to a
Id. |
void |
addRoot(Id id)
Adds a root node.
|
boolean |
canModifyHierarchy()
Tests if this user can change the hierarchy.
|
Hierarchy |
getHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getHierarchyId()
Gets the hierarchy
Id associated with this session. |
void |
removeChild(Id id,
Id childId)
Removes a child
from an Id. |
void |
removeChildren(Id id)
Removes all children
from an Id. |
void |
removeRoot(Id id)
Removes a root node.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canModifyHierarchy()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations to an
unauthorized user. false
if changing this hierarchy is not
authorized, true
otherwisemandatory
- This method must be implemented. void addRoot(Id id) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
id
- the Id
of the nodeAlreadyExistsException
- id
is already
in hierarchyNotFoundException
- id
not foundNullArgumentException
- id
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void addChild(Id id, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id.
id
- the Id
of the nodechildId
- the Id
of the new childAlreadyExistsException
- childId
is
already a child of id
NotFoundException
- id
or childId
not foundNullArgumentException
- id
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeRoot(Id id) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- the Id
of the nodeNotFoundException
- id
was not found or
not in hierarchyNullArgumentException
- id
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChild(Id id, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException
from an Id.
id
- the Id
of the nodechildId
- the Id
of the child to removeNotFoundException
- id
or childId
was not found or childId
is not a child
of id
NullArgumentException
- id
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildren(Id id) throws NotFoundException, OperationFailedException, PermissionDeniedException
from an Id.
id
- the Id
of the nodeNotFoundException
- an node identified by the given
Id
was not foundNullArgumentException
- id
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.