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

java.lang.Object
  extended by microsoft.exchange.webservices.data.property.complex.ComplexProperty
All Implemented Interfaces:
ISelfValidate, ComplexFunctionDelegate<EwsServiceXmlReader>
Direct Known Subclasses:
Attachment, ByteArrayArray, CalendarEvent, CalendarEventDetails, CompleteName, ComplexPropertyCollection, Conflict, DayOfTheWeekCollection, DelegatePermissions, DelegateUser, DeletedOccurrenceInfo, DictionaryEntryProperty, DictionaryProperty, EmailAddress, ExtendedProperty, FolderPermission, GroupMember, InternetMessageHeader, ItemCollection, LegacyAvailabilityTimeZone, Mailbox, ManagedFolderInformation, MeetingTimeZone, MessageBody, MimeContent, OccurrenceInfo, OofSettings, PhoneCall, PhoneCallId, Recurrence, RecurrenceRange, Rule, RuleActions, RuleCollection, RuleError, RuleOperation, RuleOperationError, RulePredicateDateRange, RulePredicates, RulePredicateSizeRange, SearchFilter, SearchFolderParameters, ServiceId, StringList, Suggestion, TimeChange, TimeSuggestion, TimeZoneDefinition, TimeZonePeriod, TimeZoneTransition, TimeZoneTransitionGroup, UniqueBody, UserConfigurationDictionary, UserId, WorkingHours

public abstract class ComplexProperty
extends Object
implements ISelfValidate, ComplexFunctionDelegate<EwsServiceXmlReader>

Represents a property that can be sent to or retrieved from EWS.


Constructor Summary
protected ComplexProperty()
          Initializes a new instance.
 
Method Summary
 void addOnChangeEvent(IComplexPropertyChangedDelegate change)
          Set event to happen when property changed.
<T> boolean
canSetFieldValue(T field, T value)
          Sets value of field.
 void changed()
          Instance was changed.
protected  void clearChangeEvents()
          Clears change events list.
 void clearChangeLog()
          Clears the change log.
 Boolean func(EwsServiceXmlReader reader)
           
 XmlNamespace getNamespace()
          Gets the namespace.
protected  void internalValidate()
          Validates this instance.
 void loadFromXml(EwsServiceXmlReader reader, String xmlElementName)
          Loads from XML.
 void loadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
          Loads from XML.
 void readAttributesFromXml(EwsServiceXmlReader reader)
          Reads the attribute from XML.
 void readTextValueFromXml(EwsServiceXmlReader reader)
          Reads the text value from XML.
 void removeChangeEvent(IComplexPropertyChangedDelegate change)
          Remove the event from happening when property changed.
 void setNamespace(XmlNamespace xmlNamespace)
          Sets the namespace.
 boolean tryReadElementFromXml(EwsServiceXmlReader reader)
          Tries to read element from XML.
 boolean tryReadElementFromXmlToPatch(EwsServiceXmlReader reader)
          Tries to read element from XML to patch this property.
 void updateFromXml(EwsServiceXmlReader reader, String xmlElementName)
          Loads from XML to update this property.
 void updateFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
          Loads from XML to update itself.
 void validate()
          Implements ISelfValidate.validate.
 void writeAttributesToXml(EwsServiceXmlWriter writer)
          Writes the attribute to XML.
 void writeElementsToXml(EwsServiceXmlWriter writer)
          Writes elements to XML.
 void writeToXml(EwsServiceXmlWriter writer, String xmlElementName)
          Writes to XML.
 void writeToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String xmlElementName)
          Writes to XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexProperty

protected ComplexProperty()
Initializes a new instance.

Method Detail

getNamespace

public XmlNamespace getNamespace()
Gets the namespace.

Returns:
the namespace.

setNamespace

public void setNamespace(XmlNamespace xmlNamespace)
Sets the namespace.

Parameters:
xmlNamespace - the namespace.

changed

public void changed()
Instance was changed.


canSetFieldValue

