Interface PathMapAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PathMapAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignPaths

      boolean canAssignPaths()
      Tests if this user can alter path/map mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known location 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.
    • canAssignPathsToMap

      boolean canAssignPathsToMap(Id mapId)
      Tests if this user can alter path/map mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known location 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 path 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.
    • getAssignableMapIdsForPath

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

      Adds an existing Path to a Map .
      Parameters:
      pathId - the Id of the Path
      mapId - the Id of the Map
      Throws:
      AlreadyExistsException - pathId is already assigned to mapId
      NotFoundException - pathId or mapId not found
      NullArgumentException - pathId or mapId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignPathFromMap

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