microsoft.exchange.webservices.data
Class ExtendedPropertyCollection

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.ComplexPropertyCollection<ExtendedProperty>
          extended by microsoft.exchange.webservices.data.ExtendedPropertyCollection
All Implemented Interfaces:
java.lang.Iterable<ExtendedProperty>

public final class ExtendedPropertyCollection
extends ComplexPropertyCollection<ExtendedProperty>

Represents a collection of extended properties.


Constructor Summary
ExtendedPropertyCollection()
           
 
Method Summary
protected  ExtendedProperty createComplexProperty(java.lang.String xmlElementName)
          Creates the complex property.
protected  java.lang.String getCollectionItemXmlElementName(ExtendedProperty complexProperty)
          Gets the name of the collection item XML element.
protected  void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader, java.lang.String localElementName)
          * Loads from XML.
protected  boolean removeExtendedProperty(ExtendedPropertyDefinition propertyDefinition)
          * Removes a specific extended property definition from the collection.
protected  void setExtendedProperty(ExtendedPropertyDefinition propertyDefinition, java.lang.Object value)
          * Sets an extended property.
protected
<T> boolean
tryGetValue(java.lang.Class<T> cls, ExtendedPropertyDefinition propertyDefinition, OutParam<T> propertyValueOut)
          Tries to get property value.
 boolean writeDeleteUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, ServiceObject ewsObject)
          * Writes the deletion update to XML.
 boolean writeSetUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, ServiceObject ewsObject, PropertyDefinition propertyDefinition)
          * Writes the update to XML.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, java.lang.String xmlElementName)
          * Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexPropertyCollection
clearChangeLog, complexPropertyChanged, contains, getAddedItems, getCount, getItems, getModifiedItems, getPropertyAtIndex, getRemovedItems, indexOf, internalAdd, internalClear, internalRemove, internalRemoveAt, itemChanged, iterator, loadFromXml, removeFromChangeLog, shouldWriteToXml, updateFromXml, writeElementsToXml, writeToXml
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, func, getNamespace, internalValidate, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, validate, writeAttributesToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedPropertyCollection

public ExtendedPropertyCollection()
Method Detail

createComplexProperty

protected ExtendedProperty createComplexProperty(java.lang.String xmlElementName)
Creates the complex property.

Specified by:
createComplexProperty in class ComplexPropertyCollection<ExtendedProperty>
Parameters:
xmlElementName - Name of the XML element.
Returns:
Complex property instance.

getCollectionItemXmlElementName

protected java.lang.String getCollectionItemXmlElementName(ExtendedProperty complexProperty)
Gets the name of the collection item XML element.

Specified by:
getCollectionItemXmlElementName in class ComplexPropertyCollection<ExtendedProperty>
Parameters:
complexProperty - The complex property.
Returns:
XML element name.

loadFromXml

protected void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader,
                           java.lang.String localElementName)
                    throws java.lang.Exception
* Loads from XML.

Overrides:
loadFromXml in class ComplexPropertyCollection<ExtendedProperty>
Parameters:
reader - The reader.
localElementName - Name of the local element.
Throws:
java.lang.Exception - the exception

writeToXml

protected void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                          java.lang.String xmlElementName)
                   throws java.lang.Exception
* Writes to XML.

Overrides:
writeToXml in class ComplexProperty
Parameters:
writer - The writer.
xmlElementName - Name of the XML element.
Throws:
java.lang.Exception - the exception

setExtendedProperty

protected void setExtendedProperty(ExtendedPropertyDefinition propertyDefinition,
                                   java.lang.Object value)
                            throws java.lang.Exception
* Sets an extended property.

Parameters:
propertyDefinition - The property definition.
value - The value.
Throws:
java.lang.Exception - the exception

removeExtendedProperty

protected boolean removeExtendedProperty(ExtendedPropertyDefinition propertyDefinition)
                                  throws java.lang.Exception
* Removes a specific extended property definition from the collection.

Parameters:
propertyDefinition - The definition of the extended property to remove.
Returns:
True if the property matching the extended property definition was successfully removed from the collection, false otherwise.
Throws:
java.lang.Exception - the exception

tryGetValue

protected <T> boolean tryGetValue(java.lang.Class<T> cls,
                                  ExtendedPropertyDefinition propertyDefinition,
                                  OutParam<T> propertyValueOut)
                       throws ArgumentException
Tries to get property value.

Parameters:
propertyDefinition - The property definition.
propertyValueOut - The property value.
Returns:
True if property exists in collection.
Throws:
ArgumentException

writeSetUpdateToXml

public boolean writeSetUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                                   ServiceObject ewsObject,
                                   PropertyDefinition propertyDefinition)
                            throws java.lang.Exception
* Writes the update to XML.

Overrides:
writeSetUpdateToXml in class ComplexPropertyCollection<ExtendedProperty>
Parameters:
writer - The writer.
ewsObject - The ews object.
propertyDefinition - Property definition.
Returns:
True if property generated serialization.
Throws:
java.lang.Exception - the exception

writeDeleteUpdateToXml

public boolean writeDeleteUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                                      ServiceObject ewsObject)
                               throws javax.xml.stream.XMLStreamException,
                                      ServiceXmlSerializationException
* Writes the deletion update to XML.

Overrides:
writeDeleteUpdateToXml in class ComplexPropertyCollection<ExtendedProperty>
Parameters:
writer - The writer.
ewsObject - The ews object.
Returns:
True if property generated serialization.
Throws:
javax.xml.stream.XMLStreamException - the xML stream exception
ServiceXmlSerializationException - the service xml serialization exception