Interface ObstacleMapAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ObstacleMapAssignmentSession extends OsidSession

This session provides methods to re-assign Obstacles to Map objects An Obstacle may appear in multiple Map objects and removing the last reference to an Obstacle is the equivalent of deleting it. Each Map may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an Obstacle to another Map is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignObstacles

      boolean canAssignObstacles()
      Tests if this user can alter obstacle/map 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.
    • canAssignObstaclesToMap

      boolean canAssignObstaclesToMap(Id mapId)
      Tests if this user can alter obstacle/map 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:
      mapId - the Id of the Map
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - mapId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableMapIds

      IdList getAssignableMapIds(Id mapId) throws OperationFailedException
      Gets a list of maps including and under the given map node in which any obstacle can be assigned.
      Parameters:
      mapId - the Id of the Map
      Returns:
      list of assignable map Ids
      Throws:
      NullArgumentException - mapId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableMapIdsForObstacle

      IdList getAssignableMapIdsForObstacle(Id mapId, Id obstacleId) throws OperationFailedException
      Gets a list of maps including and under the given map node in which a specific obstacle can be assigned.
      Parameters:
      mapId - the Id of the Map
      obstacleId - the Id of the Obstacle
      Returns:
      list of assignable map Ids
      Throws:
      NullArgumentException - mapId or obstacleId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignObstacleToMap

      void assignObstacleToMap(Id obstacleId, Id mapId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Obstacle to a Map .
      Parameters:
      obstacleId - the Id of the Obstacle
      mapId - the Id of the Map
      Throws:
      AlreadyExistsException - obstacleId is already assigned to mapId
      NotFoundException - obstacleId or mapId not found
      NullArgumentException - obstacleId or mapId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignObstacleFromMap

      void unassignObstacleFromMap(Id obstacleId, Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Obstacle from a Map .
      Parameters:
      obstacleId - the Id of the Obstacle
      mapId - the Id of the Map
      Throws:
      NotFoundException - obstacleId or mapId not found or obstacleId not assigned to mapId
      NullArgumentException - obstacleId or mapId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.