microsoft.exchange.webservices.data
Class Rule

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.Rule

public final class Rule
extends ComplexProperty

Represents a rule that automatically handles incoming messages. A rule consists of a set of conditions and exceptions that determine whether or not a set of actions should be executed on incoming messages.


Constructor Summary
Rule()
          Initializes a new instance of the Rule class.
 
Method Summary
 RuleActions getActions()
          Gets the actions that should be executed against incoming messages if the conditions evaluate as true.
 RulePredicates getConditions()
          Gets the conditions that determine whether or not this rule should be executed against incoming messages.
 java.lang.String getDisplayName()
          Gets or sets the name of this rule as it should be displayed to the user.
 RulePredicates getExceptions()
          Gets the exceptions that determine if this rule should be skipped even if its conditions evaluate to true.
 java.lang.String getId()
          Gets or sets the Id of this rule.
 boolean getIsEnabled()
          Gets or sets a value indicating whether this rule is enabled.
 boolean getIsInError()
          Gets or sets a value indicating whether this rule has errors.
 boolean getIsNotSupported()
          Gets a value indicating whether this rule can be modified via EWS.
 int getPriority()
          Gets or sets the priority of this rule, which determines its execution order.
protected  void internalValidate()
          Validates this instance.
 void setDisplayName(java.lang.String value)
           
 void setId(java.lang.String value)
           
 void setIsEnabled(boolean value)
           
 void setIsInError(boolean value)
           
 void setPriority(int value)
           
protected  boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Tries to read element from XML.
protected  void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes elements to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rule

public Rule()
Initializes a new instance of the Rule class.

Method Detail

getId

public java.lang.String getId()
Gets or sets the Id of this rule.


setId

public void setId(java.lang.String value)

getDisplayName

public java.lang.String getDisplayName()
Gets or sets the name of this rule as it should be displayed to the user.


setDisplayName

public void setDisplayName(java.lang.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 exceptions that determine if this rule should be skipped even if its conditions evaluate to true.


tryReadElementFromXml

protected boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                                 throws java.lang.Exception
Tries to read element from XML.

Overrides:
tryReadElementFromXml in class ComplexProperty
Parameters:
reader - The reader.
Returns:
True if element was read.
Throws:
java.lang.Exception

writeElementsToXml

protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                           throws java.lang.Exception
Writes elements to XML.

Overrides:
writeElementsToXml in class ComplexProperty
Parameters:
writer - The writer.
Throws:
java.lang.Exception

internalValidate

protected void internalValidate()
                         throws java.lang.Exception
Validates this instance.

Overrides:
internalValidate in class ComplexProperty
Throws:
java.lang.Exception