Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices.server
Class ForumServiceImpl

java.lang.Object
  extended by com.jivesoftware.forum.webservices.server.ForumServiceImpl
All Implemented Interfaces:
ForumService

public class ForumServiceImpl
extends java.lang.Object
implements ForumService


Constructor Summary
ForumServiceImpl()
           
 
Method Summary
 Forum createForum(java.lang.String name, java.lang.String description)
          Creates a new forum under the root category.
 Forum createForumUnderCategory(java.lang.String name, java.lang.String description, long categoryID)
          Creates a new forum under the specified category.
 Forum createRestrictedForumUnderCategory(java.lang.String name, java.lang.String description, long categoryID, long userID)
          Bundles calls associated with creation of a new forum that sets the user as the moderator and sets negative permission for anonymous and registered users.
 void deleteForum(long forumID)
          Used to delete a forum by its ID.
 void deleteProperty(java.lang.String name, long forumID)
          Delete a property with the given name from the forum with the given forum ID.
 Forum getForum(long forumID)
          Returns a Forum by its ID.
 int getForumCount()
          Returns the count of all forums in the system.
 int getForumCount(long categoryID)
          Returns the number of forums under the specified category.
 int getForumCountByCategoryIDWithFilter(long categoryID, ResultFilter resultFilter)
          Returns an array of IDs for all forums under this category.
 Forum[] getForums()
          Returns the IDs of all forums under the root category.
 Forum[] getForumsByCategoryID(long categoryID)
          Returns an array of IDs for all forums under this category.
 Forum[] getForumsByCategoryIDWithFilter(long categoryID, ResultFilter resultFilter)
          Returns an array of IDs for all forums under this category.
 Forum[] getPopularForums()
          Returns the IDs of all popular forums.
 Property[] getProperties(long forumID)
          Returns all tbe extended properties for the forum with the forum with specified ID.
 java.lang.String getProperty(java.lang.String name, long forumID)
          Returns the value for a given property name.
 int getRecursiveForumCount(long categoryID)
          Returns the count of all forums under the category with the specified ID.
 Forum[] getRecursiveForums(long categoryID)
          Returns an array of forum ids for all forums under the category with the specified ID recursively.
 void mergeForums(long forumID1, long forumID2)
          Merges the content of two forums by copying the threads from Forum with ID forumID2 to forum with ID forumID1.
 void moveForums(long forumID, long categoryID)
          Move the forum with the specified ID to the category with the specified ID.
 void setProperty(java.lang.String name, java.lang.String value, long forumID)
          Set an extended for the property with the given forum ID.
 void updateForum(Forum forum)
          Updates changes to a forum to the system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForumServiceImpl

public ForumServiceImpl()
Method Detail

getForum

public Forum getForum(long forumID)
               throws ForumNotFoundException
Description copied from interface: ForumService
Returns a Forum by its ID.

Specified by:
getForum in interface ForumService
Parameters:
forumID - The ID of the forum.
Returns:
The Forum object matching the ID.
Throws:
ForumNotFoundException

getForums

public Forum[] getForums()
Description copied from interface: ForumService
Returns the IDs of all forums under the root category.

Specified by:
getForums in interface ForumService
Returns:
The IDs of all forums under the root category.

getPopularForums

public Forum[] getPopularForums()
Description copied from interface: ForumService
Returns the IDs of all popular forums.

Specified by:
getPopularForums in interface ForumService
Returns:
The IDs of all popular forums.

getForumCount

public int getForumCount()
Description copied from interface: ForumService
Returns the count of all forums in the system.

Specified by:
getForumCount in interface ForumService
Returns:
The count of all forums in the system.

deleteForum

public void deleteForum(long forumID)
                 throws ForumNotFoundException
Description copied from interface: ForumService
Used to delete a forum by its ID.

Specified by:
deleteForum in interface ForumService
Parameters:
forumID - The ID of the forum to delete.
Throws:
ForumNotFoundException

mergeForums

public void mergeForums(long forumID1,
                        long forumID2)
                 throws ForumNotFoundException
Description copied from interface: ForumService
Merges the content of two forums by copying the threads from Forum with ID forumID2 to forum with ID forumID1. Forum with ID forumID2 will be deleted after all content is merged.

Specified by:
mergeForums in interface ForumService
Parameters:
forumID1 - The Forum to merge threads into.
forumID2 - The Forum to move all threads from.
Throws:
ForumNotFoundException

moveForums

public void moveForums(long forumID,
                       long categoryID)
                throws ForumNotFoundException,
                       ForumCategoryNotFoundException
Description copied from interface: ForumService
Move the forum with the specified ID to the category with the specified ID.

Specified by:
moveForums in interface ForumService
Parameters:
forumID - The ID of the forum to move.
categoryID - The ID of the category to move the forum to.
Throws:
ForumNotFoundException
ForumCategoryNotFoundException

getRecursiveForums

public Forum[] getRecursiveForums(long categoryID)
                           throws ForumCategoryNotFoundException
Description copied from interface: ForumService
Returns an array of forum ids for all forums under the category with the specified ID recursively.

Specified by:
getRecursiveForums in interface ForumService
Parameters:
categoryID - The ID of the category to get the ids of the forums.
Returns:
An array of forum IDs.
Throws:
ForumCategoryNotFoundException

getRecursiveForumCount

public int getRecursiveForumCount(long categoryID)
                           throws ForumCategoryNotFoundException
Description copied from interface: ForumService
Returns the count of all forums under the category with the specified ID.

