ImapQueryBuilder

Inheritance: java.lang.Object, com.aspose.email.MailQueryBuilder

public final class ImapQueryBuilder extends MailQueryBuilder

Represents the builder of search expression that used by IMAP protocol.

Constructors

ConstructorDescription
ImapQueryBuilder(Charset defaultEncoding)Initializes a new instance of the ImapQueryBuilder class.
ImapQueryBuilder()Initializes a new instance of the ImapQueryBuilder class.

Methods

MethodDescription
customSearch(String fieldValue)Search messages according to extended server search syntax.
equals(Object arg0)
getBcc()Gets the field that allows to find messages that contain the specified string in the envelope structure’s BCC field.
getBody()Gets the field that allows to find messages that contain the specified string in the body of the message.
getCc()Gets the field that allows to find messages that contain the specified string in the envelope structure’s CC field.
getClass()
getDefaultEncoding()Gets default encoding (charset) for query builder
getESearchParameters()Gets or sets ESEARCH Parameters This method works only if server supports ESEARCH extension.
getFrom()Gets the field that allows to find messages that contain the specified string in the envelope structure’s FROM field.
getInternalDate()Gets the field that allows to find messages by internal date.
getMessageSize()Gets messages with an specified size.
getModSeq()Modification sequence
getQuery()Gets the query.
getSentDate()Gets the field that allows to find messages by sent date.
getSubject()Gets the field that allows to find messages that contain the specified string in the envelope structure’s SUBJECT field.
getText()Gets the field that allows to find the messages that contain the specified string in the headers (subject, from, to, cc) and body of the message.
getTo()Gets the field that allows to find messages that contain the specified string in the envelope structure’s TO field.
getUniqueId()Unique identifier
hasFlags(ImapMessageFlags flags)Search messages with the specified flags.
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).
hasNoFlags(ImapMessageFlags flags)Search messages with the unspecified flags.
hashCode()
notify()
notifyAll()
or(MailQuery query1, MailQuery query2)Search messages that match either search key.
setESearchParameters(ESearchOptions value)Gets or sets ESEARCH Parameters This method works only if server supports ESEARCH extension.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

ImapQueryBuilder(Charset defaultEncoding)

public ImapQueryBuilder(Charset defaultEncoding)

Initializes a new instance of the ImapQueryBuilder class.

Parameters:

ParameterTypeDescription
defaultEncodingjava.nio.charset.CharsetContains default encoding (charset) for query builder.

ImapQueryBuilder()

public ImapQueryBuilder()

Initializes a new instance of the ImapQueryBuilder class.

customSearch(String fieldValue)

public final MailQuery customSearch(String fieldValue)

Search messages according to extended server search syntax.

Parameters:

ParameterTypeDescription
fieldValuejava.lang.StringThe field value.

Returns: MailQuery - MailQuery that represents search query (one searching criteria).

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getBcc()

public final StringComparisonField getBcc()

Gets the field that allows to find messages that contain the specified string in the envelope structure’s BCC field.

Value: The DateComparisonField that represents BCC search field.

Returns: StringComparisonField

getBody()

public final StringComparisonField getBody()

Gets the field that allows to find messages that contain the specified string in the body of the message.

Value: The DateComparisonField that represents body search field.

Returns: StringComparisonField

getCc()

public final StringComparisonField getCc()

Gets the field that allows to find messages that contain the specified string in the envelope structure’s CC field.

Value: The DateComparisonField that represents cc search field.

Returns: StringComparisonField

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDefaultEncoding()

public final Charset getDefaultEncoding()

Gets default encoding (charset) for query builder

Returns: java.nio.charset.Charset

getESearchParameters()

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

Returns: ESearchOptions

getFrom()

public final StringComparisonField getFrom()

Gets the field that allows to find messages that contain the specified string in the envelope structure’s FROM field.

Value: The DateComparisonField that represents from search field.

Returns: StringComparisonField

getInternalDate()

public final DateComparisonField getInternalDate()

Gets the field that allows to find messages by internal date.

Value: The DateComparisonField that represents internal date search field.

Returns: DateComparisonField

getMessageSize()

public final IntComparisonField getMessageSize()

Gets messages with an specified size.

Value: The IntComparisonField that represents a message size.

Returns: IntComparisonField

getModSeq()

public final ModificationSequenceField getModSeq()

Modification sequence

Returns: ModificationSequenceField

getQuery()

public MailQuery getQuery()

Gets the query.

Returns: MailQuery - MailQuery that represents search query.

getSentDate()

public final DateComparisonField getSentDate()

Gets the field that allows to find messages by sent date.

Value: The DateComparisonField that represents sent date search field.

Returns: DateComparisonField

getSubject()

public final StringComparisonField getSubject()

Gets the field that allows to find messages that contain the specified string in the envelope structure’s SUBJECT field.

Value: The DateComparisonField that represents subject search field.

Returns: StringComparisonField

getText()

public final StringComparisonField getText()

Gets the field that allows to find the messages that contain the specified string in the headers (subject, from, to, cc) and body of the message.

Value: The DateComparisonField that represents text header or body search fields.

Returns: StringComparisonField

getTo()

public final StringComparisonField getTo()

Gets the field that allows to find messages that contain the specified string in the envelope structure’s TO field.

Value: The DateComparisonField that represents TO search field.

Returns: StringComparisonField

getUniqueId()

public final SequenceSetField getUniqueId()

Unique identifier

Returns: SequenceSetField

hasFlags(ImapMessageFlags flags)

public final MailQuery hasFlags(ImapMessageFlags flags)

Search messages with the specified flags.

Parameters:

ParameterTypeDescription
flagsImapMessageFlagsThe flags.

Returns: MailQuery - MailQuery that represents search query (one searching criteria).

hasHeader(String fieldName, String fieldValue)

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.

Parameters:

ParameterTypeDescription
fieldNamejava.lang.StringName of the field.
fieldValuejava.lang.StringThe field value.

Returns: MailQuery - MailQuery that represents search query (one searching criteria).

hasNoFlags(ImapMessageFlags flags)

public final MailQuery hasNoFlags(ImapMessageFlags flags)

Search messages with the unspecified flags.

Parameters:

ParameterTypeDescription
flagsImapMessageFlagsThe flags.

Returns: MailQuery - MailQuery that represents search query (one searching criteria).

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

or(MailQuery query1, MailQuery query2)

public MailQuery or(MailQuery query1, MailQuery query2)

Search messages that match either search key. Provides disjunction between two expressions (OR).

Parameters:

ParameterTypeDescription
query1MailQueryThe query1.
query2MailQueryThe query2.

Returns: MailQuery - MailQuery that represents search query (one searching criterion).

setESearchParameters(ESearchOptions value)

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

Parameters:

ParameterTypeDescription
valueESearchOptions

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int