public interface DeviceLookupSession extends OsidSession
This session provides methods for retrieving Device
objects. The Device
represents a fixed connection between
two Devices.
This session defines views that offer differing behaviors when retrieving multiple objects.
Devices
with the DeviceAdminSession.
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 useFederatedSystemView()
and
useIsolatedSystemView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupDevices()
Tests if this user can perform
Device lookups. |
Device |
getDevice(Id deviceId)
Gets the
Device specified by its Id. |
DeviceList |
getDevices()
Gets all
Devices. |
DeviceList |
getDevicesByGenusType(Type deviceGenusType)
Gets a
DeviceList corresponding to the given device
genus Type which does not include devices of genus
types derived from the specified Type. |
DeviceList |
getDevicesByIds(IdList deviceIds)
Gets a
DeviceList corresponding to the given
IdList. |
DeviceList |
getDevicesByParentGenusType(Type deviceGenusType)
Gets a
DeviceList corresponding to the given device
genus Type and include any additional devices with
genus types derived from the specified Type. |
DeviceList |
getDevicesByRecordType(Type deviceRecordType)
Gets a
DeviceList containing the given device record
Type. |
System |
getSystem()
Gets the
System associated with this session. |
Id |
getSystemId()
Gets the
System Id associated with this
session. |
void |
useComparativeDeviceView()
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 |
useFederatedSystemView()
Federates the view for methods in this session.
|
void |
useIsolatedSystemView()
Isolates the view for methods in this session.
|
void |
usePlenaryDeviceView()
A complete view of the
Device returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getSystemId()
System
Id
associated with this
session. System Id
associated with this sessionmandatory
- This method must be implemented. System getSystem() throws OperationFailedException, PermissionDeniedException
System
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupDevices()
Device
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 useComparativeDeviceView()
mandatory
- This method is must be implemented. void usePlenaryDeviceView()
Device
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 useFederatedSystemView()
mandatory
- This method is must be implemented. void useIsolatedSystemView()
mandatory
- This method is must be implemented. Device getDevice(Id deviceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Device
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Device
may have a different Id
than requested,
such as the case where a duplicate Id
was assigned to a
Device
and retained for compatibility.deviceId
- Id
of the Device
NotFoundException
- deviceId
not foundNullArgumentException
- deviceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. DeviceList getDevicesByIds(IdList deviceIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
DeviceList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
devices 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 Devices
may be omitted from the list and
may present the elements in any order including returning a unique
set.deviceIds
- the list of Ids
to retrieve Device
listNotFoundException
- an Id
was not foundNullArgumentException
- deviceIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeviceList getDevicesByGenusType(Type deviceGenusType) throws OperationFailedException, PermissionDeniedException
DeviceList
corresponding to the given device
genus Type
which does not include devices of genus
types derived from the specified Type.
In plenary mode, the returned list contains all known
devices or an error results. Otherwise, the returned list may contain
only those devices that are accessible through this session.deviceGenusType
- a device genus type Device
listNullArgumentException
- deviceGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeviceList getDevicesByParentGenusType(Type deviceGenusType) throws OperationFailedException, PermissionDeniedException
DeviceList
corresponding to the given device
genus Type
and include any additional devices with
genus types derived from the specified Type.
In plenary mode, the returned list contains all known
devices or an error results. Otherwise, the returned list may contain
only those devices that are accessible through this session.deviceGenusType
- a device genus type Device
listNullArgumentException
- deviceGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeviceList getDevicesByRecordType(Type deviceRecordType) throws OperationFailedException, PermissionDeniedException
DeviceList
containing the given device record
Type.
In plenary mode, the returned list contains all known
devices or an error results. Otherwise, the returned list may contain
only those devices that are accessible through this session.deviceRecordType
- a device record type Device
listNullArgumentException
- deviceRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeviceList getDevices() throws OperationFailedException, PermissionDeniedException
Devices.
In plenary mode, the returned list contains all known
devices or an error results. Otherwise, the returned list may contain
only those devices that are accessible through this session. Devices
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.