|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.forum.database.DbAnnouncement
public class DbAnnouncement
Database implementation of the Announcement interface.
| Constructor Summary | |
|---|---|
DbAnnouncement()
Constructor for internal use only. |
|
DbAnnouncement(int objectType,
long objectID,
long userID)
|
|
DbAnnouncement(long announcementID)
Loads an existing announcement based on announcement ID. |
|
| Method Summary | |
|---|---|
void |
deleteAttachment(Attachment attachment)
Deletes an attachment that belongs to the announcement. |
void |
deleteProperty(java.lang.String name)
Deletes an extended property. |
boolean |
equals(java.lang.Object object)
|
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. |
int |
getCachedSize()
Returns the approximate size of the Object in bytes. |
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. |
int |
hashCode()
|
protected void |
insertIntoDb()
|
void |
readExternal(java.io.DataInput in)
|
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. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DbAnnouncement(long announcementID)
throws AnnouncementNotFoundException
announcementID - the ID of the announcement.
AnnouncementNotFoundException
public DbAnnouncement(int objectType,
long objectID,
long userID)
public DbAnnouncement()
| Method Detail |
|---|
public void readExternal(java.io.DataInput in)
throws java.io.IOException
readExternal in interface com.tangosol.io.ExternalizableLitejava.io.IOException
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
writeExternal in interface com.tangosol.io.ExternalizableLitejava.io.IOExceptionpublic long getID()
Announcement
getID in interface Announcementpublic int getContainerObjectType()
Announcement
getContainerObjectType in interface Announcementpublic long getContainerObjectID()
Announcement
getContainerObjectID in interface Announcementpublic User getUser()
Announcement
getUser in interface Announcementpublic java.util.Date getStartDate()
Announcement
getStartDate in interface Announcementpublic void setStartDate(java.util.Date startDate)
Announcement
setStartDate in interface AnnouncementstartDate - the date the announcement should first be visible.public java.util.Date getEndDate()
Announcement
getEndDate in interface Announcement
public void setEndDate(java.util.Date endDate)
throws UnauthorizedException
Announcement
setEndDate in interface AnnouncementendDate - 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 Announcementsubject - the subject.
UnauthorizedException - if not allowed to set the subject.public java.lang.String getUnfilteredSubject()
AnnouncementUnfiltered content is necessary for a few reasons. One is when saving content to another persistence mechanism such as an XML format.
getUnfilteredSubject in interface Announcementpublic java.lang.String getBody()
Announcement
getBody in interface Announcementpublic java.lang.String getUnfilteredBody()
AnnouncementUnfiltered 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 void setBody(java.lang.String body)
throws UnauthorizedException
Announcement
setBody in interface Announcementbody - the body.
UnauthorizedException - if not allowed to set the body.public int getAttachmentCount()
Announcement
getAttachmentCount in interface Announcement
public void deleteAttachment(Attachment attachment)
throws AttachmentException
Announcement
deleteAttachment in interface Announcementattachment - the attachment to delete.
AttachmentException - if there was an error deleting the attachment.public java.util.Iterator getAttachments()
Announcement
getAttachments in interface AnnouncementAttachmentpublic java.lang.String getProperty(java.lang.String name)
AnnouncementFor security reasons, you should enable an HTML filter in case properties contain malicious HTML code.
getProperty in interface Announcementname - the name of the property to get.
public java.lang.String getUnfilteredProperty(java.lang.String name)
AnnouncementBecause 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 Announcementname - the name of the property to get.
public void setProperty(java.lang.String name,
java.lang.String value)
Announcement
setProperty in interface Announcementname - the name of the property to set.value - the new value for the property.public void deleteProperty(java.lang.String name)
Announcementname does not exist, this method will do nothing.
deleteProperty in interface Announcementname - the name of the property to delete.public java.util.Iterator getPropertyNames()
Announcement
getPropertyNames in interface Announcementpublic int getCachedSize()
Cacheable
getCachedSize in interface Cacheablepublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectprotected void insertIntoDb()
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||