public interface DeviceSystemAssignmentSession extends OsidSession
This session provides methods to re-assign Devices to
System mappings. A Device may appear in
multiple System objects and removing the last reference to
a Device is the equivalent of deleting it. Each
System may have its own authorizations governing who is allowed to
operate on it.
Adding a reference of a Device to another System
is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignDeviceToSystem(Id deviceId,
Id systemId)
Adds an existing
Device to a System. |
boolean |
canAssignDevices()
Tests if this user can alter device/system mappings.
|
boolean |
canAssignDevicesToSystem(Id systemId)
Tests if this user can alter device/system mappings.
|
IdList |
getAssignableSystemIds(Id systemId)
Gets a list of systems including and under the given system node in
which any device can be assigned.
|
IdList |
getAssignableSystemIdsForDevice(Id systemId,
Id deviceId)
Gets a list of systems including and under the given system node in
which a specific device can be assigned.
|
void |
reassignDeviceToSystem(Id deviceId,
Id fromSystemId,
Id toSystemId)
Moves a
Device from one System to
another. |
void |
unassignDeviceFromSystem(Id deviceId,
Id systemId)
Removes a
Device from a System. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignDevices()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if control is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignDevicesToSystem(Id systemId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.systemId - the Id of the System false if control is not authorized, true
otherwiseNullArgumentException - systemId is
null mandatory - This method must be implemented. IdList getAssignableSystemIds(Id systemId) throws OperationFailedException
systemId - the Id of the System Ids NullArgumentException - systemId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableSystemIdsForDevice(Id systemId, Id deviceId) throws OperationFailedException
systemId - the Id of the System deviceId - the Id of the Device Ids NullArgumentException - systemId or
deviceId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignDeviceToSystem(Id deviceId, Id systemId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Device to a System. deviceId - the Id of the Device systemId - the Id of the System AlreadyExistsException - deviceId is
slready assigned to systemId NotFoundException - deviceId or
systemId not foundNullArgumentException - deviceId or
systemId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignDeviceFromSystem(Id deviceId, Id systemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Device from a System. deviceId - the Id of the Device systemId - the Id of the System NotFoundException - deviceId or
systemId not found or deviceId not
assigned to systemId NullArgumentException - deviceId or
systemId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void reassignDeviceToSystem(Id deviceId, Id fromSystemId, Id toSystemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Device from one System to
another. Mappings to other Systems are unaffected.deviceId - the Id of the Device fromSystemId - the Id of the current
System toSystemId - the Id of the destination
System NotFoundException - deviceId, fromSystemId,
or toSystemId not found or
deviceId not mapped to fromSystemId NullArgumentException - deviceId, fromSystemId,
or toSystemId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.