Interface DeviceSearchSession

All Superinterfaces:
AutoCloseable, Closeable, DeviceQuerySession, OsidSession, OsidSession

public interface DeviceSearchSession extends DeviceQuerySession

This session provides methods for searching among Devices . 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 .

  • Method Details

    • getDeviceSearch

      DeviceSearch getDeviceSearch()
      Gets a device search.
      Returns:
      the device search
      Compliance:
      mandatory - This method must be implemented.
    • getDeviceSearchOrder

      DeviceSearchOrder getDeviceSearchOrder()
      Gets a device search order. The DeviceSearchOrder is supplied to a DeviceSearch to specify the ordering of results.
      Returns:
      the device search order
      Compliance:
      mandatory - This method must be implemented.
    • getDevicesBySearch

      DeviceSearchResults getDevicesBySearch(DeviceQuery deviceQuery, DeviceSearch deviceSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search query using the given search.
      Parameters:
      deviceQuery - the device query
      deviceSearch - the device search
      Returns:
      the device search results
      Throws:
      NullArgumentException - deviceQuery or deviceSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - deviceQuery or deviceSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getDeviceQueryFromInspector

      DeviceQuery getDeviceQueryFromInspector(DeviceQueryInspector deviceQueryInspector)
      Gets a device query from an inspector. The inspector is available from a DeviceSearchResults .
      Parameters:
      deviceQueryInspector - a device query inspector
      Returns:
      the device query
      Throws:
      NullArgumentException - deviceQueryInspector is null
      UnsupportedException - deviceQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.