Class ComplexPropertyCollection<TComplexProperty extends ComplexProperty>
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.ComplexPropertyCollection<TComplexProperty>
-
- Type Parameters:
TComplexProperty- ComplexProperty type.
- All Implemented Interfaces:
Iterable<TComplexProperty>,ICustomXmlUpdateSerializer,ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>,IComplexPropertyChangedDelegate<TComplexProperty>
- Direct Known Subclasses:
AttachmentCollection,AttendeeCollection,DeletedOccurrenceInfoCollection,EmailAddressCollection,ExtendedPropertyCollection,FolderIdCollection,FolderPermissionCollection,GroupMemberCollection,InternetMessageHeaderCollection,ItemIdCollection,OccurrenceInfoCollection,RuleErrorCollection,RuleOperationErrorCollection
public abstract class ComplexPropertyCollection<TComplexProperty extends ComplexProperty> extends ComplexProperty implements ICustomXmlUpdateSerializer, Iterable<TComplexProperty>, IComplexPropertyChangedDelegate<TComplexProperty>
Represents a collection of property that can be sent to and retrieved from EWS.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedComplexPropertyCollection()Initializes a new instance of.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclearChangeLog()Clears the change log.voidcomplexPropertyChanged(TComplexProperty complexProperty)Complex property changed.booleancontains(TComplexProperty complexProperty)Determines whether a specific property is in the collection.protected abstract TComplexPropertycreateComplexProperty(String xmlElementName)Creates the complex property.protected List<TComplexProperty>getAddedItems()Gets the added item.protected abstract StringgetCollectionItemXmlElementName(TComplexProperty complexProperty)Gets the name of the collection item XML element.intgetCount()Gets the total number of property in the collection.List<TComplexProperty>getItems()Gets the item.protected List<TComplexProperty>getModifiedItems()Gets the modified item.TComplexPropertygetPropertyAtIndex(int index)Gets the property at the specified index.protected List<TComplexProperty>getRemovedItems()Gets the removed item.intindexOf(TComplexProperty complexProperty)Searches for a specific property and return its zero-based index within the collection.protected voidinternalAdd(TComplexProperty complexProperty)Add complex property.protected voidinternalClear()Clear collection.protected booleaninternalRemove(TComplexProperty complexProperty)Remove specified complex property.protected voidinternalRemoveAt(int index)Remote entry at index.protected voiditemChanged(TComplexProperty property)Item changed.Iterator<TComplexProperty>iterator()Gets an enumerator that iterates through the elements of the collection.voidloadFromXml(EwsServiceXmlReader reader, String localElementName)Loads from XML.voidloadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String localElementName)Loads from XML.protected voidremoveFromChangeLog(TComplexProperty complexProperty)Removes from change log.booleanshouldWriteToXml()Determine whether we should write collection to XML or not.voidupdateFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)Loads from XML to update itself.booleanwriteDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject)Writes the deletion update to XML.voidwriteElementsToXml(EwsServiceXmlWriter writer)Writes elements to XML.booleanwriteSetUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject, PropertyDefinition propertyDefinition)Write set update to xml.voidwriteToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String xmlElementName)Writes to XML.-
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, writeToXml
-
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
-
ComplexPropertyCollection
protected ComplexPropertyCollection()
Initializes a new instance of. ComplexPropertyCollection
-
-
Method Detail
-
createComplexProperty
protected abstract TComplexProperty createComplexProperty(String xmlElementName)
Creates the complex property.- Parameters:
xmlElementName- Name of the XML element.- Returns:
- Complex property instance.
-
getCollectionItemXmlElementName
protected abstract String getCollectionItemXmlElementName(TComplexProperty complexProperty)
Gets the name of the collection item XML element.- Parameters:
complexProperty- The complex property.- Returns:
- XML element name.
-
itemChanged
protected void itemChanged(TComplexProperty property)
Item changed.- Parameters:
property- The complex property.
-
loadFromXml
public void loadFromXml(EwsServiceXmlReader reader, String localElementName) throws Exception
Loads from XML.- Overrides:
loadFromXmlin classComplexProperty- Parameters:
reader- The reader.localElementName- Name of the local element.- Throws:
Exception- the exception
-
loadFromXml
public void loadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String localElementName) throws Exception
Loads from XML.- Overrides:
loadFromXmlin classComplexProperty- Parameters:
reader- The reader.xmlNamespace- The XML namespace.localElementName- Name of the local element.- Throws:
Exception- the exception
-
updateFromXml
public void updateFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName) throws Exception
Loads from XML to update itself.- Overrides:
updateFromXmlin classComplexProperty- Parameters:
reader- The reader.xmlNamespace- The XML namespace.xmlElementName- Name of the XML element.- Throws:
Exception
-
writeToXml
public void writeToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String xmlElementName) throws Exception
Writes to XML.- Overrides:
writeToXmlin classComplexProperty- Parameters:
writer- The writer.xmlNamespace- The XML namespace.xmlElementName- Name of the XML element.- Throws:
Exception- the exception
-
shouldWriteToXml
public boolean shouldWriteToXml()
Determine whether we should write collection to XML or not.- Returns:
- True if collection contains at least one element.
-
writeElementsToXml
public void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
Writes elements to XML.- Overrides:
writeElementsToXmlin classComplexProperty- Parameters:
writer- The writer.- Throws:
Exception- the exception
-
clearChangeLog
public void clearChangeLog()
Clears the change log.- Overrides:
clearChangeLogin classComplexProperty
-
removeFromChangeLog
protected void removeFromChangeLog(TComplexProperty complexProperty)
Removes from change log.- Parameters:
complexProperty- The complex property.
-
getItems
public List<TComplexProperty> getItems()
Gets the item.- Returns:
- The item.
-
getAddedItems
protected List<TComplexProperty> getAddedItems()
Gets the added item.- Returns:
- The added item.
-
getModifiedItems
protected List<TComplexProperty> getModifiedItems()
Gets the modified item.- Returns:
- The modified item.
-
getRemovedItems
protected List<TComplexProperty> getRemovedItems()
Gets the removed item.- Returns:
- The removed item.
-
internalAdd
protected void internalAdd(TComplexProperty complexProperty)
Add complex property.- Parameters:
complexProperty- The complex property.
-
complexPropertyChanged
public void complexPropertyChanged(TComplexProperty complexProperty)
Complex property changed.- Specified by:
complexPropertyChangedin interfaceIComplexPropertyChangedDelegate<TComplexProperty extends ComplexProperty>- Parameters:
complexProperty- accepts ComplexProperty
-
internalClear
protected void internalClear()
Clear collection.
-
internalRemoveAt
protected void internalRemoveAt(int index)
Remote entry at index.- Parameters:
index- The index.
-
internalRemove
protected boolean internalRemove(TComplexProperty complexProperty)
Remove specified complex property.- Parameters:
complexProperty- The complex property.- Returns:
- True if the complex property was successfully removed from the collection, false otherwise.
-
contains
public boolean contains(TComplexProperty complexProperty)
Determines whether a specific property is in the collection.- Parameters:
complexProperty- The property to locate in the collection.- Returns:
- True if the property was found in the collection, false otherwise.
-
indexOf
public int indexOf(TComplexProperty complexProperty)
Searches for a specific property and return its zero-based index within the collection.- Parameters:
complexProperty- The property to locate in the collection.- Returns:
- The zero-based index of the property within the collection.
-
getCount
public int getCount()
Gets the total number of property in the collection.- Returns:
- the count
-
getPropertyAtIndex
public TComplexProperty getPropertyAtIndex(int index) throws IllegalArgumentException
Gets the property at the specified index.- Parameters:
index- the index- Returns:
- index The property at the specified index.
- Throws:
IllegalArgumentException- thrown if if index is out of range.
-
iterator
public Iterator<TComplexProperty> iterator()
Gets an enumerator that iterates through the elements of the collection.- Specified by:
iteratorin interfaceIterable<TComplexProperty extends ComplexProperty>- Returns:
- An Iterator for the collection.
-
writeSetUpdateToXml
public boolean writeSetUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject, PropertyDefinition propertyDefinition) throws Exception
Write set update to xml.- Specified by:
writeSetUpdateToXmlin interfaceICustomXmlUpdateSerializer- Parameters:
writer- accepts EwsServiceXmlWriterewsObject- accepts ServiceObjectpropertyDefinition- accepts PropertyDefinition- Returns:
- true
- Throws:
Exception- the exception
-
writeDeleteUpdateToXml
public boolean writeDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject) throws Exception
Writes the deletion update to XML.- Specified by:
writeDeleteUpdateToXmlin interfaceICustomXmlUpdateSerializer- Parameters:
writer- The writer.ewsObject- The ews object.- Returns:
- True if property generated serialization.
- Throws:
Exception- the exception
-
-