Interface ResourceRouteAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to manage resources on routes.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignResourceToRoute(Id resourceId, Id routeId) Assigns a resource to a route.booleanTests if this user can set the routes for resources.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with this session.voidremoveResourceFromRoute(Id resourceId, Id routeId) Unassigns a resource from a route.voidupdateRouteSegmentForResource(Id resourceId, Id routeSegmentId) Updates the route segment for a resource.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.
-
canAssignResourceRoutes
boolean canAssignResourceRoutes()Tests if this user can set the routes for 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 assignment operations to unauthorized users.- Returns:
falseif routing methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
assignResourceToRoute
void assignResourceToRoute(Id resourceId, Id routeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Assigns a resource to a route.- Parameters:
resourceId- a resourceIdrouteId- a routeId- Throws:
AlreadyExistsException-resourceIdalready onrouteIdNotFoundException-resourceIdorrouteIdis not foundNullArgumentException-resourceIdorrouteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateRouteSegmentForResource
void updateRouteSegmentForResource(Id resourceId, Id routeSegmentId) throws NotFoundException, OperationFailedException, PermissionDeniedException Updates the route segment for a resource.- Parameters:
resourceId- a resourceIdrouteSegmentId- a route segmentId- Throws:
NotFoundException-resourceIdis not foundNullArgumentException-resourceIdorrouteSegmentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- coordinate not supported- Compliance:
mandatory- This method must be implemented.
-
removeResourceFromRoute
void removeResourceFromRoute(Id resourceId, Id routeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Unassigns a resource from a route.- Parameters:
resourceId- a resourceIdrouteId- a routeId- Throws:
NotFoundException-resourceIdorrouteIdis not foundNullArgumentException-resourceIdorrouteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-