public abstract class ServiceObject extends Object
Modifier | Constructor and Description |
---|---|
protected |
ServiceObject(ExchangeService service)
Internal constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addServiceObjectChangedEvent(IServiceObjectChangedDelegate change)
Adds the service object changed event.
|
void |
changed()
Triggers dispatch of the change event.
|
void |
clearChangeLog()
Clear change log.
|
void |
clearServiceObjectChangedEvent()
Clear service object changed event.
|
String |
getChangeXmlElementName()
Gets the name of the change XML element.
|
String |
getDeleteFieldXmlElementName()
Gets the name of the delete field XML element.
|
protected ExtendedPropertyCollection |
getExtendedProperties()
Gets the extended property.
|
ServiceId |
getId()
Gets the id.
|
PropertyDefinition |
getIdPropertyDefinition()
Gets the id property definition.
|
protected boolean |
getIsCustomDateTimeScopingRequired()
Determines whether property defined with
ScopedDateTimePropertyDefinition require custom time zone scoping.
|
protected boolean |
getIsTimeZoneHeaderRequired(boolean isUpdateOperation)
Gets a value indicating whether a time zone SOAP header should be emitted
in a CreateItem or UpdateItem request so this item can be property saved
or updated.
|
Collection<PropertyDefinitionBase> |
getLoadedPropertyDefinitions()
Gets the collection of loaded property definitions.
|
abstract ExchangeVersion |
getMinimumRequiredServerVersion()
Gets the minimum required server version.
|
Object |
getObjectFromPropertyDefinition(PropertyDefinitionBase propertyDefinition)
Gets the value of specified property in this instance.
|
PropertyBag |
getPropertyBag()
The property bag holding property values for this object.
|
abstract ServiceObjectSchema |
getSchema()
Internal method to return the schema associated with this type of object.
|
ExchangeService |
getService()
Gets the service.
|
String |
getSetFieldXmlElementName()
Gets the name of the set field XML element.
|
String |
getXmlElementName()
GetXmlElementName retrieves the XmlElementName of this type based on the
EwsObjectDefinition attribute that decorates it, if present.
|
protected String |
getXmlElementNameOverride()
This methods lets subclasses of ServiceObject override the default
mechanism by which the XML element name associated with their type is
retrieved.
|
protected abstract void |
internalDelete(DeleteMode deleteMode,
SendCancellationsMode sendCancellationsMode,
AffectedTaskOccurrence affectedTaskOccurrences)
Internal delete.
|
protected abstract void |
internalLoad(PropertySet propertySet)
Internal load.
|
boolean |
isDirty()
Checks if is dirty.
|
boolean |
isNew()
Checks if is new.
|
void |
load()
Load.
|
void |
load(PropertySet propertySet)
Load.
|
void |
loadFromXml(EwsServiceXmlReader reader,
boolean clearPropertyBag)
Loads service object from XML.
|
void |
loadFromXml(EwsServiceXmlReader reader,
boolean clearPropertyBag,
PropertySet requestedPropertySet,
boolean summaryPropertiesOnly)
Load from xml.
|
void |
removeServiceObjectChangedEvent(IServiceObjectChangedDelegate change)
Removes the service object changed event.
|
ServiceObjectSchema |
schema()
Gets the schema associated with this type of object.
|
protected void |
setService(ExchangeService service)
Sets the service.
|
void |
throwIfThisIsNew()
Throws exception if this is a new service object.
|
protected void |
throwIfThisIsNotNew()
Throws exception if this is not a new service object.
|
protected <T> boolean |
tryGetExtendedProperty(Class<T> cls,
ExtendedPropertyDefinition propertyDefinition,
OutParam<T> propertyValue)
Try to get the value of a specified extended property in this instance.
|
<T> boolean |
tryGetProperty(Class<T> cls,
PropertyDefinitionBase propertyDefinition,
OutParam<T> propertyValue)
Try to get the value of a specified property in this instance.
|
boolean |
tryGetProperty(PropertyDefinitionBase propertyDefinition,
OutParam<Object> propertyValue)
Try to get the value of a specified property in this instance.
|
protected void |
validate()
Validate.
|
void |
writeToXml(EwsServiceXmlWriter writer)
Write to xml.
|
void |
writeToXmlForUpdate(EwsServiceXmlWriter writer)
Write to xml for update.
|
protected ServiceObject(ExchangeService service) throws Exception
service
- the serviceException
- the exceptionpublic void changed()
public void throwIfThisIsNew() throws InvalidOperationException, ServiceLocalException
InvalidOperationException
- the invalid operation exceptionServiceLocalException
- the service local exceptionprotected void throwIfThisIsNotNew() throws InvalidOperationException, ServiceLocalException
InvalidOperationException
- the invalid operation exceptionServiceLocalException
- the service local exceptionprotected String getXmlElementNameOverride()
public String getXmlElementName()
public String getChangeXmlElementName()
public String getSetFieldXmlElementName()
public String getDeleteFieldXmlElementName()
protected boolean getIsTimeZoneHeaderRequired(boolean isUpdateOperation) throws ServiceLocalException, Exception
isUpdateOperation
- the is update operationServiceLocalException
Exception
protected boolean getIsCustomDateTimeScopingRequired()
public PropertyBag getPropertyBag()
public ServiceObjectSchema schema()
public abstract ServiceObjectSchema getSchema()
public abstract ExchangeVersion getMinimumRequiredServerVersion()
public void loadFromXml(EwsServiceXmlReader reader, boolean clearPropertyBag) throws Exception
reader
- the readerclearPropertyBag
- the clear property bagException
- the exceptionpublic void loadFromXml(EwsServiceXmlReader reader, boolean clearPropertyBag, PropertySet requestedPropertySet, boolean summaryPropertiesOnly) throws Exception
reader
- the readerclearPropertyBag
- the clear property bagrequestedPropertySet
- the requested property setsummaryPropertiesOnly
- the summary property onlyException
- the exceptionpublic void clearChangeLog()
public void writeToXml(EwsServiceXmlWriter writer) throws Exception
writer
- the writerException
- the exceptionpublic void writeToXmlForUpdate(EwsServiceXmlWriter writer) throws Exception
writer
- the writerException
- the exceptionprotected abstract void internalLoad(PropertySet propertySet) throws Exception
propertySet
- the property setException
- the exceptionprotected abstract void internalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences) throws Exception
deleteMode
- the delete modesendCancellationsMode
- the send cancellations modeaffectedTaskOccurrences
- the affected task occurrencesException
- the exceptionpublic void load(PropertySet propertySet) throws Exception
propertySet
- the property setException
- the exceptionpublic Object getObjectFromPropertyDefinition(PropertyDefinitionBase propertyDefinition) throws Exception
propertyDefinition
- Definition of the property to get.Exception
- the exceptionprotected <T> boolean tryGetExtendedProperty(Class<T> cls, ExtendedPropertyDefinition propertyDefinition, OutParam<T> propertyValue) throws Exception
propertyDefinition
- the property definitionpropertyValue
- the property valueException
- the exceptionpublic boolean tryGetProperty(PropertyDefinitionBase propertyDefinition, OutParam<Object> propertyValue) throws Exception
propertyDefinition
- The property definition.propertyValue
- The property valueException
public <T> boolean tryGetProperty(Class<T> cls, PropertyDefinitionBase propertyDefinition, OutParam<T> propertyValue) throws Exception
propertyDefinition
- the property definitionpropertyValue
- the property valueException
- the exceptionpublic Collection<PropertyDefinitionBase> getLoadedPropertyDefinitions() throws Exception
Exception
- the exceptionpublic ExchangeService getService()
protected void setService(ExchangeService service)
service
- the new servicepublic PropertyDefinition getIdPropertyDefinition()
public ServiceId getId() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic boolean isNew() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic boolean isDirty()
protected ExtendedPropertyCollection getExtendedProperties() throws Exception
Exception
- the exceptionpublic void addServiceObjectChangedEvent(IServiceObjectChangedDelegate change)
change
- the changepublic void removeServiceObjectChangedEvent(IServiceObjectChangedDelegate change)
change
- the changepublic void clearServiceObjectChangedEvent()
Copyright © 2012–2015 Microsoft. All rights reserved.