InboxRule

Inheritance: java.lang.Object

public final class InboxRule

Represents a inbox rule

Constructors

Constructor Description
InboxRule() Initializes a new instance of the InboxRule class

Methods

Method Description
getRuleId() Gets or sets the rule identifier.
setRuleId(String value) Gets or sets the rule identifier.
getDisplayName() Gets or sets the display name of a rule.
setDisplayName(String value) Gets or sets the display name of a rule.
getPriority() Gets or sets a value that indicates the order in which a rule is to be run.
setPriority(int value) Gets or sets a value that indicates the order in which a rule is to be run.
isEnabled() Gets or sets a value indicating whether the rule is enabled.
setEnabled(boolean value) Gets or sets a value indicating whether the rule is enabled.
isReadOnly() Gets or sets a value indicating whether the rule is read-only.
setReadOnly(Boolean value) Gets or sets a value indicating whether the rule is read-only.
isNotSupported() Gets a value indicating whether the rule cannot be modified with the managed code APIs.
isInError() Gets a value indicating whether the rule is in an error condition.
getConditions() Gets or sets the conditions that, when fulfilled, will trigger the rule actions for that rule.
setConditions(RulePredicates value) Gets or sets the conditions that, when fulfilled, will trigger the rule actions for that rule.
getExceptions() Gets or sets the exceptions that represent all the available rule exception conditions for the inbox rule.
setExceptions(RulePredicates value) Gets or sets the exceptions that represent all the available rule exception conditions for the inbox rule.
getActions() Gets or sets the actions to be taken on a message when the conditions are fulfilled.
setActions(RuleActions value) Gets or sets the actions to be taken on a message when the conditions are fulfilled.
createRuleMoveFrom(MailAddress from, String destinationFolderId) Creates inbox rule that moves messages from specified senders into the specified folder
createRuleDeleteFrom(MailAddress from) Creates inbox rule that deletes messages from specified senders
createRuleMoveContaining(String[] filter, String destinationFolderId) Creates inbox rule that moves messages containing the specified strings in either the body or the subject into the specified folder
createRuleDeleteContaining(String[] filter) Creates inbox rule that deletes messages containing the specified strings in either the body or the subject

InboxRule()

public InboxRule()

Initializes a new instance of the InboxRule class

getRuleId()

public final String getRuleId()

Gets or sets the rule identifier.

Returns: java.lang.String

setRuleId(String value)

public final void setRuleId(String value)

Gets or sets the rule identifier.

Parameters:

Parameter Type Description
value java.lang.String

getDisplayName()

public final String getDisplayName()

Gets or sets the display name of a rule.

Returns: java.lang.String

setDisplayName(String value)

public final void setDisplayName(String value)

Gets or sets the display name of a rule.

Parameters:

Parameter Type Description
value java.lang.String

getPriority()

public final int getPriority()

Gets or sets a value that indicates the order in which a rule is to be run.

Returns: int

setPriority(int value)

public final void setPriority(int value)

Gets or sets a value that indicates the order in which a rule is to be run.

Parameters:

Parameter Type Description
value int

isEnabled()

public final boolean isEnabled()

Gets or sets a value indicating whether the rule is enabled.

Returns: boolean

setEnabled(boolean value)

public final void setEnabled(boolean value)

Gets or sets a value indicating whether the rule is enabled.

Parameters:

Parameter Type Description
value boolean

isReadOnly()

public final Boolean isReadOnly()

Gets or sets a value indicating whether the rule is read-only.

Returns: java.lang.Boolean

setReadOnly(Boolean value)

public final void setReadOnly(Boolean value)

Gets or sets a value indicating whether the rule is read-only.

Parameters:

Parameter Type Description
value java.lang.Boolean

isNotSupported()

public final boolean isNotSupported()

Gets a value indicating whether the rule cannot be modified with the managed code APIs.

Returns: boolean

isInError()

public final boolean isInError()

Gets a value indicating whether the rule is in an error condition.

Returns: boolean

getConditions()

public final RulePredicates getConditions()

Gets or sets the conditions that, when fulfilled, will trigger the rule actions for that rule.

Returns: RulePredicates

setConditions(RulePredicates value)

public final void setConditions(RulePredicates value)

Gets or sets the conditions that, when fulfilled, will trigger the rule actions for that rule.

Parameters:

Parameter Type Description
value RulePredicates

getExceptions()

public final RulePredicates getExceptions()

Gets or sets the exceptions that represent all the available rule exception conditions for the inbox rule.

Returns: RulePredicates

setExceptions(RulePredicates value)

public final void setExceptions(RulePredicates value)

Gets or sets the exceptions that represent all the available rule exception conditions for the inbox rule.

Parameters:

Parameter Type Description
value RulePredicates

getActions()

public final RuleActions getActions()

Gets or sets the actions to be taken on a message when the conditions are fulfilled.

Returns: RuleActions

setActions(RuleActions value)

public final void setActions(RuleActions value)

Gets or sets the actions to be taken on a message when the conditions are fulfilled.

Parameters:

Parameter Type Description
value RuleActions

createRuleMoveFrom(MailAddress from, String destinationFolderId)

public static InboxRule createRuleMoveFrom(MailAddress from, String destinationFolderId)

Creates inbox rule that moves messages from specified senders into the specified folder

Parameters:

Parameter Type Description
from MailAddress A EmailAddress of sender
destinationFolderId java.lang.String An id of folder in which messages will be moved

Returns: InboxRule - A created InboxRule

createRuleDeleteFrom(MailAddress from)

public static InboxRule createRuleDeleteFrom(MailAddress from)

Creates inbox rule that deletes messages from specified senders

Parameters:

Parameter Type Description
from MailAddress A EmailAddress of sender

Returns: InboxRule - A created InboxRule

createRuleMoveContaining(String[] filter, String destinationFolderId)

public static InboxRule createRuleMoveContaining(String[] filter, String destinationFolderId)

Creates inbox rule that moves messages containing the specified strings in either the body or the subject into the specified folder

Parameters:

Parameter Type Description
filter java.lang.String[] A strings to search
destinationFolderId java.lang.String An id of folder in which messages will be moved

Returns: InboxRule - A created InboxRule

createRuleDeleteContaining(String[] filter)

public static InboxRule createRuleDeleteContaining(String[] filter)

Creates inbox rule that deletes messages containing the specified strings in either the body or the subject

Parameters:

Parameter Type Description
filter java.lang.String[] A strings to search

Returns: InboxRule - A created InboxRule