Specified by:
getRecursiveForumCount in interface ForumService
Parameters:
categoryID - The ID of the forum to get the ids of the forums .
Returns:
The count of all forums under a category.
Throws:
ForumCategoryNotFoundException

getForumCountByCategoryIDWithFilter

public int getForumCountByCategoryIDWithFilter(long categoryID,
                                               ResultFilter resultFilter)
                                        throws ForumCategoryNotFoundException
Description copied from interface: ForumService
Returns an array of IDs for all forums under this category. This returns only the direct children of the category, one level deep. Filters on the resultFilter.

Specified by:
getForumCountByCategoryIDWithFilter in interface ForumService
Parameters:
categoryID - The ID of the category to get the ids of the forums.
resultFilter - to filter on.
Returns:
An array of forum IDs for the category with the specified ID.
Throws:
ForumCategoryNotFoundException

getForumsByCategoryID

public Forum[] getForumsByCategoryID(long categoryID)
                              throws ForumCategoryNotFoundException
Description copied from interface: ForumService
Returns an array of IDs for all forums under this category. This returns only the direct children of the category, one level deep.

Specified by:
getForumsByCategoryID in interface ForumService
Parameters:
categoryID - The ID of the category to get the ids of the forums.
Returns:
An array of forum IDs for the category with the specified ID.
Throws:
ForumCategoryNotFoundException

getForumsByCategoryIDWithFilter

public Forum[] getForumsByCategoryIDWithFilter(long categoryID,
                                               ResultFilter resultFilter)
                                        throws ForumCategoryNotFoundException
Description copied from interface: ForumService
Returns an array of IDs for all forums under this category. This returns only the direct children of the category, one level deep. Filters on the resultFilter.

Specified by:
getForumsByCategoryIDWithFilter in interface ForumService
Parameters:
categoryID - The ID of the category to get the ids of the forums.
Returns:
An array of forum IDs for the category with the specified ID.
Throws:
ForumCategoryNotFoundException

getForumCount

public int getForumCount(long categoryID)
                  throws ForumCategoryNotFoundException
Description copied from interface: ForumService
Returns the number of forums under the specified category.

Specified by:
getForumCount in interface ForumService
Parameters:
categoryID - The ID of the category.
Returns:
The number of forums of the category
Throws:
ForumCategoryNotFoundException - Thrown if the specified category does not exist.

createForum

public Forum createForum(java.lang.String name,
                         java.lang.String description)
Description copied from interface: ForumService
Creates a new forum under the root category.

Specified by:
createForum in interface ForumService
Parameters:
name - The name of the forum.
description - A short description of the purpose of the forum.
Returns:
The newly created forum.

createForumUnderCategory

public Forum createForumUnderCategory(java.lang.String name,
                                      java.lang.String description,
                                      long categoryID)
                               throws ForumCategoryNotFoundException
Description copied from interface: ForumService
Creates a new forum under the specified category.

Specified by:
createForumUnderCategory in interface ForumService
Parameters:
name - The name of the forum.
description - A short description of the purpose of the forum.
Returns:
The newly created forum.
Throws:
ForumCategoryNotFoundException - Thrown if the specified category does not exist.

getProperties

public Property[] getProperties(long forumID)
                         throws ForumNotFoundException
Description copied from interface: ForumService
Returns all tbe extended properties for the forum with the forum with specified ID.

Specified by:
getProperties in interface ForumService
Parameters:
forumID - The ID of the forum to retrieve properties for.
Returns:
An array of properties for the forum with the given ID.
Throws:
ForumNotFoundException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value,
                        long forumID)
                 throws ForumNotFoundException
Description copied from interface: ForumService
Set an extended for the property with the given forum ID.

Specified by:
setProperty in interface ForumService
Parameters:
name - The name of the property.
value - The value of the property.
forumID - The ID of the forum to set an extended property for.
Throws:
ForumNotFoundException

getProperty

public java.lang.String getProperty(java.lang.String name,
                                    long forumID)
                             throws ForumNotFoundException
Description copied from interface: ForumService
Returns the value for a given property name.

Specified by:
getProperty in interface ForumService
Parameters:
name - the property name.
forumID - the ID of the forum to retrieve the propery for.
Returns:
the value of the property, null if the property is not found.
Throws:
ForumNotFoundException

deleteProperty

public void deleteProperty(java.lang.String name,
                           long forumID)
                    throws ForumNotFoundException
Description copied from interface: ForumService
Delete a property with the given name from the forum with the given forum ID.

Specified by:
deleteProperty in interface ForumService
Parameters:
name - The name of the property to delete.
forumID - The ID of the forum to delete the property from.
Throws:
ForumNotFoundException

updateForum

public void updateForum(Forum forum)
                 throws ForumNotFoundException,
                        NameAlreadyExistsException
Description copied from interface: ForumService
Updates changes to a forum to the system.

Specified by:
updateForum in interface ForumService
Parameters:
forum - The forum to update.
Throws:
ForumNotFoundException
NameAlreadyExistsException

createRestrictedForumUnderCategory

public Forum createRestrictedForumUnderCategory(java.lang.String name,
                                                java.lang.String description,
                                                long categoryID,
                                                long userID)
                                         throws ForumCategoryNotFoundException,
                                                UserNotFoundException
Description copied from interface: ForumService
Bundles calls associated with creation of a new forum that sets the user as the moderator and sets negative permission for anonymous and registered users.

Specified by:
createRestrictedForumUnderCategory in interface ForumService
Returns:
Throws:
ForumCategoryNotFoundException
UserNotFoundException

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.