Class ComplexProperty
- java.lang.Object
-
- 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
Constructors Modifier Constructor Description protectedComplexProperty()Initializes a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOnChangeEvent(IComplexPropertyChangedDelegate change)Set event to happen when property changed.<T> booleancanSetFieldValue(T field, T value)Sets value of field.voidchanged()Instance was changed.protected voidclearChangeEvents()Clears change events list.voidclearChangeLog()Clears the change log.Booleanfunc(EwsServiceXmlReader reader)XmlNamespacegetNamespace()Gets the namespace.protected voidinternalValidate()Validates this instance.voidloadFromXml(EwsServiceXmlReader reader, String xmlElementName)Loads from XML.voidloadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)Loads from XML.voidreadAttributesFromXml(EwsServiceXmlReader reader)Reads the attribute from XML.voidreadTextValueFromXml(EwsServiceXmlReader reader)Reads the text value from XML.voidremoveChangeEvent(IComplexPropertyChangedDelegate change)Remove the event from happening when property changed.voidsetNamespace(XmlNamespace xmlNamespace)Sets the namespace.booleantryReadElementFromXml(EwsServiceXmlReader reader)Tries to read element from XML.booleantryReadElementFromXmlToPatch(EwsServiceXmlReader reader)Tries to read element from XML to patch this property.voidupdateFromXml(EwsServiceXmlReader reader, String xmlElementName)Loads from XML to update this property.voidupdateFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)Loads from XML to update itself.voidvalidate()Implements ISelfValidate.validate.voidwriteAttributesToXml(EwsServiceXmlWriter writer)Writes the attribute to XML.voidwriteElementsToXml(EwsServiceXmlWriter writer)Writes elements to XML.voidwriteToXml(EwsServiceXmlWriter writer, String xmlElementName)Writes to XML.voidwriteToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String xmlElementName)Writes to XML.
-
-
-
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 namespacexmlElementName- 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:
validatein interfaceISelfValidate- 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:
funcin interfaceComplexFunctionDelegate<EwsServiceXmlReader>- Throws:
Exception
-
-