Interface PostQuery

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

public interface PostQuery extends OsidObjectQuery

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

  • Method Details

    • 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 - 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 Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPosterQuery

      boolean supportsPosterQuery()
      Tests if a ResourceQuery is available for querying senders.
      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 - 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 posters.
      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.
    • matchReplyId

      void matchReplyId(Id replyId, boolean match)
      Sets the reply Id for this query to match replies assigned to posts.
      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 post.
      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 posts with any reply.
      Parameters:
      match - true to match posts with any reply, false to match posts with no replies
      Compliance:
      mandatory - This method must be implemented.
    • clearReplyTerms

      void clearReplyTerms()
      Clears the 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.
    • getPostQueryRecord

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