microsoft.exchange.webservices.data
Class DictionaryProperty<TKey,TEntry extends DictionaryEntryProperty<TKey>>

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.DictionaryProperty<TKey,TEntry>
Type Parameters:
TKey - the generic type
TEntry - the generic type
Direct Known Subclasses:
EmailAddressDictionary, ImAddressDictionary, PhoneNumberDictionary, PhysicalAddressDictionary

public abstract class DictionaryProperty<TKey,TEntry extends DictionaryEntryProperty<TKey>>
extends ComplexProperty

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
DictionaryProperty()
           
 
Method Summary
protected  void clearChangeLog()
          Clears the change log.
 void complexPropertyChanged(ComplexProperty complexProperty)
          Complex property changed.
 boolean contains(TKey key)
          * Determines whether this instance contains the specified key.
protected  TEntry createEntry(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          * Creates the entry.
protected abstract  TEntry createEntryInstance()
          Creates instance of dictionary entry.
protected  java.util.Map<TKey,TEntry> getEntries()
          Gets the entries.
protected  java.lang.String getEntryXmlElementName(TEntry entry)
          * Gets the name of the entry XML element.
protected  java.lang.String getFieldIndex(TKey key)
          * Gets the index of the field.
protected  java.lang.String getFieldURI()
          Gets the field URI.
protected  void internalAdd(TEntry entry)
          * Add entry.
protected  void internalAddOrReplace(TEntry entry)
          * Add or replace entry.
protected  void internalRemove(TKey key)
          * Remove entry based on key.
protected  void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader, java.lang.String localElementName)
          * Loads from XML.
 boolean writeDeleteUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, ServiceObject ewsObject)
          * Writes deletion update to XML.
protected  void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes elements to XML.
 boolean writeSetUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, ServiceObject ewsObject, PropertyDefinition propertyDefinition)
          * Writes updates to XML.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, microsoft.exchange.webservices.data.XmlNamespace xmlNamespace, java.lang.String xmlElementName)
          Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, func, getNamespace, internalValidate, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryProperty

public DictionaryProperty()
Method Detail

getFieldIndex

protected java.lang.String getFieldIndex(TKey key)
* Gets the index of the field.

Parameters:
key - the key
Returns:
Key index.

getFieldURI

protected java.lang.String getFieldURI()
Gets the field URI.

Returns:
Field URI.

createEntry

protected TEntry createEntry(microsoft.exchange.webservices.data.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 java.lang.String getEntryXmlElementName(TEntry entry)
* Gets the name of the entry XML element.

Parameters:
entry - the entry
Returns:
XML element name.

clearChangeLog

protected void clearChangeLog()
Clears the change log.

Overrides:
clearChangeLog in class ComplexProperty

internalAdd

protected void internalAdd(TEntry entry)
* Add entry.

Parameters:
entry - the entry

complexPropertyChanged

public void complexPropertyChanged(ComplexProperty complexProperty)
Complex property changed.

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

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

Overrides:
loadFromXml in class ComplexProperty
Parameters:
reader - the reader
localElementName - the local element name
Throws:
java.lang.Exception - the exception

writeToXml

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

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

writeElementsToXml

protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                           throws java.lang.Exception
Writes elements to XML.

Overrides:
writeElementsToXml in class ComplexProperty
Parameters:
writer - the writer
Throws:
java.lang.Exception - the exception

getEntries

protected java.util.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(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                                   ServiceObject ewsObject,
                                   PropertyDefinition propertyDefinition)
                            throws java.lang.Exception
* Writes updates to XML.

Parameters:
writer - the writer
ewsObject - the ews object
propertyDefinition - the 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)
* Writes deletion update to XML.

Parameters:
writer - the writer
ewsObject - the ews object
Returns:
True if property generated serialization.