Interface ResourceRouteSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to track resources on routes.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can access the locations of resources.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with this session.getResourcesOnRoute(Id routeId) Gets the resources along the given route.getResourcesOnRouteSegment(Id routeSegmentId) Gets the resources on the given route segment.getRouteProgressForResource(Id resourceId) Gets the route progress for the given resource.getRouteProgressForResources(IdList resourceIds) Gets the route progress for the given resources.getRouteSegmentForResource(Id resourceId) Gets the current route of the given resource.getRouteSegmentsForResources(IdList resourceIds) Gets the current locations of the given resources.booleanisResourceOnARoute(Id resourceId) Tests if the resource is traveling along a route.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theResourcereturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getMapId
Id getMapId()Gets theMapIdassociated with this session.- Returns:
- the
Map Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getMap
Gets theMapassociated with this session.- Returns:
- the map
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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 aPERMISSION_DENIED. This is intended as a hint to an application that may not offer location operations to unauthorized users.- Returns:
falseif location methods are not authorized,trueotherwise- 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 theResourcereturns 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
Tests if the resource is traveling along a route.- Parameters:
resourceId- a resourceId- Returns:
trueif the resource is on a route,falseotherrwise- Throws:
NullArgumentException-resourceIdisnull- 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 resourceId- Returns:
- the current route segment
- Throws:
IllegalStateException-isResourceOnARoute()isfalseNotFoundException-resourceIdis not on mapNullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRouteSegmentsForResources
RouteSegmentList getRouteSegmentsForResources(IdList resourceIds) throws NotFoundException, OperationFailedException, PermissionDeniedException 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- aresourceIdis not on mapNullArgumentException-resourceIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 routeId- Returns:
- the resources on the route
- Throws:
NullArgumentException-routeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 segmentId- Returns:
- the resources on the route segment
- Throws:
NullArgumentException-routeSegmentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 resourceId- Returns:
- the current route progress
- Throws:
IllegalStateException-isResourceOnARoute()isfalseNotFoundException-resourceIdis not on mapNullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRouteProgressForResources
RouteProgressList getRouteProgressForResources(IdList resourceIds) throws NotFoundException, OperationFailedException, PermissionDeniedException 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- aresourceIdis not foundNullArgumentException-resourceIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-