Interface MailboxQuery

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

public interface MailboxQuery extends OsidCatalogQuery

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

  • Method Details

    • matchMessageId

      void matchMessageId(Id messageId, boolean match)
      Sets the message Id for this query.
      Parameters:
      messageId - a message Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - messageId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearMessageIdTerms

      void clearMessageIdTerms()
      Clears the message Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsMessageQuery

      boolean supportsMessageQuery()
      Tests if a MessageQuery is available.
      Returns:
      true if a message query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getMessageQuery

      MessageQuery getMessageQuery()
      Gets the query for a message. Multiple retrievals produce a nested OR term.
      Returns:
      the message query
      Throws:
      UnimplementedException - supportsMessageQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsMessageQuery()} is {@code true} .
    • matchAnyMessage

      void matchAnyMessage(boolean match)
      Matches mailboxes with any messages.
      Parameters:
      match - true to match mailboxes with any messages, false to match mailboxes with no messages
      Compliance:
      mandatory - This method must be implemented.
    • clearMessageTerms

      void clearMessageTerms()
      Clears the message terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorMailboxId

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

      void clearAncestorMailboxIdTerms()
      Clears the ancestor mailbox Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorMailboxQuery

      boolean supportsAncestorMailboxQuery()
      Tests if a MailboxQuery is available.
      Returns:
      true if a mailbox query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorMailboxQuery

      MailboxQuery getAncestorMailboxQuery()
      Gets the query for a mailbox. Multiple retrievals produce a nested OR term.
      Returns:
      the mailbox query
      Throws:
      UnimplementedException - supportsAncestorMailboxQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorMailboxQuery()} is {@code true} .
    • matchAnyAncestorMailbox

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

      void clearAncestorMailboxTerms()
      Clears the ancestor mailbox terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantMailboxId

      void matchDescendantMailboxId(Id mailboxId, boolean match)
      Sets the mailbox Id for this query to match mailboxes that have the specified mailbox as a descendant.
      Parameters:
      mailboxId - a mailbox Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - mailboxId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantMailboxIdTerms

      void clearDescendantMailboxIdTerms()
      Clears the descendant mailbox Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantMailboxQuery

      boolean supportsDescendantMailboxQuery()
      Tests if a MailboxQuery is available.
      Returns:
      true if a mailbox query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantMailboxQuery

      MailboxQuery getDescendantMailboxQuery()
      Gets the query for a mailbox. Multiple retrievals produce a nested OR term.
      Returns:
      the mailbox query
      Throws:
      UnimplementedException - supportsDescendantMailboxQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantMailboxQuery()} is {@code true} .
    • matchAnyDescendantMailbox

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

      void clearDescendantMailboxTerms()
      Clears the descendant mailbox terms.
      Compliance:
      mandatory - This method must be implemented.
    • getMailboxQueryRecord

      MailboxQueryRecord getMailboxQueryRecord(Type mailboxRecordType) throws OperationFailedException, PermissionDeniedException
      Gets the mailbox query record corresponding to the given Mailbox record Type .Multiple retrievals produce a nested OR term.
      Parameters:
      mailboxRecordType - a mailbox record type
      Returns:
      the mailbox query record
      Throws:
      NullArgumentException - mailboxRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - hasRecordType(mailboxRecordType) is false
      Compliance:
      mandatory - This method must be implemented.