public final class ImapQueryBuilder extends MailQueryBuilder
Represents the builder of search expression that used by IMAP protocol.
| Constructor and Description |
|---|
ImapQueryBuilder()
Initializes a new instance of the
ImapQueryBuilder class. |
ImapQueryBuilder(Charset defaultEncoding)
Initializes a new instance of the
ImapQueryBuilder class. |
| Modifier and Type | Method and Description |
|---|---|
ESearchOptions |
getESearchParameters()
Gets or sets ESEARCH Parameters
This method works only if server supports ESEARCH extension.
|
IntComparisonField |
getMessageSize()
Gets messages with an specified size.
|
ModificationSequenceField |
getModSeq()
Modification sequence
|
SequenceSetField |
getUniqueId()
Unique identifier
|
MailQuery |
hasFlags(ImapMessageFlags flags)
Search messages with the specified flags.
|
MailQuery |
hasHeader(String fieldName,
String fieldValue)
Search messages that have a header with the specified field-name
and that contains the specified string
in the text of the header (what comes after the colon).
|
MailQuery |
hasNoFlags(ImapMessageFlags flags)
Search messages with the unspecified flags.
|
void |
setESearchParameters(ESearchOptions value)
Gets or sets ESEARCH Parameters
This method works only if server supports ESEARCH extension.
|
getBcc, getBody, getCc, getDefaultEncoding, getFrom, getInternalDate, getQuery, getSentDate, getSubject, getText, getTo, orpublic ImapQueryBuilder(Charset defaultEncoding)
Initializes a new instance of the ImapQueryBuilder class.
defaultEncoding - Contains default encoding (charset) for query builder.public ImapQueryBuilder()
Initializes a new instance of the ImapQueryBuilder class.
public final IntComparisonField getMessageSize()
Gets messages with an specified size.
Value: TheIntComparisonField that represents a message size.public final SequenceSetField getUniqueId()
Unique identifier
public final ESearchOptions getESearchParameters()
Gets or sets ESEARCH Parameters This method works only if server supports ESEARCH extension. Please, read more https://tools.ietf.org/html/rfc4315
public final void setESearchParameters(ESearchOptions value)
Gets or sets ESEARCH Parameters This method works only if server supports ESEARCH extension. Please, read more https://tools.ietf.org/html/rfc4315
public final ModificationSequenceField getModSeq()
Modification sequence
public final MailQuery hasFlags(ImapMessageFlags flags)
Search messages with the specified flags.
flags - The flags.MailQuery that represents search query
(one searching criteria).public final MailQuery hasNoFlags(ImapMessageFlags flags)
Search messages with the unspecified flags.
flags - The flags.MailQuery that represents search query
(one searching criteria).public final MailQuery hasHeader(String fieldName, String fieldValue)
Search messages that have a header with the specified field-name and that contains the specified string in the text of the header (what comes after the colon). If the string to search is zero-length, this matches all messages that have a header line with the specified field-name regardless of the contents.
fieldName - Name of the field.fieldValue - The field value.MailQuery that represents search query
(one searching criteria).