Interface EntryQuerySession

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

public interface EntryQuerySession extends OsidSession

This session provides methods for querying Entry objects. The search query is constructed using the EntryQuery .

This session defines views that offer differing behaviors for searching.

  • federated blog view: searches include entries in blogs of which this blog is an ancestor in the blog hierarchy
  • isolated blog view: searches are restricted to entries in this blog

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

  • Method Details

    • getBlogId

      Id getBlogId()
      Gets the Blog Id associated with this session.
      Returns:
      the Blog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBlog

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

      boolean canSearchEntries()
      Tests if this user can perform Entry queries. 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.
    • useFederatedBlogView

      void useFederatedBlogView()
      Federates the view for methods in this session. A federated view will include entries in blogs which are children of this blog in the blog hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedBlogView

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

      EntryQuery getEntryQuery()
      Gets an entry query.
      Returns:
      the entry query interface
      Compliance:
      mandatory - This method must be implemented.
    • getEntriesByQuery

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