public interface MessageQuery extends OsidObjectQuery
This is the query for searching messages. Each method specifies an
AND
term while multiple invocations of the same method
produce a nested OR.
Modifier and Type | Method and Description |
---|---|
void |
clearDeliveryTimeTerms()
Clears the delivery time terms.
|
void |
clearMailboxIdTerms()
Clears the mailbox
Id terms. |
void |
clearMailboxTerms()
Clears the mailbox terms.
|
void |
clearReceiptIdTerms()
Clears the receipt
Id terms. |
void |
clearReceiptTerms()
Clears the receipt terms.
|
void |
clearReceivedTimeTerms()
Clears the received time terms.
|
void |
clearRecipientIdTerms()
Clears the recipient
Id terms. |
void |
clearRecipientTerms()
Clears the recipient terms.
|
void |
clearSenderIdTerms()
Clears the sender
Id terms. |
void |
clearSenderTerms()
Clears the sender terms.
|
void |
clearSendingAgentIdTerms()
Clears the sending agent
Id terms. |
void |
clearSendingAgentTerms()
Clears the sending agent terms.
|
void |
clearSentTerms()
Clears the sent terms.
|
void |
clearSentTimeTerms()
Clears the sent time terms.
|
void |
clearSubjectLineTerms()
Clears the subject line terms.
|
void |
clearTextTerms()
Clears the text terms.
|
MailboxQuery |
getMailboxQuery()
Gets the query for a mailbox.
|
MessageQueryRecord |
getMessageQueryRecord(Type messageRecordType)
Gets the message query record corresponding to the given
Message record Type. |
ReceiptQuery |
getReceiptQuery()
Gets the query for the receipt.
|
ResourceQuery |
getRecipientQuery()
Gets the query for a recipient resource.
|
ResourceQuery |
getSenderQuery()
Gets the query for a resource.
|
AgentQuery |
getSendingAgentQuery()
Gets the query for an agent.
|
void |
matchAnyReceipt(boolean match)
Matches any received messages.
|
void |
matchAnySubjectLine(boolean match)
Matches messages with any subject line.
|
void |
matchAnyText(boolean match)
Matches messages with any text.
|
void |
matchDeliveryTime(Duration start,
Duration end,
boolean match)
Matches messages whose delivery duration is between the supplied range
inclusive.
|
void |
matchMailboxId(Id mailboxId,
boolean match)
Sets the mailbox
Id for this query. |
void |
matchReceiptId(Id receiptId,
boolean match)
Matches the receipt of the message.
|
void |
matchReceivedTime(DateTime startTime,
DateTime endTime,
boolean match)
Matches messages whose received time is between the supplied range
inclusive.
|
void |
matchRecipientId(Id resourceId,
boolean match)
Matches any recipient of the message.
|
void |
matchSenderId(Id resourceId,
boolean match)
Matches the sender of the message.
|
void |
matchSendingAgentId(Id agentId,
boolean match)
Matches the sending agent of the message.
|
void |
matchSent(boolean match)
Matches messages that have been sent.
|
void |
matchSentTime(DateTime startTime,
DateTime endTime,
boolean match)
Matches messages whose sent time is between the supplied range
inclusive.
|
void |
matchSubjectLine(java.lang.String subject,
Type stringMatchType,
boolean match)
Adds a subject line to match.
|
void |
matchText(java.lang.String text,
Type stringMatchType,
boolean match)
Adds text to match.
|
boolean |
supportsMailboxQuery()
Tests if a
MailboxQuery is available. |
boolean |
supportsReceiptQuery()
Tests if a
ReceiptQuery is available for querying
receipts. |
boolean |
supportsRecipientQuery()
Tests if a
ResourceQuery is available for querying
recipients. |
boolean |
supportsSenderQuery()
Tests if a
ResourceQuery is available for querying
senders. |
boolean |
supportsSendingAgentQuery()
Tests if an
AgentQuery is available for querying
senders. |
clearCommentIdTerms, clearCommentTerms, clearCreditIdTerms, clearCreditTerms, clearDescriptionTerms, clearDisplayNameTerms, clearGenusTypeTerms, clearJournalEntryIdTerms, clearJournalEntryTerms, clearParentGenusTypeTerms, clearRelationshipIdTerms, clearRelationshipPeerIdTerms, clearRelationshipTerms, clearStateIdTerms, clearStateTerms, clearStatisticTerms, clearSubjectIdTerms, clearSubjectRelevancyTerms, clearSubjectTerms, getCommentQuery, getCreditQuery, getJournalEntryQuery, getRelationshipQuery, getStateQuery, getStatisticQuery, getSubjectQuery, getSubjectRelevancyQuery, matchAnyComment, matchAnyCredit, matchAnyDescription, matchAnyDisplayName, matchAnyGenusType, matchAnyJournalEntry, matchAnyRelationship, matchAnyState, matchAnyStatistic, matchAnySubject, matchCommentId, matchCreditId, matchDescription, matchDisplayName, matchGenusType, matchJournalEntryId, matchParentGenusType, matchRelationshipId, matchRelationshipPeerId, matchStateId, matchSubjectId, supportsCommentQuery, supportsCreditQuery, supportsJournalEntryQuery, supportsRelationshipQuery, supportsStateQuery, supportsStatisticQuery, supportsSubjectQuery, supportsSubjectRelevancyQuery
clearIdTerms, matchId
clearRecordTerms, matchAnyRecord, matchRecordType
getRecordTypes, hasRecordType
clearAnyTerms, clearKeywordTerms, getStringMatchTypes, matchAny, matchKeyword, supportsStringMatchType
void matchSubjectLine(java.lang.String subject, Type stringMatchType, boolean match)
OR
among them.subject
- subject to matchstringMatchType
- the string match typematch
- true
for a positive match, false
for a negative matchInvalidArgumentException
- subject is
not of stringMatchType
NullArgumentException
- subject
or
stringMatchType
is null
UnsupportedException
-
supportsStringMatchType(stringMatchType)
is
false
mandatory
- This method must be implemented. void matchAnySubjectLine(boolean match)
match
- true
to match messages with any subject
line, false
to match messages with no subject
linemandatory
- This method must be implemented. void clearSubjectLineTerms()
mandatory
- This method must be implemented. void matchText(java.lang.String text, Type stringMatchType, boolean match)
OR
among them.text
- dtext to matchstringMatchType
- the string match typematch
- true
for a positive match, false
for a negative matchInvalidArgumentException
- text is
not
of stringMatchType
NullArgumentException
- text
or
stringMatchType
is null
UnsupportedException
-
supportsStringMatchType(stringMatchType)
is
false
mandatory
- This method must be implemented. void matchAnyText(boolean match)
match
- true
to match messages with any text,
false
to match messages with no textmandatory
- This method must be implemented. void clearTextTerms()
mandatory
- This method must be implemented. void matchSent(boolean match)
match
- true
to match sent messages, false
to match unsent messagesmandatory
- This method must be implemented. void clearSentTerms()
mandatory
- This method must be implemented. void matchSentTime(DateTime startTime, DateTime endTime, boolean match)
startTime
- start timeendTime
- end timematch
- true
if for a positive match,
false
for a negative matchInvalidArgumentException
- startTime
is
greater than endTime
NullArgumentException
- startTime
or
endTime
is null
mandatory
- This method must be implemented. void clearSentTimeTerms()
mandatory
- This method must be implemented. void matchSenderId(Id resourceId, boolean match)
resourceId
- Id
to matchmatch
- true
if for a positive match,
false
for a negative matchNullArgumentException
- resourceId
is
null
mandatory
- This method must be implemented. void clearSenderIdTerms()
Id
terms.mandatory
- This method must be implemented. boolean supportsSenderQuery()
ResourceQuery
is available for querying
senders. true
if a resource query is available,
false
otherwisemandatory
- This method must be implemented. ResourceQuery getSenderQuery()
UnimplementedException
- supportsSenderQuery()
is false
optional
- This method must be implemented if
supportsSenderQuery()
is true.
void clearSenderTerms()
mandatory
- This method must be implemented. void matchSendingAgentId(Id agentId, boolean match)
agentId
- Id
to matchmatch
- true
if for a positive match,
false
for a negative matchNullArgumentException
- agentId
is
null
mandatory
- This method must be implemented. void clearSendingAgentIdTerms()
Id
terms.mandatory
- This method must be implemented. boolean supportsSendingAgentQuery()
AgentQuery
is available for querying
senders. true
if an agent query is available,
false
otherwisemandatory
- This method must be implemented. AgentQuery getSendingAgentQuery()
UnimplementedException
-
supportsSendingAgentQuery()
is false
optional
- This method must be implemented if
supportsSendingAgentQuery()
is true.
void clearSendingAgentTerms()
mandatory
- This method must be implemented. void matchReceivedTime(DateTime startTime, DateTime endTime, boolean match)
startTime
- start timeendTime
- end timematch
- true
if for a positive match,
false
for a negative matchInvalidArgumentException
- startTime
is
greater than endTime
NullArgumentException
- startTime
or
endTime
is null
mandatory
- This method must be implemented. void clearReceivedTimeTerms()
mandatory
- This method must be implemented. void matchDeliveryTime(Duration start, Duration end, boolean match)
start
- start timeend
- end timematch
- true
if for a positive match,
false
for a negative matchInvalidArgumentException
- start
is
greater than end
NullArgumentException
- start
or
end
is null
mandatory
- This method must be implemented. void clearDeliveryTimeTerms()
mandatory
- This method must be implemented. void matchRecipientId(Id resourceId, boolean match)
resourceId
- Id
to matchmatch
- true
if for a positive match,
false
for a negative matchNullArgumentException
- resourceId
is
null
mandatory
- This method must be implemented. void clearRecipientIdTerms()
Id
terms.mandatory
- This method must be implemented. boolean supportsRecipientQuery()
ResourceQuery
is available for querying
recipients. true
if a resource query is available,
false
otherwisemandatory
- This method must be implemented. ResourceQuery getRecipientQuery()
UnimplementedException
-
supportsRecipientQuery()
is false
optional
- This method must be implemented if
supportsRecipientQuery()
is true.
void clearRecipientTerms()
mandatory
- This method must be implemented. void matchReceiptId(Id receiptId, boolean match)
receiptId
- Id
to matchmatch
- true
if for a positive match,
false
for a negative matchNullArgumentException
- receiptId
is
null
mandatory
- This method must be implemented. void clearReceiptIdTerms()
Id
terms.mandatory
- This method must be implemented. boolean supportsReceiptQuery()
ReceiptQuery
is available for querying
receipts. true
if a receipt query is available,
false
otherwisemandatory
- This method must be implemented. ReceiptQuery getReceiptQuery()
UnimplementedException
- supportsReceiptQuery()
is false
optional
- This method must be implemented if
supportsReceiptQuery()
is true.
void matchAnyReceipt(boolean match)
match
- true
to match any received messages,
false
otherwisemandatory
- This method must be implemented. void clearReceiptTerms()
mandatory
- This method must be implemented. void matchMailboxId(Id mailboxId, boolean match)
Id
for this query.mailboxId
- the mailbox Id
match
- true
for a positive match, false
for a negative matchNullArgumentException
- mailboxId
is
null
mandatory
- This method must be implemented. void clearMailboxIdTerms()
Id
terms.mandatory
- This method must be implemented. boolean supportsMailboxQuery()
MailboxQuery
is available. true
if a mailbox query is available,
false
otherwisemandatory
- This method must be implemented. MailboxQuery getMailboxQuery()
OR
term.UnimplementedException
- supportsMailboxQuery()
is false
optional
- This method must be implemented if
supportsMailboxQuery()
is true.
void clearMailboxTerms()
mandatory
- This method must be implemented. MessageQueryRecord getMessageQueryRecord(Type messageRecordType) throws OperationFailedException
Message
record Type.
Multiple retrievals
produce a nested OR
term.messageRecordType
- a message record typeNullArgumentException
- messageRecordType
is null
OperationFailedException
- unable to complete requestUnsupportedException
-
hasRecordType(messageRecordType)
is false
mandatory
- This method must be implemented.