public interface LocationMapAssignmentSession extends OsidSession
This session provides methods to re-assign Locations to
Map objects A Location may appear in
multiple Map objects and removing the last reference to a
Location 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 Location to another Map
is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignLocationToMap(Id locationId,
Id mapId)
Adds an existing
Location to a Map. |
boolean |
canAssignLocations()
Tests if this user can alter location/map mappings.
|
boolean |
canAssignLocationsToMap(Id mapId)
Tests if this user can alter location/map mappings.
|
IdList |
getAssignableMapIds(Id mapId)
Gets a list of maps including and under the given map node in which
any location can be assigned.
|
IdList |
getAssignableMapIdsForLocation(Id mapId,
Id locationId)
Gets a list of maps including and under the given map node in which a
specific location can be assigned.
|
void |
unassignLocationFromMap(Id locationId,
Id mapId)
Removes a
Location from a Map. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignLocations()
PERMISSION_DENIED. This is intended as a
hint to an application that may opt not to offer assignment operations
to unauthorized users. false if location is not authorized,
true otherwisemandatory - This method must be implemented. boolean canAssignLocationsToMap(Id mapId)
PERMISSION_DENIED. This is intended as a
hint to an application that may opt not to offer assignment operations
to unauthorized users.mapId - the Id of the Map false if mapping is not authorized, true
otherwiseNullArgumentException - mapId is
null mandatory - This method must be implemented. IdList getAssignableMapIds(Id mapId) throws OperationFailedException
mapId - the Id of the Map Ids NullArgumentException - mapId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableMapIdsForLocation(Id mapId, Id locationId) throws OperationFailedException
mapId - the Id of the Map locationId - the Id of the Location
Ids NullArgumentException - mapId or
locationId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignLocationToMap(Id locationId, Id mapId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Location to a Map. locationId - the Id of the Location
mapId - the Id of the Map AlreadyExistsException - locationId is
already assigned to mapId NotFoundException - locationId or
mapId not foundNullArgumentException - locationId or
mapId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignLocationFromMap(Id locationId, Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Location from a Map. locationId - the Id of the Location
mapId - the Id of the Map NotFoundException - locationId or
mapId not found or locationId not
assigned to mapId NullArgumentException - locationId or
mapId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.