Interface SpeedZoneMapAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SpeedZoneMapAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignSpeedZones

      boolean canAssignSpeedZones()
      Tests if this user can alter speed zone/map mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known speed zone 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 speed zone is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignSpeedZonesToMap

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

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

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

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