Interface IntersectionMapAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface IntersectionMapAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignIntersections

      boolean canAssignIntersections()
      Tests if this user can alter intersection/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.
    • canAssignIntersectionsToMap

      boolean canAssignIntersectionsToMap(Id mapId)
      Tests if this user can alter intersection/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 intersection 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.
    • getAssignableMapIdsForIntersection

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

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

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