Interface ResourceRouteSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResourceRouteSession extends OsidSession

This session defines methods to track resources on routes.

  • Method Details

    • getMapId

      Id getMapId()
      Gets the Map Id associated with this session.
      Returns:
      the Map Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getMap

      Gets the Map associated with this session.
      Returns:
      the map
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canAccessResourceRoutes

      boolean canAccessResourceRoutes()
      Tests if this user can access the locations of resources. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not offer location operations to unauthorized users.
      Returns:
      false if location methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeResourceRouteView

      void useComparativeResourceRouteView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryResourceRouteView

      void usePlenaryResourceRouteView()
      A complete view of the Resource returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • useFederatedMapView

      void useFederatedMapView()
      Federates the view for methods in this session. A federated view will include paths in maps which are children of this map in the map hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedMapView

      void useIsolatedMapView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this map only.
      Compliance:
      mandatory - This method is must be implemented.
    • isResourceOnARoute

      boolean isResourceOnARoute(Id resourceId)
      Tests if the resource is traveling along a route.
      Parameters:
      resourceId - a resource Id
      Returns:
      true if the resource is on a route, false otherrwise
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • getRouteSegmentForResource

      RouteSegment getRouteSegmentForResource(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the current route of the given resource.
      Parameters:
      resourceId - a resource Id
      Returns:
      the current route segment
      Throws:
      IllegalStateException - isResourceOnARoute() is false
      NotFoundException - resourceId is not on map
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRouteSegmentsForResources

      Gets the current locations of the given resources. In plenary mode, the routes for all the given resources are returned or an error results. In comparative mode, routes may be omitted or reordered.
      Parameters:
      resourceIds - a resource list
      Returns:
      the current route segments
      Throws:
      NotFoundException - a resourceId is not on map
      NullArgumentException - resourceIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourcesOnRoute

      ResourceList getResourcesOnRoute(Id routeId) throws OperationFailedException, PermissionDeniedException
      Gets the resources along the given route. In plenary mode, all the resources on the route are returned or an error results. In comparative mode, resources may be omitted or reordered.
      Parameters:
      routeId - a route Id
      Returns:
      the resources on the route
      Throws:
      NullArgumentException - routeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourcesOnRouteSegment

      ResourceList getResourcesOnRouteSegment(Id routeSegmentId) throws OperationFailedException, PermissionDeniedException
      Gets the resources on the given route segment. In plenary mode, all the resources on the route segment are returned or an error results. In comparative mode, resources may be omitted or reordered.
      Parameters:
      routeSegmentId - a route segment Id
      Returns:
      the resources on the route segment
      Throws:
      NullArgumentException - routeSegmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRouteProgressForResource

      RouteProgress getRouteProgressForResource(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the route progress for the given resource.
      Parameters:
      resourceId - a resource Id
      Returns:
      the current route progress
      Throws:
      IllegalStateException - isResourceOnARoute() is false
      NotFoundException - resourceId is not on map
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRouteProgressForResources

      Gets the route progress for the given resources. In plenary mode, the routes for all the given resources are returned or an error results. In comparative mode, routes may be omitted or reordered.
      Parameters:
      resourceIds - a resource list
      Returns:
      the current route progress
      Throws:
      NotFoundException - a resourceId is not found
      NullArgumentException - resourceIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.