|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmicrosoft.exchange.webservices.data.ComplexProperty
microsoft.exchange.webservices.data.ComplexPropertyCollection<Attachment>
microsoft.exchange.webservices.data.AttachmentCollection
public final class AttachmentCollection
Represents an item's attachment collection.
Constructor Summary | |
---|---|
protected |
AttachmentCollection()
Initializes a new instance of AttachmentCollection. |
Method Summary | ||
---|---|---|
FileAttachment |
addFileAttachment(java.lang.String fileName)
* Adds a file attachment to the collection. |
|
FileAttachment |
addFileAttachment(java.lang.String name,
byte[] content)
* Adds a file attachment to the collection. |
|
FileAttachment |
addFileAttachment(java.lang.String name,
java.io.InputStream contentStream)
* Adds a file attachment to the collection. |
|
FileAttachment |
addFileAttachment(java.lang.String name,
java.lang.String fileName)
* Adds a file attachment to the collection. |
|
|
addItemAttachment(java.lang.Class<TItem> cls)
* Adds an item attachment to the collection. |
|
void |
clear()
Removes all attachments from this collection. |
|
protected void |
clearChangeLog()
Disables the change log clearing mechanism. |
|
protected Attachment |
createComplexProperty(java.lang.String xmlElementName)
Instantiate the appropriate attachment type depending on the current XML element name. |
|
protected java.lang.String |
getCollectionItemXmlElementName(Attachment complexProperty)
Determines the name of the XML element associated with the complexProperty parameter. |
|
ServiceObject |
getOwner()
The owner of this attachment collection. |
|
protected boolean |
hasUnprocessedChanges()
Determines whether there are any unsaved attachment collection changes. |
|
boolean |
remove(Attachment attachment)
Removes the specified attachment. |
|
void |
removeAt(int index)
Removes the attachment at the specified index. |
|
protected void |
save()
Saves this collection by creating new attachment and deleting removed ones. |
|
void |
setOwner(ServiceObject value)
The owner of this attachment collection. |
|
void |
validate()
Validates this instance. |
Methods inherited from class microsoft.exchange.webservices.data.ComplexPropertyCollection |
---|
complexPropertyChanged, contains, getAddedItems, getCount, getItems, getModifiedItems, getPropertyAtIndex, getRemovedItems, indexOf, internalAdd, internalClear, internalRemove, internalRemoveAt, itemChanged, iterator, loadFromXml, loadFromXml, removeFromChangeLog, shouldWriteToXml, updateFromXml, writeDeleteUpdateToXml, writeElementsToXml, writeSetUpdateToXml, writeToXml |
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty |
---|
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, func, getNamespace, internalValidate, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, writeAttributesToXml, writeToXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AttachmentCollection()
Method Detail |
---|
public ServiceObject getOwner()
public void setOwner(ServiceObject value)
value
- accepts ServiceObjectpublic FileAttachment addFileAttachment(java.lang.String fileName)
fileName
- the file name
public FileAttachment addFileAttachment(java.lang.String name, java.lang.String fileName)
name
- accepts String display name of the new attachment.fileName
- accepts String name of the file representing the content of
the attachment.
public FileAttachment addFileAttachment(java.lang.String name, java.io.InputStream contentStream)
name
- accepts String display name of the new attachment.contentStream
- accepts InputStream stream from which to read the content of
the attachment.
public FileAttachment addFileAttachment(java.lang.String name, byte[] content)
name
- the namecontent
- accepts byte byte arrays representing the content of the
attachment.
public <TItem extends Item> GenericItemAttachment<TItem> addItemAttachment(java.lang.Class<TItem> cls) throws java.lang.Exception
TItem
- the generic typecls
- the cls
java.lang.Exception
- the exceptionpublic void clear()
public void removeAt(int index)
index
- Index of the attachment to remove.public boolean remove(Attachment attachment) throws java.lang.Exception
attachment
- The attachment to remove.
java.lang.Exception
- the exceptionprotected Attachment createComplexProperty(java.lang.String xmlElementName)
createComplexProperty
in class ComplexPropertyCollection<Attachment>
xmlElementName
- The XML element name from which to determine the type of
attachment to create.
protected java.lang.String getCollectionItemXmlElementName(Attachment complexProperty)
getCollectionItemXmlElementName
in class ComplexPropertyCollection<Attachment>
complexProperty
- The attachment object for which to determine the XML element
name with.
protected void save() throws java.lang.Exception
java.lang.Exception
- the exceptionprotected boolean hasUnprocessedChanges() throws ServiceLocalException
ServiceLocalException
protected void clearChangeLog()
clearChangeLog
in class ComplexPropertyCollection<Attachment>
public void validate() throws java.lang.Exception
validate
in class ComplexProperty
java.lang.Exception
- the exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |