Interface CommentQuerySession

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

public interface CommentQuerySession extends OsidSession

This session provides methods for searching Comments . The search query is constructed using the CommentQuery . The book record Type also specifies the record for the book query.

Comments may have a query record indicated by their respective record types. The query record is accessed via the CommentQuery . The returns in this session may not be cast directly to these interfaces.

  • Method Details

    • getBookId

      Id getBookId()
      Gets the Book Id associated with this session.
      Returns:
      the Book Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBook

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

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

      void useFederatedBookView()
      Federates the view for methods in this session. A federated view will include comments in books which are children of this book in the book hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedBookView

      void useIsolatedBookView()
      Isolates the view for methods in this session. An isolated view restricts searches to this book only.
      Compliance:
      mandatory - This method is must be implemented.
    • getCommentQuery

      CommentQuery getCommentQuery()
      Gets a comment query.
      Returns:
      the comment query
      Compliance:
      mandatory - This method must be implemented.
    • getCommentsByQuery

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