Interface ControllerSystemAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ControllerSystemAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignControllers

      boolean canAssignControllers()
      Tests if this user can alter controller/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 assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignControllersToSystem

      boolean canAssignControllersToSystem(Id systemId)
      Tests if this user can alter controller/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 assignment 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 controller 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.
    • getAssignableSystemIdsForController

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

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

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

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