|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.proxy.AttachmentProxy
public class AttachmentProxy
Field Summary | |
---|---|
protected Permissions |
permissions
|
Constructor Summary | |
---|---|
AttachmentProxy(Attachment attachment,
ForumMessageProxy message,
AuthToken authToken,
Permissions permissions)
Creates a new AttachmentProxy to protect the supplied attachment with the specified permissions |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Permissions permissions
Constructor Detail |
---|
public AttachmentProxy(Attachment attachment, ForumMessageProxy message, AuthToken authToken, Permissions permissions)
Method Detail |
---|
public long getID()
Attachment
getID
in interface Attachment
public java.lang.String getContentType()
Attachment
getContentType
in interface Attachment
public java.lang.String getName()
Attachment
getName
in interface Attachment
public void setName(java.lang.String name) throws UnauthorizedException
Attachment
setName
in interface Attachment
name
- the new name of the attachment.
UnauthorizedException
- if not allowed to modify the attachmentpublic long getSize()
Attachment
getSize
in interface Attachment
public java.io.InputStream getData() throws java.io.IOException
Attachment
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.
getData
in interface Attachment
java.io.IOException
- if an error occurs reading the attachment from storage.public java.util.Date getCreationDate()
Attachment
getCreationDate
in interface Attachment
public java.util.Date getModificationDate()
Attachment
getModificationDate
in interface Attachment
public java.lang.String getProperty(java.lang.String name)
Attachment
getProperty
in interface Attachment
name
- the name of the property to get.
public java.util.Collection getProperties(java.lang.String parentName)
Attachment
getProperties
in interface Attachment
parentName
- the name of the parent property to return the children for.
public void setProperty(java.lang.String name, java.lang.String value) throws UnauthorizedException
Attachment
If the property referenced by name
already exists, its
value will be updated.
setProperty
in interface Attachment
name
- the name of the property to set.value
- the new value for the property.
UnauthorizedException
- if does not have admin permissions.public void deleteProperty(java.lang.String name) throws UnauthorizedException
Attachment
name
does not exist, this method will do nothing.
deleteProperty
in interface Attachment
name
- the name of the property to delete.
UnauthorizedException
- if does not have ADMIN permissions.public java.util.Iterator getPropertyNames()
Attachment
getPropertyNames
in interface Attachment
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |