Interface ReplyQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidContainableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSubjugateableQuery, Suppliable

public interface ReplyQuery extends OsidObjectQuery, OsidContainableQuery, OsidSubjugateableQuery

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

  • Method Details

    • matchPostId

      void matchPostId(Id postId, boolean match)
      Sets the post Id for this query to match replies 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} .
    • clearPostTerms

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

      void matchTimestamp(DateTime startTime, DateTime endTime, boolean match)
      Matches entries whose sent time is between the supplied range inclusive.
      Parameters:
      startTime - start time
      endTime - end time
      match - true if for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - startTime is greater than endTime
      NullArgumentException - startTime or endTime is null
      Compliance:
      mandatory - This method must be implemented.
    • clearTimestampTerms

      void clearTimestampTerms()
      Clears the timestamp terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPosterId

      void matchPosterId(Id resourceId, boolean match)
      Matches the poster of the entry.
      Parameters:
      resourceId - resource Id to match
      match - true if for a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearPosterIdTerms

      void clearPosterIdTerms()
      Clears the poster resource Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPosterQuery

      boolean supportsPosterQuery()
      Tests if a ResourceQuery is available for querying posters.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPosterQuery

      ResourceQuery getPosterQuery()
      Gets the query for a resource.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsPosterQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsPosterQuery()} is {@code true} .
    • clearPosterTerms

      void clearPosterTerms()
      Clears the poster terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPostingAgentId

      void matchPostingAgentId(Id agentId, boolean match)
      Matches the posting agent of the entry.
      Parameters:
      agentId - agent Id to match
      match - true if for a positive match, false for a negative match
      Throws:
      NullArgumentException - agentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearPostingAgentIdTerms

      void clearPostingAgentIdTerms()
      Clears the posting agent Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPostingAgentQuery

      boolean supportsPostingAgentQuery()
      Tests if an AgentQuery is available for querying posting agents.
      Returns:
      true if an agent query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPostingAgentQuery

      AgentQuery getPostingAgentQuery()
      Gets the query for an agent.
      Returns:
      the agent query
      Throws:
      UnimplementedException - supportsPostingAgentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsPostingAgentQuery()} is {@code true} .
    • clearPostingAgentTerms

      void clearPostingAgentTerms()
      Clears the posting agent terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSubjectLine

      void matchSubjectLine(String subject, Type stringMatchType, boolean match)
      Adds a subject line to match. Multiple subject line matches can be added to perform a boolean OR among them.
      Parameters:
      subject - display name to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - subject is not of stringMatchType
      NullArgumentException - subject or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnySubjectLine

      void matchAnySubjectLine(boolean match)
      Matches entries with any subject line.
      Parameters:
      match - true to match entries with any subject line, false to match entries with no subject line
      Compliance:
      mandatory - This method must be implemented.
    • clearSubjectLineTerms

      void clearSubjectLineTerms()
      Clears the subject line terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchText

      void matchText(String text, Type stringMatchType, boolean match)
      Adds text to match. Multiple text matches can be added to perform a boolean OR among them.
      Parameters:
      text - text to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - text is not of stringMatchType
      NullArgumentException - text or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyText

      void matchAnyText(boolean match)
      Matches entries with any text.
      Parameters:
      match - true to match entries with any text, false to match entries with no text
      Compliance:
      mandatory - This method must be implemented.
    • clearTextTerms

      void clearTextTerms()
      Clears the text terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchContainingReplyId

      void matchContainingReplyId(Id replyId, boolean match)
      Sets the reply Id for this query to match replies that have the specified reply as an ancestor.
      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.
    • clearContainingReplyIdTerms

      void clearContainingReplyIdTerms()
      Clears the containing reply Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsContainingReplyQuery

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

      ReplyQuery getContainingReplyQuery()
      Gets the query for a containing reply.
      Returns:
      the containing reply query
      Throws:
      UnimplementedException - supportsContainingReplyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsContainingReplyQuery()} is {@code true} .
    • matchAnyContainingReply

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

      void clearContainingReplyTerms()
      Clears the containing reply terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchContainedReplyId

      void matchContainedReplyId(Id replyId, boolean match)
      Sets the reply Id for this query to match replies that have the specified reply as a descendant.
      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.
    • clearContainedReplyIdTerms

      void clearContainedReplyIdTerms()
      Clears the contained reply Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsContainedReplyQuery

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

      ReplyQuery getContainedReplyQuery()
      Gets the query for a contained reply.
      Returns:
      the contained reply query
      Throws:
      UnimplementedException - supportsContainedReplyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsContainedReplyQuery()} is {@code true} .
    • matchAnyContainedReply

      void matchAnyContainedReply(boolean match)
      Matches replies with any descednant reply.
      Parameters:
      match - true to match replies with any descendant reply, false to match replies with no descendant replies
      Compliance:
      mandatory - This method must be implemented.
    • clearContainedReplyTerms

      void clearContainedReplyTerms()
      Clears the contained reply terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchForumId

      void matchForumId(Id forumId, boolean match)
      Sets the post Id for this query to match replies assigned to forums.
      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.
    • clearForumIdTerms

      void clearForumIdTerms()
      Clears the forum Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsForumQuery

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

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

      void clearForumTerms()
      Clears the forum terms.
      Compliance:
      mandatory - This method must be implemented.
    • getReplyQueryRecord

      ReplyQueryRecord getReplyQueryRecord(Type replyRecordType) throws OperationFailedException
      Gets the reply query record corresponding to the given Reply record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      replyRecordType - a reply record type
      Returns:
      the reply query record
      Throws:
      NullArgumentException - replyRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(replyRecordType) is false
      Compliance:
      mandatory - This method must be implemented.