public interface PathLookupSession extends OsidSession
This session provides methods for retrieving Path
objects. The Path
represents a fixed connection between two
Locations.
This session defines views that offer differing behaviors when retrieving multiple objects.
Paths
with the PathAdminSession.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedMapView()
and
useIsolatedMapView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupPaths()
Tests if this user can perform
Path lookups. |
Map |
getMap()
Gets the
Map associated with this session. |
Id |
getMapId()
Gets the
Map Id associated with this
session. |
Path |
getPath(Id pathId)
Gets the
Path specified by its Id. |
PathList |
getPaths()
Gets all
Paths. |
PathList |
getPathsAlongLocations(IdList locationIds)
Gets a
PathList connected to all the given
Locations. |
PathList |
getPathsByGenusType(Type pathGenusType)
Gets a
PathList corresponding to the given path genus
Type which does not include paths of genus types
derived from the specified Type. |
PathList |
getPathsByIds(IdList pathIds)
Gets a
PathList corresponding to the given
IdList. |
PathList |
getPathsByParentGenusType(Type pathGenusType)
Gets a
PathList corresponding to the given path genus
Type and include any additional paths with genus types
derived from the specified Type. |
PathList |
getPathsByRecordType(Type pathRecordType)
Gets a
PathList containing the given path record
Type. |
void |
useComparativePathView()
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 |
usePlenaryPathView()
A complete view of the
Path returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id 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 canLookupPaths()
Path
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 opt not to offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativePathView()
mandatory
- This method is must be implemented. void usePlenaryPathView()
Path
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. Path getPath(Id pathId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Path
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Path
may have a different Id
than requested, such as the
case where a duplicate Id
was assigned to a Path
and retained for compatibility.pathId
- Id
of the Path
NotFoundException
- pathId
not foundNullArgumentException
- pathId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. PathList getPathsByIds(IdList pathIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
PathList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
paths 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 Paths
may be omitted from the list and may
present the elements in any order including returning a unique set.pathIds
- the list of Ids
to retrieve Path
listNotFoundException
- an Id was
not foundNullArgumentException
- pathIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PathList getPathsByGenusType(Type pathGenusType) throws OperationFailedException, PermissionDeniedException
PathList
corresponding to the given path genus
Type
which does not include paths of genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known paths or an error results. Otherwise,
the returned list may contain only those paths that are accessible
through this session.pathGenusType
- a path genus type Path
listNullArgumentException
- pathGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PathList getPathsByParentGenusType(Type pathGenusType) throws OperationFailedException, PermissionDeniedException
PathList
corresponding to the given path genus
Type
and include any additional paths with genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known paths or an error results. Otherwise,
the returned list may contain only those paths that are accessible
through this session.pathGenusType
- a path genus type Path
listNullArgumentException
- pathGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PathList getPathsByRecordType(Type pathRecordType) throws OperationFailedException, PermissionDeniedException
PathList
containing the given path record
Type.
In plenary mode, the returned list contains all known
paths or an error results. Otherwise, the returned list may contain
only those paths that are accessible through this session.pathRecordType
- a path record type Path
listNullArgumentException
- pathRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PathList getPathsAlongLocations(IdList locationIds) throws OperationFailedException, PermissionDeniedException
PathList
connected to all the given
Locations.
In plenary mode, the returned list contains all of
the paths along the locations, or an error results if a path connected
to the location is not found or inaccessible. Otherwise, inaccessible
Paths
may be omitted from the list.locationIds
- the list of Ids
to retrieve Path
listNullArgumentException
- locationIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PathList getPaths() throws OperationFailedException, PermissionDeniedException
Paths.
In plenary mode, the returned list
contains all known paths or an error results. Otherwise, the returned
list may contain only those paths that are accessible through this
session. Paths
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.