Class ItemAttachment
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.Attachment
-
- microsoft.exchange.webservices.data.property.complex.ItemAttachment
-
- All Implemented Interfaces:
ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>,IServiceObjectChangedDelegate
- Direct Known Subclasses:
GenericItemAttachment
public class ItemAttachment extends Attachment implements IServiceObjectChangedDelegate
Represents an item attachment.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedItemAttachment(Item owner)Initializes a new instance of the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemgetItem()Gets the item associated with the attachment.StringgetXmlElementName()Obtains EWS XML element name for this object.voidload(Iterable<PropertyDefinitionBase> additionalProperties)Loads this attachment.voidload(BodyType bodyType, Iterable<PropertyDefinitionBase> additionalProperties)Loads this attachment.voidload(BodyType bodyType, PropertyDefinitionBase... additionalProperties)Loads this attachment.voidload(PropertyDefinitionBase... additionalProperties)Loads this attachment.voidserviceObjectChanged(ServiceObject serviceObject)Service object changed.protected voidsetItem(Item item)Sets the item associated with the attachment.booleantryReadElementFromXml(EwsServiceXmlReader reader)Tries to read the element at the current position of the reader.booleantryReadElementFromXmlToPatch(EwsServiceXmlReader reader)For ItemAttachment, AttachmentId and Item should be patched.protected voidvalidate(int attachmentIndex)voidwriteElementsToXml(EwsServiceXmlWriter writer)Writes the property of this object as XML elements.-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.Attachment
canSetFieldValue, getContentId, getContentLocation, getContentType, getId, getIsInline, getLastModifiedTime, getName, getOwner, getSize, internalLoad, isNew, load, setContentId, setContentLocation, setContentType, setIsInline, setName, throwIfThisIsNotNew
-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ComplexProperty
addOnChangeEvent, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXml
-
-
-
-
Constructor Detail
-
ItemAttachment
protected ItemAttachment(Item owner)
Initializes a new instance of the class.- Parameters:
owner- The owner of the attachment
-
-
Method Detail
-
setItem
protected void setItem(Item item)
Sets the item associated with the attachment.- Parameters:
item- the new item
-
getXmlElementName
public String getXmlElementName()
Obtains EWS XML element name for this object.- Specified by:
getXmlElementNamein classAttachment- Returns:
- The XML element name.
-
tryReadElementFromXml
public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception
Tries to read the element at the current position of the reader.- Overrides:
tryReadElementFromXmlin classAttachment- Parameters:
reader- the reader- Returns:
- True if the element was read, false otherwise.
- Throws:
Exception- the exception
-
tryReadElementFromXmlToPatch
public boolean tryReadElementFromXmlToPatch(EwsServiceXmlReader reader) throws Exception
For ItemAttachment, AttachmentId and Item should be patched.- Overrides:
tryReadElementFromXmlToPatchin classComplexProperty- Parameters:
reader- The reader. True if element was read.- Throws:
Exception
-
writeElementsToXml
public void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
Writes the property of this object as XML elements.- Overrides:
writeElementsToXmlin classAttachment- Parameters:
writer- ,The writer to write the elements to.- Throws:
Exception- the exception
-
load
public void load(PropertyDefinitionBase... additionalProperties) throws Exception
Loads this attachment.- Parameters:
additionalProperties- the additional property- Throws:
Exception- the exception
-
load
public void load(Iterable<PropertyDefinitionBase> additionalProperties) throws Exception
Loads this attachment.- Parameters:
additionalProperties- the additional property- Throws:
Exception- the exception
-
load
public void load(BodyType bodyType, PropertyDefinitionBase... additionalProperties) throws Exception
Loads this attachment.- Parameters:
bodyType- the body typeadditionalProperties- the additional property- Throws:
Exception- the exception
-
load
public void load(BodyType bodyType, Iterable<PropertyDefinitionBase> additionalProperties) throws Exception
Loads this attachment.- Parameters:
bodyType- the body typeadditionalProperties- the additional property- Throws:
Exception- the exception
-
serviceObjectChanged
public void serviceObjectChanged(ServiceObject serviceObject)
Service object changed.- Specified by:
serviceObjectChangedin interfaceIServiceObjectChangedDelegate- Parameters:
serviceObject- accepts ServiceObject
-
-