Interface StateQuerySession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
StateSearchSession

public interface StateQuerySession extends OsidSession

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

This session defines views that offer differing behaviors for searching.

  • federated process view: searches include states in processes of which this process is a ancestor in the process hierarchy
  • isolated process view: searches are restricted to states in this process

States may have a query record indicated by their respective types. The queryrecord is accessed via the StateQuery .

  • Method Details

    • getProcessId

      Id getProcessId()
      Gets the Process Id associated with this session.
      Returns:
      the Process Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getProcess

      Gets the Process associated with this session.
      Returns:
      the Process associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canSearchStates

      boolean canSearchStates()
      Tests if this user can perform State searches. 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 search operations to unauthorized users.
      Returns:
      false if search methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedProcessView

      void useFederatedProcessView()
      Federates the view for methods in this session. A federated view will include states in processes which are children of this process in the process hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedProcessView

      void useIsolatedProcessView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this process only.
      Compliance:
      mandatory - This method is must be implemented.
    • getStateQuery

      StateQuery getStateQuery()
      Gets a state query.
      Returns:
      the state query
      Compliance:
      mandatory - This method must be implemented.
    • getStatesByQuery

      Gets a list of States matching the given state query.
      Parameters:
      stateQuery - the state query
      Returns:
      the returned StateList
      Throws:
      NullArgumentException - stateQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - stateQuery is not of this service
      Compliance:
      mandatory - This method must be implemented.