OSID Logo
OSID Specifications
control package
Version 3.0.0
Release Candidate Preview
Interfaceosid.control.DeviceSearchSession
Implementsosid.control.DeviceQuerySession
Description

This session provides methods for searching among Device objects. The search query is constructed using the DeviceQuery.

getDevicesByQuery() is the basic search method and returns a list of Devices. A more advanced search may be performed with getDevicesBySearch(). It accepts a DeviceSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getDevicesBySearch() returns a DeviceSearchResults that can be used to access the resulting DeviceList or be used to perform a search within the result set through DeviceSearch.

This session defines views that offer differing behaviors for searching.

  • federated system view: searches include devices in systems of which this system is an ancestor in the system hierarchy
  • isolated system view: searches are restricted to devices in this system

Devices may have a record indicated by their respective record types. The query record is accessed via the DeviceQuery.

MethodgetDeviceSearch
Description

Gets a device search.

Returnosid.control.DeviceSearchthe device search
CompliancemandatoryThis method must be implemented.
MethodgetDeviceSearchOrder
Description

Gets a device search order. The DeviceSearchOrder is supplied to a DeviceSearch to specify the ordering of results.

Returnosid.control.DeviceSearchOrderthe device search order
CompliancemandatoryThis method must be implemented.
MethodgetDevicesBySearch
Description

Gets the search results matching the given search query using the given search.

Parametersosid.control.DeviceQuerydeviceQuerythe device query
osid.control.DeviceSearchdeviceSearchthe device search
Returnosid.control.DeviceSearchResultsthe device search results
ErrorsNULL_ARGUMENT deviceQuery or deviceSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED deviceQuery or deviceSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetDeviceQueryFromInspector
Description

Gets a device query from an inspector. The inspector is available from a DeviceSearchResults.

Parametersosid.control.DeviceQueryInspectordeviceQueryInspectora device query inspector
Returnosid.control.DeviceQuerythe device query
ErrorsNULL_ARGUMENT deviceQueryInspector is null
UNSUPPORTED deviceQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.