Interface ForumQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidCatalogQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface ForumQuery extends OsidCatalogQuery

This is the query for searching for forums. Each method specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchReplyId

      void matchReplyId(Id replyId, boolean match)
      Sets the reply Id for this query to match replies assigned to forums.
      Parameters:
      replyId - a reply Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - replyId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearReplyIdTerms

      void clearReplyIdTerms()
      Clears the reply Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsReplyQuery

      boolean supportsReplyQuery()
      Tests if a reply query is available.
      Returns:
      true if a reply query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getReplyQuery

      ReplyQuery getReplyQuery()
      Gets the query for a forum.
      Returns:
      the reply query
      Throws:
      UnimplementedException - supportsReplyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsReplyQuery()} is {@code true} .
    • matchAnyReply

      void matchAnyReply(boolean match)
      Matches forums with any reply.
      Parameters:
      match - true to match forums with any reply, false to match forums with no replies
      Compliance:
      mandatory - This method must be implemented.
    • clearReplyTerms

      void clearReplyTerms()
      Clears the reply terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPostId

      void matchPostId(Id postId, boolean match)
      Sets the post Id for this query to match replies assigned to posts.
      Parameters:
      postId - a post Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - postId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearPostIdTerms

      void clearPostIdTerms()
      Clears the post Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPostQuery

      boolean supportsPostQuery()
      Tests if a PostQuery is available.
      Returns:
      true if a post query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPostQuery

      PostQuery getPostQuery()
      Gets the query for a post query. Multiple retrievals produce a nested OR term.
      Returns:
      the post query
      Throws:
      UnimplementedException - supportsPostQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsPostQuery()} is {@code true} .
    • matchAnyPost

      void matchAnyPost(boolean match)
      Matches forums with any post.
      Parameters:
      match - true to match forums with any post, false to match forums with no posts
      Compliance:
      mandatory - This method must be implemented.
    • clearPostTerms

      void clearPostTerms()
      Clears the post terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorForumId

      void matchAncestorForumId(Id forumId, boolean match)
      Sets the forum Id for this query to match forums that have the specified forum as an ancestor.
      Parameters:
      forumId - a forum Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - forumId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorForumIdTerms

      void clearAncestorForumIdTerms()
      Clears the ancestor forum Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorForumQuery

      boolean supportsAncestorForumQuery()
      Tests if a ForumQuery is available.
      Returns:
      true if a forum query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorForumQuery

      ForumQuery getAncestorForumQuery()
      Gets the query for a forum. Multiple retrievals produce a nested OR term.
      Returns:
      the forum query
      Throws:
      UnimplementedException - supportsAncestorForumQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorForumQuery()} is {@code true} .
    • matchAnyAncestorForum

      void matchAnyAncestorForum(boolean match)
      Matches forums with any ancestor.
      Parameters:
      match - true to match forums with any ancestor, false to match root forums
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorForumTerms

      void clearAncestorForumTerms()
      Clears the ancestor forum terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantForumId

      void matchDescendantForumId(Id forumId, boolean match)
      Sets the forum Id for this query to match forums that have the specified forum as a descendant.
      Parameters:
      forumId - a forum Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - forumId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantForumIdTerms

      void clearDescendantForumIdTerms()
      Clears the descendant forum Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantForumQuery

      boolean supportsDescendantForumQuery()
      Tests if a ForumQuery is available.
      Returns:
      true if a forum query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantForumQuery

      ForumQuery getDescendantForumQuery()
      Gets the query for a forum. Multiple retrievals produce a nested OR term.
      Returns:
      the forum query
      Throws:
      UnimplementedException - supportsDescendantForumQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantForumQuery()} is {@code true} .
    • matchAnyDescendantForum

      void matchAnyDescendantForum(boolean match)
      Matches forums with any descendant.
      Parameters:
      match - true to match forums with any descendant, false to match leaf forums
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantForumTerms

      void clearDescendantForumTerms()
      Clears the descendant forum terms.
      Compliance:
      mandatory - This method must be implemented.
    • getForumQueryRecord

      ForumQueryRecord getForumQueryRecord(Type forumRecordType) throws OperationFailedException
      Gets the forum query record corresponding to the given Forum record Type .Multiple record retrievals produce a nested boolean OR term.
      Parameters:
      forumRecordType - a forum record type
      Returns:
      the forum query record
      Throws:
      NullArgumentException - forumRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(forumRecordType) is false
      Compliance:
      mandatory - This method must be implemented.