public interface LocationLookupSession extends OsidSession
This session defines methods for retrieving locations.
This lookup session defines several views:
Locations
with the LocationAdminSession. The methods useFederatedMapView() and
useIsolatedMapView() behave as a radio group and one should be
selected before invoking any lookup methods.
Locations may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Locations.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupLocations()
Tests if this user can perform
Location lookups. |
Location |
getLocation(Id locationId)
Gets the
Location specified by its Id. |
LocationList |
getLocations()
Gets all
Locations. |
LocationList |
getLocationsByGenusType(Type locationGenusType)
Gets a
LocationList corresponding to the given location
genus Type which does not include locations of types
derived from the specified Type. |
LocationList |
getLocationsByIds(IdList locationIds)
Gets a
LocationList corresponding to the given
IdList. |
LocationList |
getLocationsByParentGenusType(Type locationGenusType)
Gets a
LocationList corresponding to the given location
genus Type and include any additional locations with
genus types derived from the specified Type. |
LocationList |
getLocationsByRecordType(Type locationRecordType)
Gets a
LocationList containing the given location
record Type. |
Map |
getMap()
Gets the
Map associated with this session. |
Id |
getMapId()
Gets the
Map Id associated with this
session. |
void |
useComparativeLocationView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedMapView()
Federates the view for methods in this session.
|
void |
useIsolatedMapView()
Isolates the view for methods in this session.
|
void |
usePlenaryLocationView()
A complete view of the
Location returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getMapId()
Map Id associated with this
session. Map Id associated with this sessionmandatory - This method must be implemented. Map getMap() throws OperationFailedException, PermissionDeniedException
Map associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupLocations()
Location lookups. 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 lookup operations to
unauthorized users. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeLocationView()
mandatory - This method is must be implemented. void usePlenaryLocationView()
Location 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.mandatory - This method is must be implemented. void useFederatedMapView()
mandatory - This method is must be implemented. void useIsolatedMapView()
mandatory - This method is must be implemented. Location getLocation(Id locationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Location specified by its Id.
In plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned Location
may have a different Id than requested, such as
the case where a duplicate Id was assigned to a
Location and retained for compatibility.locationId - the Id of the Location
to retrieve Location NotFoundException - no Location found
with the given Id NullArgumentException - locationId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. LocationList getLocationsByIds(IdList locationIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
LocationList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
locations specified in the Id list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Locations may be omitted from the list and
may present the elements in any order including returning a unique
set.locationIds - the list of Ids to retrieve Location listNotFoundException - an Id was not foundNullArgumentException - locationIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. LocationList getLocationsByGenusType(Type locationGenusType) throws OperationFailedException, PermissionDeniedException
LocationList corresponding to the given location
genus Type which does not include locations of types
derived from the specified Type. In plenary mode, the
returned list contains all known locations or an error results.
Otherwise, the returned list may contain only those locations that are
accessible through this session.locationGenusType - a location genus type Location listNullArgumentException - locationGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. LocationList getLocationsByParentGenusType(Type locationGenusType) throws OperationFailedException, PermissionDeniedException
LocationList corresponding to the given location
genus Type and include any additional locations with
genus types derived from the specified Type. In plenary
mode, the returned list contains all known locations or an error
results. Otherwise, the returned list may contain only those locations
that are accessible through this session.locationGenusType - a location genus type Location listNullArgumentException - locationGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. LocationList getLocationsByRecordType(Type locationRecordType) throws OperationFailedException, PermissionDeniedException
LocationList containing the given location
record Type. In plenary mode, the returned list
contains all known locations or an error results. Otherwise, the
returned list may contain only those locations that are accessible
through this session.locationRecordType - a location record type Location listNullArgumentException - locationRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. LocationList getLocations() throws OperationFailedException, PermissionDeniedException
Locations. In plenary mode, the returned list
contains all known locations or an error results. Otherwise, the
returned list may contain only those locations that are accessible
through this session. Locations OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.