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

java.lang.Object
  extended by microsoft.exchange.webservices.data.property.complex.ComplexProperty
      extended by microsoft.exchange.webservices.data.property.complex.Attachment
          extended by 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
protected ItemAttachment(Item owner)
          Initializes a new instance of the class.
 
Method Summary
 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.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemAttachment

protected ItemAttachment(Item owner)
Initializes a new instance of the class.

Parameters:
owner - The owner of the attachment
Method Detail

getItem

public Item getItem()
Gets the item associated with the attachment.

Returns:
the item

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:
getXmlElementName in class Attachment
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:
tryReadElementFromXml in class Attachment
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:
tryReadElementFromXmlToPatch in class ComplexProperty
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:
writeElementsToXml in class Attachment
Parameters:
writer - ,The writer to write the elements to.
Throws:
Exception - the exception

validate

protected void validate(int attachmentIndex)
                 throws Exception
Validates this instance.

Parameters:
attachmentIndex - Index of this attachment.
Throws:
ServiceValidationException - the service validation exception
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 type
additionalProperties - 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 type
additionalProperties - the additional property
Throws:
Exception - the exception

serviceObjectChanged

public void serviceObjectChanged(ServiceObject serviceObject)
Service object changed.

Specified by:
serviceObjectChanged in interface IServiceObjectChangedDelegate
Parameters:
serviceObject - accepts ServiceObject


Copyright © 2012–2015 Microsoft. All rights reserved.