Interface CommentSmartBookSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CommentSmartBookSession extends OsidSession

This session manages queries and sequencing to create "smart" dynamic catalogs. A CommentQuery can be retrieved from this session and mapped to this Book to create a virtual collection of Comments . The comments may be sequenced using the CommentSearchOrder from this session.

This Book has a default query that matches any comment and a default search order that specifies no sequencing. The queries may be examined using a CommentQueryInspector . The query may be modified by converting the inspector back to a CommentQuery .

  • 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 associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageSmartBooks

      boolean canManageSmartBooks()
      Tests if this user can manage smart books. A return of true does not guarantee successful authorization. A return of false indicates that it is known 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 operations to unauthorized users.
      Returns:
      false if smart book management is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCommentQuery

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

      CommentSearchOrder getCommentSearchOrder()
      Gets a comment search order.
      Returns:
      the comment search order
      Compliance:
      mandatory - This method must be implemented.
    • applyCommentQuery

      void applyCommentQuery(CommentQuery commentQuery) throws OperationFailedException, PermissionDeniedException
      Applies a comment query to this book.
      Parameters:
      commentQuery - the comment query
      Throws:
      NullArgumentException - commentQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - commentQuery not of this service
      Compliance:
      mandatory - This method must be implemented.
    • inspectCommentQuery

      Gets a comment query inspector for this book.
      Returns:
      the comment query inspector
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • applyCommentSequencing

      void applyCommentSequencing(CommentSearchOrder commentSearchOrder) throws OperationFailedException, PermissionDeniedException
      Applies a comment search order to this book.
      Parameters:
      commentSearchOrder - the comment search order
      Throws:
      NullArgumentException - commentSearchOrder is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - commentSearchOrder not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getCommentQueryFromInspector

      CommentQuery getCommentQueryFromInspector(CommentQueryInspector commentQueryInspector)
      Gets a comment query from an inspector.
      Parameters:
      commentQueryInspector - a query inspector
      Returns:
      the comment query
      Throws:
      NullArgumentException - commentQueryInspector is null
      UnsupportedException - commentQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.