microsoft.exchange.webservices.data.property.complex
Class ExtendedPropertyCollection

java.lang.Object
  extended by microsoft.exchange.webservices.data.property.complex.ComplexProperty
      extended by microsoft.exchange.webservices.data.property.complex.ComplexPropertyCollection<ExtendedProperty>
          extended by microsoft.exchange.webservices.data.property.complex.ExtendedPropertyCollection
All Implemented Interfaces:
Iterable<ExtendedProperty>, ICustomXmlUpdateSerializer, ISelfValidate, ComplexFunctionDelegate<EwsServiceXmlReader>, IComplexPropertyChangedDelegate<ExtendedProperty>

public final class ExtendedPropertyCollection
extends ComplexPropertyCollection<ExtendedProperty>
implements ICustomXmlUpdateSerializer

Represents a collection of extended property.


Constructor Summary
ExtendedPropertyCollection()
           
 
Method Summary
protected  ExtendedProperty createComplexProperty(String xmlElementName)
          Creates the complex property.
protected  String getCollectionItemXmlElementName(ExtendedProperty complexProperty)
          Gets the name of the collection item XML element.
 void loadFromXml(EwsServiceXmlReader reader, String localElementName)
          Loads from XML.
 boolean removeExtendedProperty(ExtendedPropertyDefinition propertyDefinition)
          Removes a specific extended property definition from the collection.
 void setExtendedProperty(ExtendedPropertyDefinition propertyDefinition, Object value)
          Sets an extended property.
<T> boolean
tryGetValue(Class<T> cls, ExtendedPropertyDefinition propertyDefinition, OutParam<T> propertyValueOut)
          Tries to get property value.
 boolean writeDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject)
          Writes the deletion update to XML.
 boolean writeSetUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject, PropertyDefinition propertyDefinition)
          Writes the update to XML.
 void writeToXml(EwsServiceXmlWriter writer, String xmlElementName)
          Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.property.complex.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.property.complex.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(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 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

public void loadFromXml(EwsServiceXmlReader reader,
                        String localElementName)
                 throws Exception
Loads from XML.

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

writeToXml

public void writeToXml(EwsServiceXmlWriter writer,
                       String xmlElementName)
                throws Exception
Writes to XML.

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

setExtendedProperty

public void setExtendedProperty(ExtendedPropertyDefinition propertyDefinition,
                                Object value)
                         throws Exception
Sets an extended property.

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

removeExtendedProperty

public boolean removeExtendedProperty(ExtendedPropertyDefinition propertyDefinition)
                               throws 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:
Exception - the exception

tryGetValue

public <T> boolean tryGetValue(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(EwsServiceXmlWriter writer,
                                   ServiceObject ewsObject,
                                   PropertyDefinition propertyDefinition)
                            throws Exception
Writes the update to XML.

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

writeDeleteUpdateToXml

public boolean writeDeleteUpdateToXml(EwsServiceXmlWriter writer,
                                      ServiceObject ewsObject)
                               throws XMLStreamException,
                                      ServiceXmlSerializationException
Writes the deletion update to XML.

Specified by:
writeDeleteUpdateToXml in interface ICustomXmlUpdateSerializer
Overrides:
writeDeleteUpdateToXml in class ComplexPropertyCollection<ExtendedProperty>
Parameters:
writer - the writer
ewsObject - the ews object
Returns:
true if property generated serialization
Throws:
XMLStreamException - the XML stream exception
ServiceXmlSerializationException - the service xml serialization exception


Copyright © 2012–2015 Microsoft. All rights reserved.