microsoft.exchange.webservices.data
Class RuleCollection

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.RuleCollection
All Implemented Interfaces:
java.lang.Iterable<Rule>

public final class RuleCollection
extends ComplexProperty
implements java.lang.Iterable<Rule>

Represents a collection of rules.


Constructor Summary
protected RuleCollection()
          Initializes a new instance of the RuleCollection class.
 
Method Summary
 int getCount()
          Gets the number of rules in this collection.
 boolean getOutlookRuleBlobExists()
          Gets a value indicating whether an Outlook rule blob exists in the user's mailbox.
 Rule getRule(int index)
          Gets the rule at the specified index in the collection.
 java.util.Iterator<Rule> iterator()
          Get an enumerator for the collection
protected  void setOutlookRuleBlobExists(boolean value)
           
protected  boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Tries to read element from XML.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeElementsToXml, writeToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleCollection

protected RuleCollection()
Initializes a new instance of the RuleCollection class.

Method Detail

getOutlookRuleBlobExists

public boolean getOutlookRuleBlobExists()
Gets a value indicating whether an Outlook rule blob exists in the user's mailbox. To update rules with EWS when the Outlook rule blob exists, call SetInboxRules passing true as the value of the removeOutlookBlob parameter.


setOutlookRuleBlobExists

protected void setOutlookRuleBlobExists(boolean value)

getCount

public int getCount()
Gets the number of rules in this collection.


getRule

public Rule getRule(int index)
             throws ArgumentOutOfRangeException
Gets the rule at the specified index in the collection.

Parameters:
index - The index of the rule to get.
Returns:
The rule at the specified index.
Throws:
ArgumentOutOfRangeException

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

iterator

public java.util.Iterator<Rule> iterator()
Get an enumerator for the collection

Specified by:
iterator in interface java.lang.Iterable<Rule>