public interface ResourceAgentAssignmentSession extends OsidSession
This session provides methods to re-assign Resource to
Agents. A Resource may be associated with
multiple Agents. An Agent may map to only
one Resource.
| Modifier and Type | Method and Description |
|---|---|
void |
assignAgentToResource(Id agentId,
Id resourceId)
Adds an existing
Agent to a Resource. |
boolean |
canAssignAgents()
Tests if this user can alter resource/agent mappings.
|
boolean |
canAssignAgentsToResource(Id resourceId)
Tests if this user can alter resource/agent mappings.
|
Bin |
getBin()
Gets the
Bin associated with this session. |
Id |
getBinId()
Gets the
Bin Id associated with this
session. |
void |
unassignAgentFromResource(Id agentId,
Id resourceId)
Removes an
Agent from a Resource. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBinId()
Bin Id associated with this
session. Bin Id associated with this sessionmandatory - This method must be implemented. Bin getBin() throws OperationFailedException, PermissionDeniedException
Bin associated with this session. Bin associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAssignAgents()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignAgentsToResource(Id resourceId)
PERMISSION_DENIED. This is intended as a
hint to an application that may opt not to offer assignment operations
to unauthorized users.resourceId - the Id of the Resource
false if mapping is not authorized, true
otherwiseNullArgumentException - resourceId is
null mandatory - This method must be implemented. void assignAgentToResource(Id agentId, Id resourceId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Agent to a Resource. agentId - the Id of the Agent resourceId - the Id of the Resource
AlreadyExistsException - agentId is
already assigned to resourceId NotFoundException - agentId or
resourceId not foundNullArgumentException - agentId or
resourceId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignAgentFromResource(Id agentId, Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agent from a Resource. agentId - the Id of the Agent resourceId - the Id of the Resource
NotFoundException - agentId or
resourceId not found or agentId not
assigned to resourceId NullArgumentException - agentId or
resourceId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.