public abstract class Attachment extends ComplexProperty
| Modifier | Constructor and Description |
|---|---|
protected |
Attachment(Item owner)
Initializes a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
<T> boolean |
canSetFieldValue(T field,
T value)
Sets value of field.
|
String |
getContentId()
Gets the content Id of the attachment.
|
String |
getContentLocation()
Gets the content location of the attachment.
|
String |
getContentType()
Gets the content type of the attachment.
|
String |
getId()
Gets the Id of the attachment.
|
boolean |
getIsInline()
Gets a value indicating whether this is an inline attachment.
|
Date |
getLastModifiedTime()
Gets the date and time when this attachment was last modified.
|
String |
getName()
Gets the name of the attachment.
|
Item |
getOwner()
Gets the owner of the attachment.
|
int |
getSize()
Gets the size of the attachment.
|
abstract String |
getXmlElementName()
Gets the name of the XML element.
|
protected void |
internalLoad(BodyType bodyType,
Iterable<PropertyDefinitionBase> additionalProperties)
Load the attachment.
|
boolean |
isNew()
True if the attachment has not yet been saved, false otherwise.
|
void |
load()
Loads the attachment.
|
void |
setContentId(String value)
Sets the content id.
|
void |
setContentLocation(String value)
Sets the content location.
|
void |
setContentType(String value)
Sets the content type.
|
void |
setIsInline(boolean value)
Sets the checks if is inline.
|
void |
setName(String value)
Sets the name.
|
protected void |
throwIfThisIsNotNew()
Throws exception if this is not a new service object.
|
boolean |
tryReadElementFromXml(EwsServiceXmlReader reader)
Tries to read element from XML.
|
void |
writeElementsToXml(EwsServiceXmlWriter writer)
Writes elements to XML.
|
addOnChangeEvent, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXmlprotected Attachment(Item owner)
owner - The owner.protected void throwIfThisIsNotNew()
public <T> boolean canSetFieldValue(T field, T value)
canSetFieldValue in class ComplexPropertyT - the generic typefield - The fieldvalue - The value.public String getContentType()
public void setContentType(String value)
value - the new content typepublic String getContentId()
public void setContentId(String value)
value - the new content idpublic String getContentLocation()
public void setContentLocation(String value)
value - the new content locationpublic int getSize() throws ServiceVersionException
ServiceVersionException - throws ServiceVersionExceptionpublic Date getLastModifiedTime() throws ServiceVersionException
ServiceVersionException - the service version exceptionpublic boolean getIsInline() throws ServiceVersionException
ServiceVersionException - the service version exceptionpublic void setIsInline(boolean value) throws ServiceVersionException
value - the new checks if is inlineServiceVersionException - the service version exceptionpublic boolean isNew()
public abstract String getXmlElementName()
public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception
tryReadElementFromXml in class ComplexPropertyreader - The reader.Exception - the exceptionpublic void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
writeElementsToXml in class ComplexPropertywriter - the writerException - the exceptionprotected void internalLoad(BodyType bodyType, Iterable<PropertyDefinitionBase> additionalProperties) throws Exception
bodyType - Type of the body.additionalProperties - The additional property.Exception - the exceptionCopyright © 2012–2015 Microsoft. All rights reserved.