public class ItemAttachment extends Attachment implements IServiceObjectChangedDelegate
Modifier | Constructor and Description |
---|---|
protected |
ItemAttachment(Item owner)
Initializes a new instance of the class.
|
Modifier and Type | Method and Description |
---|---|
Item |
getItem()
Gets the item associated with the attachment.
|
String |
getXmlElementName()
Obtains EWS XML element name for this object.
|
void |
load(BodyType bodyType,
Iterable<PropertyDefinitionBase> additionalProperties)
Loads this attachment.
|
void |
load(BodyType bodyType,
PropertyDefinitionBase... additionalProperties)
Loads this attachment.
|
void |
load(Iterable<PropertyDefinitionBase> additionalProperties)
Loads this attachment.
|
void |
load(PropertyDefinitionBase... additionalProperties)
Loads this attachment.
|
void |
serviceObjectChanged(ServiceObject serviceObject)
Service object changed.
|
protected void |
setItem(Item item)
Sets the item associated with the attachment.
|
boolean |
tryReadElementFromXml(EwsServiceXmlReader reader)
Tries to read the element at the current position of the reader.
|
boolean |
tryReadElementFromXmlToPatch(EwsServiceXmlReader reader)
For ItemAttachment, AttachmentId and Item should be patched.
|
protected void |
validate(int attachmentIndex)
Validates this instance.
|
void |
writeElementsToXml(EwsServiceXmlWriter writer)
Writes the property of this object as XML elements.
|
canSetFieldValue, getContentId, getContentLocation, getContentType, getId, getIsInline, getLastModifiedTime, getName, getOwner, getSize, internalLoad, isNew, load, setContentId, setContentLocation, setContentType, setIsInline, setName, throwIfThisIsNotNew
addOnChangeEvent, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXml
protected ItemAttachment(Item owner)
owner
- The owner of the attachmentprotected void setItem(Item item)
item
- the new itempublic String getXmlElementName()
getXmlElementName
in class Attachment
public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception
tryReadElementFromXml
in class Attachment
reader
- the readerException
- the exceptionpublic boolean tryReadElementFromXmlToPatch(EwsServiceXmlReader reader) throws Exception
tryReadElementFromXmlToPatch
in class ComplexProperty
reader
- The reader.
True if element was read.Exception
public void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
writeElementsToXml
in class Attachment
writer
- ,The writer to write the elements to.Exception
- the exceptionprotected void validate(int attachmentIndex) throws Exception
attachmentIndex
- Index of this attachment.ServiceValidationException
- the service validation exceptionException
- the exceptionpublic void load(PropertyDefinitionBase... additionalProperties) throws Exception
additionalProperties
- the additional propertyException
- the exceptionpublic void load(Iterable<PropertyDefinitionBase> additionalProperties) throws Exception
additionalProperties
- the additional propertyException
- the exceptionpublic void load(BodyType bodyType, PropertyDefinitionBase... additionalProperties) throws Exception
bodyType
- the body typeadditionalProperties
- the additional propertyException
- the exceptionpublic void load(BodyType bodyType, Iterable<PropertyDefinitionBase> additionalProperties) throws Exception
bodyType
- the body typeadditionalProperties
- the additional propertyException
- the exceptionpublic void serviceObjectChanged(ServiceObject serviceObject)
serviceObjectChanged
in interface IServiceObjectChangedDelegate
serviceObject
- accepts ServiceObjectCopyright © 2012–2015 Microsoft. All rights reserved.