Interface ReplyLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ReplyLookupSession extends OsidSession

This session defines methods for retrieving replies.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • isolated forum view: All reply methods in this session operate, retrieve and pertain to replies defined explicitly in the current forum. Using an isolated view is useful for managing replies with the ReplyAdminSession .
  • federated forum view: All reply lookup methods in this session operate, retrieve and pertain to all replies defined in this forum and any other forums implicitly available in this forum through forum inheritence.
  • sequestered reply viiew: All reply methods suppress sequestered replies.
  • unsequestered reply view: All reply methods return all replies.

The methods useFederatedForumView() and useIsolatedForumView() behave as a radio group and one should be selected before invoking any lookup methods.

  • Method Details

    • getForumId

      Id getForumId()
      Gets the Forum Id associated with this session.
      Returns:
      the Forum Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getForum

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

      boolean canLookupReplies()
      Tests if this user can lookup replies. 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 these operations.
      Returns:
      false if reply lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeReplyView

      void useComparativeReplyView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryReplyView

      void usePlenaryReplyView()
      A complete view of the Reply returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • useFederatedForumView

      void useFederatedForumView()
      Federates the view for methods in this session. A federated view will include replies in forums which are children of this forum in the forum hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedForumView

      void useIsolatedForumView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this forum only.
      Compliance:
      mandatory - This method is must be implemented.
    • useSequesteredReplyView

      void useSequesteredReplyView()
      The returns from the lookup methods omit sequestered replies.
      Compliance:
      mandatory - This method is must be implemented.
    • useUnsequesteredReplyView

      void useUnsequesteredReplyView()
      All replies are returned including sequestered replies.
      Compliance:
      mandatory - This method is must be implemented.
    • getReply

      Gets the Reply specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Reply may have a different Id than requested, such as the case where a duplicate Id was assigned to a Reply and retained for compatibility. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      replyId - the Id of the Reply to retrieve
      Returns:
      the returned Reply
      Throws:
      NotFoundException - no Reply found with the given Id
      NullArgumentException - replyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesByIds

      Gets a ReplyList corresponding to the given IdList . In plenary mode, the returned list contains all of the replies specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible replies may be omitted from the list and may present the elements in any order including returning a unique set. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      replyIds - the list of Ids to retrieve
      Returns:
      the returned Reply list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - replyIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesByGenusType

      ReplyList getRepliesByGenusType(Type replyGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ReplyList corresponding to the given reply genus Type which does not include replies of genus types derived from the specified Type . In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      replyGenusType - a reply genus type
      Returns:
      the returned Reply list
      Throws:
      NullArgumentException - replyGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesByParentGenusType

      ReplyList getRepliesByParentGenusType(Type replyGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ReplyList corresponding to the given reply genus Type and include any additional replies with genus types derived from the specified Type . In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      replyGenusType - a reply genus type
      Returns:
      the returned Post list
      Throws:
      NullArgumentException - postGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesByRecordType

      ReplyList getRepliesByRecordType(Type replyRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a ReplyList containing the given reply record Type . In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      replyRecordType - a reply record type
      Returns:
      the returned Post list
      Throws:
      NullArgumentException - replyRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesByDate

      Gets a list of all replies corresponding to the given date range inclusive. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      from - start of date range
      to - end of date range
      Returns:
      the returned ReplyList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesForPost

      Gets a list of all replies corresponding to a post Id . In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      postId - the Id of the post
      Returns:
      the returned ReplyList
      Throws:
      NullArgumentException - postId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesByDateForPost

      ReplyList getRepliesByDateForPost(Id postId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of all replies corresponding to post Id in the given date range inclusive. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replis that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      postId - the Id of the post
      from - start of date range
      to - end of date range
      Returns:
      the returned ReplyList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - postId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesForPoster

      ReplyList getRepliesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets a list of all replies corresponding to a poster. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      resourceId - the resource Id
      Returns:
      the returned ReplyList
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesByDateForPoster

      ReplyList getRepliesByDateForPoster(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of all replies corresponding to a post Id for the given poster within the date range inclusive. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      resourceId - the resource Id
      from - start of date range
      to - end of date range
      Returns:
      the returned ReplyList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - resourceId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesForPostAndPoster

      ReplyList getRepliesForPostAndPoster(Id postId, Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets a list of all replies corresponding to a post Id and poster. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      postId - the Id of the post
      resourceId - the resource Id
      Returns:
      the returned ReplyList
      Throws:
      NullArgumentException - postId or resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepliesByDateForPostAndPoster

      ReplyList getRepliesByDateForPostAndPoster(Id postId, Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of all replies corresponding to a post Id and poster within the given daterange incluisve. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Parameters:
      postId - the Id of the post
      resourceId - the resource Id
      from - start of date range
      to - end of date range
      Returns:
      the returned ReplyList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - postId, resourceId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getReplies

      Gets a list of all replies. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.
      Returns:
      the returned ReplyList
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.