|
Clearspace API (1.10.16) 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 an 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 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 controlled via the
StorageManager; the
default implementation puts attachments in the database.
| Method Summary | |
|---|---|
int |
getContentObjectType()
Returns the object type of this attachments content object. |
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. |
int |
getDownloadCount()
Returns the number of times the attachment has been downloaded. |
JiveContentObject |
getJiveContentObject()
Returns the parent JiveContentObject 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.Map<java.lang.String,java.lang.String> |
getProperties()
Retrieve a map of all the extended properties for the attachment. |
long |
getSize()
Returns the size of the attachment in bytes. |
void |
setName(java.lang.String name)
Sets the name of the attachment. |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getID, getObjectType |
| Method Detail |
|---|
JiveContentObject getJiveContentObject()
JiveContentObject of the attachment.
JiveContentObject which contains the attachment.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()
int getDownloadCount()
java.util.Map<java.lang.String,java.lang.String> getProperties()
int getContentObjectType()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||