Class DictionaryProperty<TKey,TEntry extends DictionaryEntryProperty<TKey>>
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.DictionaryProperty<TKey,TEntry>
-
- Type Parameters:
TKey- the generic typeTEntry- the generic type
- All Implemented Interfaces:
ICustomXmlUpdateSerializer,ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>,IComplexPropertyChangedDelegate<TEntry>
- Direct Known Subclasses:
EmailAddressDictionary,ImAddressDictionary,PhoneNumberDictionary,PhysicalAddressDictionary
public abstract class DictionaryProperty<TKey,TEntry extends DictionaryEntryProperty<TKey>> extends ComplexProperty implements ICustomXmlUpdateSerializer, IComplexPropertyChangedDelegate<TEntry>
Represents a generic dictionary that can be sent to or retrieved from EWS. TKey The type of key. TEntry The type of entry.
-
-
Constructor Summary
Constructors Constructor Description DictionaryProperty()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclearChangeLog()Clears the change log.voidcomplexPropertyChanged(TEntry complexProperty)Complex property changed.booleancontains(TKey key)Determines whether this instance contains the specified key.protected TEntrycreateEntry(EwsServiceXmlReader reader)Creates the entry.protected abstract TEntrycreateEntryInstance()Creates instance of dictionary entry.protected Map<TKey,TEntry>getEntries()Gets the entries.protected StringgetEntryXmlElementName(TEntry entry)Gets the name of the entry XML element.protected StringgetFieldIndex(TKey key)Gets the index of the field.protected StringgetFieldURI()Gets the field URI.protected voidinternalAdd(TEntry entry)Add entry.protected voidinternalAddOrReplace(TEntry entry)Add or replace entry.protected voidinternalRemove(TKey key)Remove entry based on key.voidloadFromXml(EwsServiceXmlReader reader, String localElementName)Loads from XML.booleanwriteDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject)Writes deletion update to XML.voidwriteElementsToXml(EwsServiceXmlWriter writer)Writes elements to XML.booleanwriteSetUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject, PropertyDefinition propertyDefinition)Writes updates 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, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml
-
-
-
-
Constructor Detail
-
DictionaryProperty
public DictionaryProperty()
-
-
Method Detail
-
getFieldIndex
protected String getFieldIndex(TKey key)
Gets the index of the field.- Parameters:
key- the key- Returns:
- Key index.
-
getFieldURI
protected String getFieldURI()
Gets the field URI.- Returns:
- Field URI.
-
createEntry
protected TEntry createEntry(EwsServiceXmlReader reader)
Creates the entry.- Parameters:
reader- the reader- Returns:
- Dictionary entry.
-
createEntryInstance
protected abstract TEntry createEntryInstance()
Creates instance of dictionary entry.- Returns:
- New instance.
-
getEntryXmlElementName
protected String getEntryXmlElementName(TEntry entry)
Gets the name of the entry XML element.- Parameters:
entry- the entry- Returns:
- XML element name.
-
clearChangeLog
public void clearChangeLog()
Clears the change log.- Overrides:
clearChangeLogin classComplexProperty
-
internalAdd
protected void internalAdd(TEntry entry)
Add entry.- Parameters:
entry- the entry
-
complexPropertyChanged
public void complexPropertyChanged(TEntry complexProperty)
Complex property changed.- Specified by:
complexPropertyChangedin interfaceIComplexPropertyChangedDelegate<TKey>- Parameters:
complexProperty- accepts ComplexProperty
-
internalAddOrReplace
protected void internalAddOrReplace(TEntry entry)
Add or replace entry.- Parameters:
entry- the entry
-
internalRemove
protected void internalRemove(TKey key)
Remove entry based on key.- Parameters:
key- the key
-
loadFromXml
public void loadFromXml(EwsServiceXmlReader reader, String localElementName) throws Exception
Loads from XML.- Overrides:
loadFromXmlin classComplexProperty- Parameters:
reader- the readerlocalElementName- the local element name- Throws:
Exception- the exception
-
writeToXml
public void writeToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String xmlElementName) throws Exception
Writes to XML.- Overrides:
writeToXmlin classComplexProperty- Parameters:
writer- The writerxmlNamespace- The XML namespace.xmlElementName- Name of the XML element.- Throws:
Exception
-
writeElementsToXml
public void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
Writes elements to XML.- Overrides:
writeElementsToXmlin classComplexProperty- Parameters:
writer- the writer- Throws:
Exception- the exception
-
getEntries
protected Map<TKey,TEntry> getEntries()
Gets the entries.- Returns:
- The entries.
-
contains
public boolean contains(TKey key)
Determines whether this instance contains the specified key.- Parameters:
key- the key- Returns:
- true if this instance contains the specified key; otherwise, false.
-
writeSetUpdateToXml
public boolean writeSetUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject, PropertyDefinition propertyDefinition) throws Exception
Writes updates to XML.- Specified by:
writeSetUpdateToXmlin interfaceICustomXmlUpdateSerializer- Parameters:
writer- the writerewsObject- the ews objectpropertyDefinition- the property definition- Returns:
- True if property generated serialization.
- Throws:
Exception- the exception
-
writeDeleteUpdateToXml
public boolean writeDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject)
Writes deletion update to XML.- Specified by:
writeDeleteUpdateToXmlin interfaceICustomXmlUpdateSerializer- Parameters:
writer- the writerewsObject- the ews object- Returns:
- True if property generated serialization.
-
-