public interface ElementAdminSession extends OsidSession
This session provides methods to add and remove elements from a chain.
Modifier and Type | Method and Description |
---|---|
void |
addElement(Id chainId,
Id id)
Adds an element to a chain,
|
void |
addElements(Id chainId,
IdList ids)
Adds a list of ordered elements to a chain.
|
boolean |
canManageElements()
Tests if this user can add and remove eleemnts to a chain.
|
Antimatroid |
getAntimatroid()
Gets the
Antimatroid associated with this session. |
Id |
getAntimatroidId()
Gets the
Antimatroid Id associated with
this session. |
void |
removeElement(Id chainId,
Id id)
Removes an element from a chain.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAntimatroidId()
Antimatroid
Id
associated with
this session. Antimatroid Id
associated with this sessionmandatory
- This method must be implemented. Antimatroid getAntimatroid() throws OperationFailedException, PermissionDeniedException
Antimatroid
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageElements()
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 managing elements is not authorized,
true
otherwisemandatory
- This method must be implemented. void addElement(Id chainId, Id id) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
chainId
- the Id
of the chainid
- the Id
of the element to addAlreadyExistsException
- id
already in
chainId
NotFoundException
- chainId
or id
not foundNullArgumentException
- chainId
or
id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void addElements(Id chainId, IdList ids) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
chainId
- the Id
of the chainids
- the Ids
of the elements to addAlreadyExistsException
- an id
already
in chainId
NotFoundException
- chainId
or an
id
not foundNullArgumentException
- chainIds
or
id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeElement(Id chainId, Id id) throws NotFoundException, OperationFailedException, PermissionDeniedException
chainId
- the Id
of the chainid
- the Id
of the element to removeNotFoundException
- chainId
or id
not found, or id
is not in
chainId
NullArgumentException
- chainId
or
id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.