public interface TermHierarchyDesignSession extends OsidSession
This session defines methods for managing a hierarchy of Term
objects. Each node in the hierarchy is a unique Term.
Modifier and Type | Method and Description |
---|---|
void |
addChildTerm(Id termId,
Id childId)
Adds a child to a term.
|
void |
addRootTerm(Id termId)
Adds a root term.
|
boolean |
canModifyTermHierarchy()
Tests if this user can change the hierarchy.
|
Hierarchy |
getTermHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getTermHierarchyId()
Gets the hierarchy
Id associated with this session. |
void |
removeChildTerm(Id termId,
Id childId)
Removes a child from a term.
|
void |
removeChildTerms(Id termId)
Removes all children from a term.
|
void |
removeRootTerm(Id termId)
Removes a root term.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getTermHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getTermHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canModifyTermHierarchy()
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 addRootTerm(Id termId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
termId
- the Id
of a termAlreadyExistsException
- termId
is
already in hierarchyNotFoundException
- termId
not foundNullArgumentException
- termId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeRootTerm(Id termId) throws NotFoundException, OperationFailedException, PermissionDeniedException
termId
- the Id
of a termNotFoundException
- termId
not a root
nodeNullArgumentException
- termId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void addChildTerm(Id termId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
termId
- the Id
of a termchildId
- the Id
of the new childAlreadyExistsException
- termId
is
already a parent of childId
NotFoundException
- termId
or
childId
not foundNullArgumentException
- termId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildTerm(Id termId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException
termId
- the Id
of a termchildId
- the Id
of the new childNotFoundException
- termId
not a parent
of childId
NullArgumentException
- termId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildTerms(Id termId) throws NotFoundException, OperationFailedException, PermissionDeniedException
termId
- the Id
of a termNotFoundException
- termId is
not in
hierarchyNullArgumentException
- termId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.