Class ExtendedPropertyCollection
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.ComplexPropertyCollection<ExtendedProperty>
-
- 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
Constructors Constructor Description ExtendedPropertyCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExtendedPropertycreateComplexProperty(String xmlElementName)Creates the complex property.protected StringgetCollectionItemXmlElementName(ExtendedProperty complexProperty)Gets the name of the collection item XML element.voidloadFromXml(EwsServiceXmlReader reader, String localElementName)Loads from XML.booleanremoveExtendedProperty(ExtendedPropertyDefinition propertyDefinition)Removes a specific extended property definition from the collection.voidsetExtendedProperty(ExtendedPropertyDefinition propertyDefinition, Object value)Sets an extended property.<T> booleantryGetValue(Class<T> cls, ExtendedPropertyDefinition propertyDefinition, OutParam<T> propertyValueOut)Tries to get property value.booleanwriteDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject)Writes the deletion update to XML.booleanwriteSetUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject, PropertyDefinition propertyDefinition)Writes the update to XML.voidwriteToXml(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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ExtendedPropertyCollection
public ExtendedPropertyCollection()
-
-
Method Detail
-
createComplexProperty
protected ExtendedProperty createComplexProperty(String xmlElementName)
Creates the complex property.- Specified by:
createComplexPropertyin classComplexPropertyCollection<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:
getCollectionItemXmlElementNamein classComplexPropertyCollection<ExtendedProperty>- Parameters:
complexProperty- The complex property.- Returns:
- XML element name.
-
loadFromXml
public void loadFromXml(EwsServiceXmlReader reader, String localElementName) throws Exception
Loads from XML.- Overrides:
loadFromXmlin classComplexPropertyCollection<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:
writeToXmlin classComplexProperty- 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:
writeSetUpdateToXmlin interfaceICustomXmlUpdateSerializer- Overrides:
writeSetUpdateToXmlin classComplexPropertyCollection<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:
writeDeleteUpdateToXmlin interfaceICustomXmlUpdateSerializer- Overrides:
writeDeleteUpdateToXmlin classComplexPropertyCollection<ExtendedProperty>- Parameters:
writer- the writerewsObject- the ews object- Returns:
- true if property generated serialization
- Throws:
XMLStreamException- the XML stream exceptionServiceXmlSerializationException- the service xml serialization exception
-
-