Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices
Class Announcement

java.lang.Object
  extended by com.jivesoftware.forum.webservices.Announcement

public class Announcement
extends java.lang.Object

Announcments are used to alert 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.


Constructor Summary
Announcement()
           
 
Method Summary
 int getAttachmentCount()
          Returns the number of attachments the announcement has.
 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.util.Date getStartDate()
          Returns the date when the announcement should first be visible.
 java.lang.String getSubject()
          Returns the announcement subject.
 User getUser()
          Returns the User that is the author of the announcemnt.
 void setAttachmentCount(int attachmentCount)
           
 void setBody(java.lang.String body)
          Sets the body of this announcement.
 void setContainerObjectID(long containerObjectID)
           
 void setContainerObjectType(int containerObjectType)
           
 void setEndDate(java.util.Date endDate)
          Sets the date when the announcement should not longer be visible.
 void setID(long announcementID)
           
 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.
 void setUser(User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Announcement

public Announcement()
Method Detail

getID

public long getID()
Returns the unique ID of the announcement, or -1 if the announcement hasn't been added to the database yet.

Returns:
the ID of the announcement.

setID

public void setID(long announcementID)

getContainerObjectType

public int getContainerObjectType()
Returns the object type of the announcement container. The type must be one of the following:

Returns:
the object type of the announcement container.

setContainerObjectType

public void setContainerObjectType(int containerObjectType)

getContainerObjectID

public long getContainerObjectID()
Returns the object ID of the announcement container. In the case of the container being the system, the object ID is -1.

Returns:
the ID of the announcement container.

setContainerObjectID

public void setContainerObjectID(long containerObjectID)

getUser

public User getUser()
Returns the User that is the author of the announcemnt.

Returns:
the author of the announement.

setUser

public void setUser(User user)

getStartDate

public java.util.Date getStartDate()
Returns the date when the announcement should first be visible.

Returns:
the date when the announcement is first visible.

setStartDate

public void setStartDate(java.util.Date startDate)
                  throws UnauthorizedException
Sets the start date for when the announcement should first be visible.

Parameters:
startDate - the date the announcement should first be visible.
Throws:
UnauthorizedException - if not allowed to set the start date.

getEndDate

public java.util.Date getEndDate()
Returns the date when the announcement should not longer be visible. If the end date is null, the announcement will never end.

Returns:
the date when the announcement is no longer visible.

setEndDate

public void setEndDate(java.util.Date endDate)
                throws UnauthorizedException
Sets the date when the announcement should not longer be visible. If the end date is null, the announcement will never end.

Parameters:
endDate - the date when the announcement is no longer visible.
Throws:
UnauthorizedException - if not allowed to set the end date.

getSubject

public java.lang.String getSubject()
Returns the announcement subject. If filters are active, the subject returned will be a filtered one. Because filters often provide security functionality, this method is the preferred way to get the subject of an announcement.

Returns:
the subject of this message.

setSubject

public void setSubject(java.lang.String subject)
                throws UnauthorizedException
Sets the announcement subject.

Parameters:
subject - the subject.
Throws:
UnauthorizedException - if not allowed to set the subject.

getBody

public java.lang.String getBody()
Returns the announcement body. If filters are active, the body returned will be a filtered one. Because filters often provide security functionality such as stripping out HTML and Javascript, this method is the preferred way to get the body of an announcement.

Returns:
the body of this announcement.

setBody

public void setBody(java.lang.String body)
             throws UnauthorizedException
Sets the body of this announcement.

Parameters:
body - the body.
Throws:
UnauthorizedException - if not allowed to set the body.

getAttachmentCount

public int getAttachmentCount()
Returns the number of attachments the announcement has.

Returns:
the number of attachments the announcement has.

setAttachmentCount

public void setAttachmentCount(int attachmentCount)

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.