|
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 Announcement
Alerts users to important information. Announcements belong to either forums, categories, or the system. Each announement has an optional start date and end date; outside of those dates, the announcement will not be displayed to end users.
Each announcement can have an arbitrary number of extended properties, which allow extra data about the announcement to be stored.
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. |
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. |
Method Detail |
---|
long getID()
int getContainerObjectType()
long getContainerObjectID()
User getUser()
java.util.Date getStartDate()
void setStartDate(java.util.Date startDate) throws UnauthorizedException
startDate
- the date the announcement should first be visible.
UnauthorizedException
- if not allowed to set the start date.java.util.Date getEndDate()
void setEndDate(java.util.Date endDate) throws UnauthorizedException
endDate
- the date when the announcement is no longer visible.
UnauthorizedException
- if not allowed to set the end date.java.lang.String getSubject()
void setSubject(java.lang.String subject) throws UnauthorizedException
subject
- the subject.
UnauthorizedException
- if not allowed to set the subject.java.lang.String getUnfilteredSubject()
Unfiltered content is necessary for a few reasons. One is when saving content to another persistence mechanism such as an XML format.
java.lang.String getBody()
void setBody(java.lang.String body) throws UnauthorizedException
body
- the body.
UnauthorizedException
- if not allowed to set the body.java.lang.String getUnfilteredBody()
Unfiltered content is necessary for a few reasons. One is when saving content to another persistence mechanism such as an XML format.
int getAttachmentCount()
void deleteAttachment(Attachment attachment) throws AttachmentException, UnauthorizedException
attachment
- the attachment to delete.
java.lang.IllegalArgumentException
- if the attachment doesn't belong to
the announcement.
UnauthorizedException
- if not authorized to delete the attachment.
AttachmentException
- if there was an error deleting the attachment.java.util.Iterator getAttachments()
Attachment
java.lang.String getProperty(java.lang.String name)
For security reasons, you should enable an HTML filter in case properties contain malicious HTML code.
name
- the name of the property to get.
java.lang.String getUnfilteredProperty(java.lang.String name)
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.
name
- the name of the property to get.
void setProperty(java.lang.String name, java.lang.String value) throws UnauthorizedException
name
- the name of the property to set.value
- the new value for the property.
UnauthorizedException
- if not allowed to edit the message.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 not allowed to edit the message.java.util.Iterator getPropertyNames()
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |