Interface DeviceEnablerSystemAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DeviceEnablerSystemAssignmentSession extends OsidSession

This session provides methods to re-assign DeviceEnabler to System mappings. A DeviceEnabler may appear in multiple System objects and removing the last reference to a DeviceEnabler 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 DeviceEnabler to another System is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignDeviceEnablers

      boolean canAssignDeviceEnablers()
      Tests if this user can alter device enabler/system mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignDeviceEnablersToSystem

      boolean canAssignDeviceEnablersToSystem(Id systemId)
      Tests if this user can alter device enabler/system mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Parameters:
      systemId - the Id of the System
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - systemId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableSystemIds

      IdList getAssignableSystemIds(Id systemId) throws OperationFailedException
      Gets a list of systems including and under the given system node in which any device enabler can be assigned.
      Parameters:
      systemId - the Id of the System
      Returns:
      list of assignable system Ids
      Throws:
      NullArgumentException - systemId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableSystemIdsForDeviceEnabler

      IdList getAssignableSystemIdsForDeviceEnabler(Id systemId, Id deviceEnablerId) throws OperationFailedException
      Gets a list of systems including and under the given system node in which a specific device enabler can be assigned.
      Parameters:
      systemId - the Id of the System
      deviceEnablerId - the Id of the DeviceEnabler
      Returns:
      list of assignable system Ids
      Throws:
      NullArgumentException - systemId or deviceEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignDeviceEnablerToSystem

      void assignDeviceEnablerToSystem(Id deviceEnablerId, Id systemId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing DeviceEnabler to a System .
      Parameters:
      deviceEnablerId - the Id of the DeviceEnabler
      systemId - the Id of the System
      Throws:
      AlreadyExistsException - deviceEnablerId already assigned to systemId
      NotFoundException - deviceEnablerId or systemId not found
      NullArgumentException - deviceEnablerId or systemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignDeviceEnablerFromSystem

      void unassignDeviceEnablerFromSystem(Id deviceEnablerId, Id systemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a DeviceEnabler from a System .
      Parameters:
      deviceEnablerId - the Id of the DeviceEnabler
      systemId - the Id of the System
      Throws:
      NotFoundException - deviceEnablerId or systemId not found or deviceEnablerId already assigned to systemId
      NullArgumentException - deviceEnablerId or systemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignDeviceEnablerToSystem

      void reassignDeviceEnablerToSystem(Id deviceEnablerId, Id fromSystemId, Id toSystemId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a DeviceEnabler from one System to another. Mappings to other Systems are unaffected.
      Parameters:
      deviceEnablerId - the Id of the DeviceEnabler
      fromSystemId - the Id of the current System
      toSystemId - the Id of the destination System
      Throws:
      AlreadyExistsException - deviceEnablerId already assigned to toSystemId
      NotFoundException - deviceEnablerId, fromSystemId , or toSystemId not found or deviceEnablerId not mapped to fromSystemId
      NullArgumentException - deviceEnablerId, fromSystemId , or toSystemrId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.