Interface SceneSystemAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SceneSystemAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignScenes

      boolean canAssignScenes()
      Tests if this user can alter scene/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 scene is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignScenesToSystem

      boolean canAssignScenesToSystem(Id systemId)
      Tests if this user can alter scene/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 scene 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.
    • getAssignableSystemIdsForScene

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

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

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

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