public <T> boolean canSetFieldValue(T field,
                                    T value)
Sets value of field.

Type Parameters:
T - Field type.
Parameters:
field - The field.
value - The value.
Returns:
true, if successful

clearChangeLog

public void clearChangeLog()
Clears the change log.


readAttributesFromXml

public void readAttributesFromXml(EwsServiceXmlReader reader)
                           throws Exception
Reads the attribute from XML.

Parameters:
reader - The reader.
Throws:
Exception - the exception

readTextValueFromXml

public void readTextValueFromXml(EwsServiceXmlReader reader)
                          throws Exception
Reads the text value from XML.

Parameters:
reader - The reader.
Throws:
Exception - the exception

tryReadElementFromXml

public boolean tryReadElementFromXml(EwsServiceXmlReader reader)
                              throws Exception
Tries to read element from XML.

Parameters:
reader - The reader.
Returns:
True if element was read.
Throws:
Exception - the exception

tryReadElementFromXmlToPatch

public boolean tryReadElementFromXmlToPatch(EwsServiceXmlReader reader)
                                     throws Exception
Tries to read element from XML to patch this property.

Parameters:
reader - The reader. True if element was read.
Throws:
Exception

writeAttributesToXml

public void writeAttributesToXml(EwsServiceXmlWriter writer)
                          throws ServiceXmlSerializationException
Writes the attribute to XML.

Parameters:
writer - The writer.
Throws:
ServiceXmlSerializationException - the service xml serialization exception

writeElementsToXml

public void writeElementsToXml(EwsServiceXmlWriter writer)
                        throws Exception
Writes elements to XML.

Parameters:
writer - The writer.
Throws:
Exception - the exception

loadFromXml

public void loadFromXml(EwsServiceXmlReader reader,
                        XmlNamespace xmlNamespace,
                        String xmlElementName)
                 throws Exception
Loads from XML.

Parameters:
reader - The reader.
xmlNamespace - the xml namespace
xmlElementName - Name of the XML element.
Throws:
Exception - the exception

updateFromXml

public void updateFromXml(EwsServiceXmlReader reader,
                          String xmlElementName)
                   throws Exception
Loads from XML to update this property.

Parameters:
reader - The reader.
xmlElementName - Name of the XML element.
Throws:
Exception

updateFromXml

public void updateFromXml(EwsServiceXmlReader reader,
                          XmlNamespace xmlNamespace,
                          String xmlElementName)
                   throws Exception
Loads from XML to update itself.

Parameters:
reader - The reader.
xmlNamespace - The XML namespace.
xmlElementName - Name of the XML element.
Throws:
Exception

loadFromXml

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

Parameters:
reader - The reader.
xmlElementName - Name of the XML element.
Throws:
Exception - the exception

writeToXml

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

Parameters:
writer - The writer.
xmlNamespace - The XML namespace.
xmlElementName - Name of the XML element.
Throws:
Exception - the exception

writeToXml

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

Parameters:
writer - The writer.
xmlElementName - Name of the XML element.
Throws:
Exception - the exception

addOnChangeEvent

public void addOnChangeEvent(IComplexPropertyChangedDelegate change)
Set event to happen when property changed.

Parameters:
change - change event

removeChangeEvent

public void removeChangeEvent(IComplexPropertyChangedDelegate change)
Remove the event from happening when property changed.

Parameters:
change - change event

clearChangeEvents

protected void clearChangeEvents()
Clears change events list.


validate

public void validate()
              throws Exception
Implements ISelfValidate.validate. Validates this instance.

Specified by:
validate in interface ISelfValidate
Throws:
Exception - the exception

internalValidate

protected void internalValidate()
                         throws Exception
Validates this instance.

Throws:
Exception - the exception

func

public Boolean func(EwsServiceXmlReader reader)
             throws Exception
Specified by:
func in interface ComplexFunctionDelegate<EwsServiceXmlReader>
Throws:
Exception


Copyright © 2012–2015 Microsoft. All rights reserved.