Interface RouteMapAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RouteMapAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignRoutes

      boolean canAssignRoutes()
      Tests if this user can alter route/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.
    • canAssignRoutesToMap

      boolean canAssignRoutesToMap(Id mapId)
      Tests if this user can alter route/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 route 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.
    • getAssignableMapIdsForRoute

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

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

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

      void reassignCreditToMap(Id routeId, Id fromMapId, Id toMapId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Route from one Map to another. Mappings to other Maps are unaffected.
      Parameters:
      routeId - the Id of the Route
      fromMapId - the Id of the current Map
      toMapId - the Id of the destination Map
      Throws:
      AlreadyExistsException - routeId already assigned to toMapId
      NotFoundException - routeId fromMapId , or toMapId not found or routeId not mapped to fromMapId
      NullArgumentException - routeId, fromMapId , or toMapId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.