|
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.database.DbAnnouncementManager
public class DbAnnouncementManager
Database implementation of the AnnouncementManager interface.
Method Summary | |
---|---|
void |
addAnnouncement(Announcement announcement)
Adds an an announcement to the database. |
void |
categoryAdded(CategoryEvent event)
Fired when a category has been added to the system. |
void |
categoryDeleted(CategoryEvent event)
Fired when a category is about to be deleted from the system. |
void |
categoryModified(CategoryEvent event)
Fired when a category has been modified. |
void |
categoryMoved(CategoryEvent event)
Fired when a category has been moved from one category to another. |
Announcement |
createAnnouncement(User user)
Creates a new system announcement. |
Announcement |
createAnnouncement(User user,
Forum forum)
Creates a new forum announcement. |
Announcement |
createAnnouncement(User user,
ForumCategory category)
Creates a new category announcement. |
void |
deleteAnnouncement(Announcement announcement)
Deletes an announcement. |
void |
destroy()
Notifies the manager to release any resources that may be holding on too. |
void |
forumAdded(ForumEvent event)
Fired when a forum has been added to the system. |
void |
forumDeleted(ForumEvent event)
Fired when a forum is about to be deleted from the system. |
void |
forumMerged(ForumEvent event)
Fired when a forum is merged into another forum. |
void |
forumModified(ForumEvent event)
Fired when a forum is modified. |
void |
forumMoved(ForumEvent event)
Fired when a forum has been moved from one category to another. |
Announcement |
getAnnouncement(long announcementID)
Returns an announcement by announcement ID. |
int |
getAnnouncementCount(java.lang.Object container)
Returns the count of all currently viewable announcements in a container. |
int |
getAnnouncementCount(java.lang.Object container,
java.util.Date startDate,
java.util.Date endDate)
Returns the count of all announcements in a container that are viewable within the specified date range. |
java.util.Iterator |
getAnnouncements(java.lang.Object container)
Returns all currently viewable announcements in a container. |
java.util.Iterator |
getAnnouncements(java.lang.Object container,
java.util.Date startDate,
java.util.Date endDate)
Returns the announcements in a container that are viewable within a specified date range.If container is null then system announcements will be returned. |
static DbAnnouncementManager |
getInstance()
|
int |
getRecursiveAnnouncementCount(ForumCategory category)
Returns the count of all currently viewable announcements in a ForumCategory and its child Forums and SubCategories. |
java.util.Iterator |
getRecursiveAnnouncements(ForumCategory category,
int startIndex,
int numResults)
Returns all currently viewable announcements in a ForumCategory and its child Forums and SubCategories. |
void |
initialize()
Initialize the manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DbAnnouncementManager getInstance()
public void initialize()
JiveManager
This method is used internally by Jive during application startup and should not be called during normal usage of the class.
initialize
in interface JiveManager
public void destroy()
JiveManager
destroy
in interface JiveManager
public Announcement createAnnouncement(User user) throws UnauthorizedException
AnnouncementManager
AnnouncementManager.addAnnouncement(Announcement)
method.
createAnnouncement
in interface AnnouncementManager
user
- the user creating the announcement.
UnauthorizedException
- if not allowed to create a system annoucement.public Announcement createAnnouncement(User user, ForumCategory category) throws UnauthorizedException
AnnouncementManager
AnnouncementManager.addAnnouncement(Announcement)
method.
createAnnouncement
in interface AnnouncementManager
user
- the user creating the announcement.category
- the category to add the announcement to.
UnauthorizedException
- if not allowed to create a system annoucement.public Announcement createAnnouncement(User user, Forum forum) throws UnauthorizedException
AnnouncementManager
AnnouncementManager.addAnnouncement(Announcement)
method.
createAnnouncement
in interface AnnouncementManager
user
- the user creating the announcement.forum
- the forum to add the announcement to.
UnauthorizedException
- if not allowed to create a system annoucement.public void addAnnouncement(Announcement announcement) throws UnauthorizedException
AnnouncementManager
addAnnouncement
in interface AnnouncementManager
announcement
- the announcement to add to the database.
UnauthorizedException
- if not allowed to create a system annoucement.public Announcement getAnnouncement(long announcementID) throws AnnouncementNotFoundException
AnnouncementManager
getAnnouncement
in interface AnnouncementManager
announcementID
- the ID of the announcement to return.
AnnouncementNotFoundException
- if the announcement could not be loaded
or does not exist.public int getAnnouncementCount(java.lang.Object container)
AnnouncementManager
getAnnouncementCount
in interface AnnouncementManager
container
- a forum, category, or null for system announcements.
public int getRecursiveAnnouncementCount(ForumCategory category)
AnnouncementManager
getRecursiveAnnouncementCount
in interface AnnouncementManager
category
- a category, or null for system announcements.
public int getAnnouncementCount(java.lang.Object container, java.util.Date startDate, java.util.Date endDate)
AnnouncementManager
getAnnouncementCount
in interface AnnouncementManager
container
- a forum, category, or null for system announcements.startDate
- the start date of announcements, or null to leave this value
unbounded.endDate
- the end date of announcements, or null to leave this value
unbounded.
public java.util.Iterator getAnnouncements(java.lang.Object container)
AnnouncementManager
getAnnouncements
in interface AnnouncementManager
container
- a forum, category, or null for system announcements.
public java.util.Iterator getAnnouncements(java.lang.Object container, java.util.Date startDate, java.util.Date endDate)
AnnouncementManager
getAnnouncements
in interface AnnouncementManager
container
- a forum, category, or null for system announcements.startDate
- the start date of announcements, or null to leave this value
unbounded.endDate
- the end date of announcements, or null to leave this value
unbounded.
public java.util.Iterator getRecursiveAnnouncements(ForumCategory category, int startIndex, int numResults)
AnnouncementManager
getRecursiveAnnouncements
in interface AnnouncementManager
category
- a category, or null for system announcements.
public void deleteAnnouncement(Announcement announcement)
AnnouncementManager
deleteAnnouncement
in interface AnnouncementManager
announcement
- the announcement to delete.public void categoryAdded(CategoryEvent event)
CategoryListener
categoryAdded
in interface CategoryListener
event
- the event object.public void categoryDeleted(CategoryEvent event)
CategoryListener
categoryDeleted
in interface CategoryListener
event
- the event object.public void categoryModified(CategoryEvent event)
CategoryListener
categoryModified
in interface CategoryListener
event
- the event object.public void categoryMoved(CategoryEvent event)
CategoryListener
categoryMoved
in interface CategoryListener
event
- the event object.public void forumAdded(ForumEvent event)
ForumListener
forumAdded
in interface ForumListener
event
- the event object.public void forumDeleted(ForumEvent event)
ForumListener
forumDeleted
in interface ForumListener
event
- the event object.public void forumMoved(ForumEvent event)
ForumListener
forumMoved
in interface ForumListener
event
- the event object.public void forumModified(ForumEvent event)
ForumListener
forumModified
in interface ForumListener
event
- the event object.public void forumMerged(ForumEvent event)
ForumListener
forumMerged
in interface ForumListener
event
- the event object.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |