Class Rule
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.Rule
-
- All Implemented Interfaces:
ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>
public final class Rule extends ComplexProperty
Represents a rule that automatically handles incoming messages. A rule consists of a set of conditions and exception that determine whether or not a set of actions should be executed on incoming messages.
-
-
Constructor Summary
Constructors Constructor Description Rule()Initializes a new instance of the Rule class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleActionsgetActions()Gets the actions that should be executed against incoming messages if the conditions evaluate as true.RulePredicatesgetConditions()Gets the conditions that determine whether or not this rule should be executed against incoming messages.StringgetDisplayName()Gets or sets the name of this rule as it should be displayed to the user.RulePredicatesgetExceptions()Gets the exception that determine if this rule should be skipped even if its conditions evaluate to true.StringgetId()Gets or sets the Id of this rule.booleangetIsEnabled()Gets or sets a value indicating whether this rule is enabled.booleangetIsInError()Gets or sets a value indicating whether this rule has errors.booleangetIsNotSupported()Gets a value indicating whether this rule can be modified via EWS.intgetPriority()Gets or sets the priority of this rule, which determines its execution order.protected voidinternalValidate()Validates this instance.voidsetDisplayName(String value)voidsetId(String value)voidsetIsEnabled(boolean value)voidsetIsInError(boolean value)voidsetPriority(int value)booleantryReadElementFromXml(EwsServiceXmlReader reader)Tries to read element from XML.voidwriteElementsToXml(EwsServiceXmlWriter writer)Writes elements to XML.-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXml
-
-
-
-
Constructor Detail
-
Rule
public Rule()
Initializes a new instance of the Rule class.
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
Gets or sets the name of this rule as it should be displayed to the user.
-
setDisplayName
public void setDisplayName(String value)
-
getPriority
public int getPriority()
Gets or sets the priority of this rule, which determines its execution order.
-
setPriority
public void setPriority(int value)
-
getIsEnabled
public boolean getIsEnabled()
Gets or sets a value indicating whether this rule is enabled.
-
setIsEnabled
public void setIsEnabled(boolean value)
-
getIsNotSupported
public boolean getIsNotSupported()
Gets a value indicating whether this rule can be modified via EWS. If IsNotSupported is true, the rule cannot be modified via EWS.
-
getIsInError
public boolean getIsInError()
Gets or sets a value indicating whether this rule has errors. A rule that is in error cannot be processed unless it is updated and the error is corrected.
-
setIsInError
public void setIsInError(boolean value)
-
getConditions
public RulePredicates getConditions()
Gets the conditions that determine whether or not this rule should be executed against incoming messages.
-
getActions
public RuleActions getActions()
Gets the actions that should be executed against incoming messages if the conditions evaluate as true.
-
getExceptions
public RulePredicates getExceptions()
Gets the exception that determine if this rule should be skipped even if its conditions evaluate to true.
-
tryReadElementFromXml
public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception
Tries to read element from XML.- Overrides:
tryReadElementFromXmlin classComplexProperty- Parameters:
reader- The reader.- Returns:
- True if element was read.
- Throws:
Exception
-
writeElementsToXml
public void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
Writes elements to XML.- Overrides:
writeElementsToXmlin classComplexProperty- Parameters:
writer- The writer.- Throws:
Exception
-
internalValidate
protected void internalValidate() throws Exception
Validates this instance.- Overrides:
internalValidatein classComplexProperty- Throws:
Exception- the exception
-
-