|
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.AnnouncementProxy
public class AnnouncementProxy
Proxy class for Announcement objects.
Constructor Summary | |
---|---|
AnnouncementProxy(Announcement announcement,
AuthToken authToken,
Permissions permissions)
Creates a new AnnouncementManager to protect the supplied manager with the specified permissions. |
Method Summary | |
---|---|
void |
deleteAttachment(Attachment attachment)
Deletes an attachment that belongs to the announcement. |
void |
deleteProperty(java.lang.String name)
Deletes an extended property. |
int |
getAttachmentCount()
Returns the number of attachments the announcement has. |
java.util.Iterator |
getAttachments()
Returns an Iterator for all the attachments of the message. |
java.lang.String |
getBody()
Returns the announcement body. |
long |
getContainerObjectID()
Returns the object ID of the announcement container. |
int |
getContainerObjectType()
Returns the object type of the announcement container. |
java.util.Date |
getEndDate()
Returns the date when the announcement should not longer be visible. |
long |
getID()
Returns the unique ID of the announcement, or -1 if the announcement hasn't been added to the database yet. |
java.lang.String |
getProperty(java.lang.String name)
Returns an extended property of the announcement. |
java.util.Iterator |
getPropertyNames()
Returns an Iterator for all the names of the extended properties. |
Announcement |
getProxiedAnnouncement()
Allow access to the underlying message object under two conditions: system or forum admin, or the message hasn't been added to a thread yet. |
java.util.Date |
getStartDate()
Returns the date when the announcement should first be visible. |
java.lang.String |
getSubject()
Returns the announcement subject. |
java.lang.String |
getUnfilteredBody()
Returns the announceement body, bypassing any active filters. |
java.lang.String |
getUnfilteredProperty(java.lang.String name)
Returns an extended property of the announcement, bypassing any filters. |
java.lang.String |
getUnfilteredSubject()
Returns the annoucenment subject, bypassing any active filters. |
User |
getUser()
Returns the User that is the author of the announcemnt. |
void |
setBody(java.lang.String body)
Sets the body of this announcement. |
void |
setEndDate(java.util.Date endDate)
Sets the date when the announcement should not longer be visible. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets an extended property of this annoucement. |
void |
setStartDate(java.util.Date startDate)
Sets the start date for when the announcement should first be visible. |
void |
setSubject(java.lang.String subject)
Sets the announcement subject. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnouncementProxy(Announcement announcement, AuthToken authToken, Permissions permissions)
Method Detail |
---|
public long getID()
Announcement
getID
in interface Announcement
public int getContainerObjectType()
Announcement
getContainerObjectType
in interface Announcement
public long getContainerObjectID()
Announcement
getContainerObjectID
in interface Announcement
public User getUser()
Announcement
getUser
in interface Announcement
public java.util.Date getStartDate()
Announcement
getStartDate
in interface Announcement
public void setStartDate(java.util.Date startDate) throws UnauthorizedException
Announcement
setStartDate
in interface Announcement
startDate
- the date the announcement should first be visible.
UnauthorizedException
- if not allowed to set the start date.public java.util.Date getEndDate()
Announcement
getEndDate
in interface Announcement
public void setEndDate(java.util.Date endDate) throws UnauthorizedException
Announcement
setEndDate
in interface Announcement
endDate
- the date when the announcement is no longer visible.
UnauthorizedException
- if not allowed to set the end date.public java.lang.String getSubject()
Announcement
getSubject
in interface Announcement
public void setSubject(java.lang.String subject) throws UnauthorizedException
Announcement
setSubject
in interface Announcement
subject
- the subject.
UnauthorizedException
- if not allowed to set the subject.public java.lang.String getUnfilteredSubject()
Announcement
Unfiltered content is necessary for a few reasons. One is when saving content to another persistence mechanism such as an XML format.
getUnfilteredSubject
in interface Announcement
public java.lang.String getBody()
Announcement
getBody
in interface Announcement
public void setBody(java.lang.String body) throws UnauthorizedException
Announcement
setBody
in interface Announcement
body
- the body.
UnauthorizedException
- if not allowed to set the body.public java.lang.String getUnfilteredBody()
Announcement
Unfiltered content is necessary for a few reasons. One is when saving content to another persistence mechanism such as an XML format.
getUnfilteredBody
in interface Announcement
public int getAttachmentCount()
Announcement
getAttachmentCount
in interface Announcement
public void deleteAttachment(Attachment attachment) throws AttachmentException, UnauthorizedException
Announcement
deleteAttachment
in interface Announcement
attachment
- the attachment to delete.
AttachmentException
- if there was an error deleting the attachment.
UnauthorizedException
- if not authorized to delete the attachment.public java.util.Iterator getAttachments()
Announcement
getAttachments
in interface Announcement
Attachment
public java.lang.String getProperty(java.lang.String name)
Announcement
For security reasons, you should enable an HTML filter in case properties contain malicious HTML code.
getProperty
in interface Announcement
name
- the name of the property to get.
public java.lang.String getUnfilteredProperty(java.lang.String name)
Announcement
Because properties are not filtered before being returned, this method should be used with caution. In particular, you should avoid showing unfiltered data in an environment where embedded HTML might be interpreted.
getUnfilteredProperty
in interface Announcement
name
- the name of the property to get.
public void setProperty(java.lang.String name, java.lang.String value) throws UnauthorizedException
Announcement
setProperty
in interface Announcement
name
- the name of the property to set.value
- the new value for the property.
UnauthorizedException
- if not allowed to edit the message.public void deleteProperty(java.lang.String name) throws UnauthorizedException
Announcement
name
does not exist, this method will do nothing.
deleteProperty
in interface Announcement
name
- the name of the property to delete.
UnauthorizedException
- if not allowed to edit the message.public java.util.Iterator getPropertyNames()
Announcement
getPropertyNames
in interface Announcement
public Announcement getProxiedAnnouncement() throws UnauthorizedException
UnauthorizedException
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |