public final class InboxRule extends Object
Represents a inbox rule
Constructor and Description |
---|
InboxRule()
Initializes a new instance of the
InboxRule class |
Modifier and Type | Method and Description |
---|---|
static InboxRule |
createRuleDeleteContaining(String[] filter)
Creates inbox rule that deletes messages containing the specified strings in either the body or the subject
|
static InboxRule |
createRuleDeleteFrom(MailAddress from)
Creates inbox rule that deletes messages from specified senders
|
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
|
static InboxRule |
createRuleMoveFrom(MailAddress from,
String destinationFolderId)
Creates inbox rule that moves messages from specified senders into the specified folder
|
RuleActions |
getActions()
Gets or sets the actions to be taken on a message when the conditions are fulfilled.
|
RulePredicates |
getConditions()
Gets or sets the conditions that, when fulfilled, will trigger the rule actions for that rule.
|
String |
getDisplayName()
Gets or sets the display name of a rule.
|
RulePredicates |
getExceptions()
Gets or sets the exceptions that represent all the available rule exception conditions for the inbox rule.
|
int |
getPriority()
Gets or sets a value that indicates the order in which a rule is to be run.
|
String |
getRuleId()
Gets or sets the rule identifier.
|
boolean |
isEnabled()
Gets or sets a value indicating whether the rule is enabled.
|
boolean |
isInError()
Gets a value indicating whether the rule is in an error condition.
|
boolean |
isNotSupported()
Gets a value indicating whether the rule cannot be modified with the managed code APIs.
|
Boolean |
isReadOnly()
Gets or sets a value indicating whether the rule is read-only.
|
void |
setActions(RuleActions value)
Gets or sets the actions to be taken on a message when the conditions are fulfilled.
|
void |
setConditions(RulePredicates value)
Gets or sets the conditions that, when fulfilled, will trigger the rule actions for that rule.
|
void |
setDisplayName(String value)
Gets or sets the display name of a rule.
|
void |
setEnabled(boolean value)
Gets or sets a value indicating whether the rule is enabled.
|
void |
setExceptions(RulePredicates value)
Gets or sets the exceptions that represent all the available rule exception conditions for the inbox rule.
|
void |
setPriority(int value)
Gets or sets a value that indicates the order in which a rule is to be run.
|
void |
setReadOnly(Boolean value)
Gets or sets a value indicating whether the rule is read-only.
|
void |
setRuleId(String value)
Gets or sets the rule identifier.
|
public InboxRule()
Initializes a new instance of the InboxRule
class
public final String getRuleId()
Gets or sets the rule identifier.
public final void setRuleId(String value)
Gets or sets the rule identifier.
public final String getDisplayName()
Gets or sets the display name of a rule.
public final void setDisplayName(String value)
Gets or sets the display name of a rule.
public final int getPriority()
Gets or sets a value that indicates the order in which a rule is to be run.
public final void setPriority(int value)
Gets or sets a value that indicates the order in which a rule is to be run.
public final boolean isEnabled()
Gets or sets a value indicating whether the rule is enabled.
public final void setEnabled(boolean value)
Gets or sets a value indicating whether the rule is enabled.
public final Boolean isReadOnly()
Gets or sets a value indicating whether the rule is read-only.
public final void setReadOnly(Boolean value)
Gets or sets a value indicating whether the rule is read-only.
public final boolean isNotSupported()
Gets a value indicating whether the rule cannot be modified with the managed code APIs.
public final boolean isInError()
Gets a value indicating whether the rule is in an error condition.
public final RulePredicates getConditions()
Gets or sets the conditions that, when fulfilled, will trigger the rule actions for that rule.
public final void setConditions(RulePredicates value)
Gets or sets the conditions that, when fulfilled, will trigger the rule actions for that rule.
public final RulePredicates getExceptions()
Gets or sets the exceptions that represent all the available rule exception conditions for the inbox rule.
public final void setExceptions(RulePredicates value)
Gets or sets the exceptions that represent all the available rule exception conditions for the inbox rule.
public final RuleActions getActions()
Gets or sets the actions to be taken on a message when the conditions are fulfilled.
public final void setActions(RuleActions value)
Gets or sets the actions to be taken on a message when the conditions are fulfilled.
public static InboxRule createRuleMoveFrom(MailAddress from, String destinationFolderId)
Creates inbox rule that moves messages from specified senders into the specified folder
from
- A EmailAddress
of senderdestinationFolderId
- An id of folder in which messages will be movedInboxRule
AsposeArgumentNullException
- from
is null
AsposeArgumentException
- destinationFolderId
is null
or empty
public static InboxRule createRuleDeleteFrom(MailAddress from)
Creates inbox rule that deletes messages from specified senders
from
- A EmailAddress
of senderInboxRule
AsposeArgumentNullException
- from
is null
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
filter
- A strings to searchdestinationFolderId
- An id of folder in which messages will be movedInboxRule
AsposeArgumentException
- filter
is null
or empty
AsposeArgumentException
- destinationFolderId
is null
or empty
public static InboxRule createRuleDeleteContaining(String[] filter)
Creates inbox rule that deletes messages containing the specified strings in either the body or the subject
filter
- A strings to searchInboxRule
AsposeArgumentException
- filter
is null
or empty