microsoft.exchange.webservices.data
Class ItemAttachment

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.Attachment
          extended by microsoft.exchange.webservices.data.ItemAttachment
Direct Known Subclasses:
GenericItemAttachment

public class ItemAttachment
extends Attachment

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.
protected  java.lang.String getXmlElementName()
          Obtains EWS XML element name for this object.
 void load(BodyType bodyType, java.lang.Iterable<PropertyDefinitionBase> additionalProperties)
          Loads this attachment.
 void load(BodyType bodyType, PropertyDefinitionBase... additionalProperties)
          Loads this attachment.
 void load(java.lang.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.
protected  boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Tries to read the element at the current position of the reader.
protected  boolean tryReadElementFromXmlToPatch(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          For ItemAttachment, AttachmentId and Item should be patched.
protected  void validate(int attachmentIndex)
          Validates this instance.
protected  void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes the properties of this object as XML elements.
 
Methods inherited from class microsoft.exchange.webservices.data.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.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

protected java.lang.String getXmlElementName()
Obtains EWS XML element name for this object.

Returns:
The XML element name.

tryReadElementFromXml

protected boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                                 throws java.lang.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:
java.lang.Exception - the exception

tryReadElementFromXmlToPatch

protected boolean tryReadElementFromXmlToPatch(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                                        throws java.lang.Exception
For ItemAttachment, AttachmentId and Item should be patched.

Overrides:
tryReadElementFromXmlToPatch in class ComplexProperty
Parameters:
reader - The reader. True if element was read.
Throws:
java.lang.Exception

writeElementsToXml

protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                           throws java.lang.Exception
Writes the properties of this object as XML elements.

Overrides:
writeElementsToXml in class Attachment
Parameters:
writer - ,The writer to write the elements to.
Throws:
java.lang.Exception - the exception

validate

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

Parameters:
attachmentIndex - the attachment index
Throws:
java.lang.Exception - the exception

load

public void load(PropertyDefinitionBase... additionalProperties)
          throws java.lang.Exception
Loads this attachment.

Parameters:
additionalProperties - the additional properties
Throws:
java.lang.Exception - the exception

load

public void load(java.lang.Iterable<PropertyDefinitionBase> additionalProperties)
          throws java.lang.Exception
Loads this attachment.

Parameters:
additionalProperties - the additional properties
Throws:
java.lang.Exception - the exception

load

public void load(BodyType bodyType,
                 PropertyDefinitionBase... additionalProperties)
          throws java.lang.Exception
Loads this attachment.

Parameters:
bodyType - the body type
additionalProperties - the additional properties
Throws:
java.lang.Exception - the exception

load

public void load(BodyType bodyType,
                 java.lang.Iterable<PropertyDefinitionBase> additionalProperties)
          throws java.lang.Exception
Loads this attachment.

Parameters:
bodyType - the body type
additionalProperties - the additional properties
Throws:
java.lang.Exception - the exception

serviceObjectChanged

public void serviceObjectChanged(ServiceObject serviceObject)
Service object changed.

Parameters:
serviceObject - accepts ServiceObject