|
Jive Forums API (5.5.20.2-oracle) Core Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Attachment
An object that encapsulates a message attachment. Each attachment has a unique ID and is made up of three parts: binary data (read and written using an InputStream), a name, and content type. An image attachment might have a name "stockchart.gif" and corresponding content type of "image/gif". A full listing of possible content types can be found at: ftp://ftp.iana.org/in-notes/iana/assignments/media-types/ The storage mechanism of attachments is unspecified, although the default implementation puts attachments on the filesystem.
Method Summary | |
---|---|
void |
deleteProperty(java.lang.String name)
Deletes an extended property. |
java.lang.String |
getContentType()
Returns the content type of the attachment. |
java.util.Date |
getCreationDate()
Returns the date the attachment was created. |
java.io.InputStream |
getData()
Returns a InputStream for the binary contents of the
attachment. |
long |
getID()
Returns the unique ID of the attachment. |
java.util.Date |
getModificationDate()
Returns the date the attachment was last modified. |
java.lang.String |
getName()
Returns the name of the attachment. |
java.util.Collection |
getProperties(java.lang.String parentName)
Return all immediate children property values of a parent property as an unmodifiable Collection of String values. |
java.lang.String |
getProperty(java.lang.String name)
Returns an extended property of the attachment. |
java.util.Iterator |
getPropertyNames()
Returns an Iterator for the names of the extended properties. |
long |
getSize()
Returns the size of the attachment in bytes. |
void |
setName(java.lang.String name)
Sets the name of the attachment. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets an extended property of the attachment. |
Method Detail |
---|
long getID()
java.lang.String getContentType()
java.lang.String getName()
void setName(java.lang.String name) throws UnauthorizedException
name
- the new name of the attachment.
UnauthorizedException
- if not allowed to modify the attachmentlong getSize()
java.io.InputStream getData() throws java.io.IOException
InputStream
for the binary contents of the
attachment. The stream should be closed after reading the attachment
is completed. The InputStream will already be buffered, so there is no
advantage to using additional buffering.
java.io.IOException
- if an error occurs reading the attachment from storage.java.util.Date getCreationDate()
java.util.Date getModificationDate()
java.lang.String getProperty(java.lang.String name)
name
- the name of the property to get.
java.util.Collection getProperties(java.lang.String parentName)
parentName
- the name of the parent property to return the children for.
void setProperty(java.lang.String name, java.lang.String value) throws UnauthorizedException
If the property referenced by name
already exists, its
value will be updated.
name
- the name of the property to set.value
- the new value for the property.
UnauthorizedException
- if does not have admin permissions.void deleteProperty(java.lang.String name) throws UnauthorizedException
name
does not exist, this method will do nothing.
name
- the name of the property to delete.
UnauthorizedException
- if does not have ADMIN permissions.java.util.Iterator getPropertyNames()
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |