public interface SubjectHierarchyDesignSession extends OsidSession
This session defines methods for managing a hierarchy of Subject
objects. Each node in the hierarchy is a unique Subject.
Modifier and Type | Method and Description |
---|---|
void |
addChildSubject(Id subjectId,
Id childId)
Adds a child to a subject.
|
void |
addRootSubject(Id subjectId)
Adds a root subject.
|
boolean |
canModifySubjectHierarchy()
Tests if this user can change the hierarchy.
|
Hierarchy |
getSubjectHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getSubjectHierarchyId()
Gets the hierarchy
Id associated with this session. |
void |
removeChildSubject(Id subjectId,
Id childId)
Removes a child from a subject.
|
void |
removeChildSubjects(Id subjectId)
Removes all children from a subject.
|
void |
removeRootSubject(Id subjectId)
Removes a root subject.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getSubjectHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getSubjectHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canModifySubjectHierarchy()
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 addRootSubject(Id subjectId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
subjectId
- the Id
of a subjectAlreadyExistsException
- subjectId
is
already in hierarchyNotFoundException
- subjectId
not foundNullArgumentException
- subjectId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeRootSubject(Id subjectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
subjectId
- the Id
of a subjectNotFoundException
- subjectId
not foundNullArgumentException
- subjectId
is
null
OperationFailedException
- the root subjectsPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void addChildSubject(Id subjectId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
subjectId
- the Id
of a subjectchildId
- the Id
of the new childAlreadyExistsException
- subjectId
is
already a parent of childId
NotFoundException
- subjectId
or
childId
not foundNullArgumentException
- subjectId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildSubject(Id subjectId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException
subjectId
- the Id
of a subjectchildId
- the Id
of the new childNotFoundException
- subjectId
not a
parent of childId
NullArgumentException
- subjectId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildSubjects(Id subjectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
subjectId
- the Id
of a subjectNotFoundException
- subjectId
not foundNullArgumentException
- subjectId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.