Jive Forums API (5.5.20.2-oracle) Web Services Client Javadocs

com.jivesoftware.forum.webservices
Interface ContentService


public interface ContentService

Provides a way to get handles on content objects. Content objects are strictly categories, forums, threads or messages. Once you have a handle on that object you can use the other services (ie, ForumService or MessageService) to do other operations).


Method Summary
 int countMessageSearchResults(Query query)
          Returns the number of possible results for the specified query.
 int countMessageSearchResultsByCategoryID(long categoryID, Query query)
          Returns the number of possible results for the specified query by category.
 int countMessageSearchResultsByForumID(long forumID, Query query)
          Returns the number of results for the specified query for a forum.
 int countQuickMessageSearchResults(java.lang.String query)
          Returns the number of possible results for the specified query.
 int countQuickMessageSearchResultsByCategoryID(long categoryID, java.lang.String query)
          Returns the number of possible results for the specified query.
 ForumMessage createMessage(java.lang.String subject, java.lang.String body, long threadID, long userID)
          Creates a new message on the given thread.
 ForumMessage createReplyMessage(java.lang.String subject, java.lang.String body, long messageID, long userID)
          Creates a new message that is a direct response to a given message.
 ForumThread createThread(java.lang.String subject, java.lang.String body, long forumID, long userID)
          Creates a new thread.
 Forum getForum(long forumID)
          Returns a Forum by its id.
 ForumCategory getForumCategory(long categoryID)
          Returns a ForumCategory by its id.
 ForumMessage getForumMessage(long messageID)
          Returns a ForumMessage by its id.
 ForumThread getForumThread(long threadID)
          Returns a ForumThread by its id.
 int getMessageCountByUserID(long userID)
          Returns the number of messages for created by the given userID.
 ForumMessage[] getMessagesByUserID(long userID)
          Returns all the messages created by the given userID.
 long[] messageSearch(Query query, int startIndex, int numResults)
          Provides the ability to create complex search queries with the ability to change sorting, filtering, etc.
 long[] messageSearchByCategories(long categoryID, Query query, int startIndex, int numResults)
          Provides the ability to create complex search queries with the ability to change sorting, filtering, etc. all by category.
 ForumMessage[] messageSearchByCategoriesForObjects(long categoryID, Query query, int startIndex, int numResults)
          Provides the ability to create complex search queries with the ability to change sorting, filtering, etc. all by category.
 long[] messageSearchByForum(long forumID, Query query, int startIndex, int numResults)
          Provides the ability to perform a search query for messages within a forum.
 ForumMessage[] messageSearchByForumForObjects(long forumID, Query query, int startIndex, int numResults)
          Provides the ability to perform a search query for messages within a forum.
 ForumMessage[] messageSearchForObjects(Query query, int startIndex, int numResults)
          Provides the ability to create complex search queries with the ability to change sorting, filtering, etc.
 long[] quickMessageSearch(java.lang.String query, int startIndex, int numResults)
          Provides the ability to do quick search queries based on the provided string.
 long[] quickMessageSearchByCategoryID(long categoryID, java.lang.String query, int startIndex, int numResults)
          Provides the ability to do quick search queries based on the provided string.
 ForumMessage[] quickMessageSearchByCategoryIDForObjects(long categoryID, java.lang.String query, int startIndex, int numResults)
          Provides the ability to do quick search queries based on the provided string.
 ForumMessage[] quickMessageSearchForObjects(java.lang.String query, int startIndex, int numResults)
          Provides the ability to do quick search queries based on the provided string.
 

Method Detail

getForum

Forum getForum(long forumID)
               throws ForumNotFoundException
Returns a Forum by its id.

Parameters:
forumID - the id of the forum.
Returns:
the Forum object matching the id.
Throws:
ForumNotFoundException

getForumCategory

ForumCategory getForumCategory(long categoryID)
                               throws ForumCategoryNotFoundException
Returns a ForumCategory by its id.

Parameters:
categoryID - id of the category.
Returns:
the ForumCategory object the id.
Throws:
ForumCategoryNotFoundException

getForumThread

ForumThread getForumThread(long threadID)
                           throws ForumThreadNotFoundException
Returns a ForumThread by its id.

Parameters:
threadID - id of the thread.
Returns:
the ForumThread object by the id.
Throws:
ForumThreadNotFoundException

getForumMessage

ForumMessage getForumMessage(long messageID)
                             throws ForumMessageNotFoundException
Returns a ForumMessage by its id.

Parameters:
messageID - id of the message.
Returns:
the ForumMessage object by the id.
Throws:
ForumMessageNotFoundException

createThread

ForumThread createThread(java.lang.String subject,
                         java.lang.String body,
                         long forumID,
                         long userID)
                         throws UserNotFoundException,
                                ForumNotFoundException,
                                MessageRejectedException
Creates a new thread.

Parameters:
subject - Subject used in creation of the thread.
body - Body used in creation of the thread.
forumID - The forum to create a new thread in.
userID - The user to create this message as. Use a number less than zero for anonymous.
Returns:
The newly created thread.
Throws:
UserNotFoundException
ForumNotFoundException
MessageRejectedException

createMessage

ForumMessage createMessage(java.lang.String subject,
                           java.lang.String body,
                           long threadID,
                           long userID)
                           throws ForumThreadNotFoundException,
                                  UserNotFoundException,
                                  MessageRejectedException
Creates a new message on the given thread.

If userID is a value less than one then the message will be created for an anonymous user.

Parameters:
subject - Subject used in creation of the thread.
body - Body used in creation of the thread.
threadID - Thread to create the message too.
userID - The user to create this message as. Use a number less than zero for anonymous.
Returns:
The newly created message.
Throws:
ForumThreadNotFoundException
UserNotFoundException
MessageRejectedException

createReplyMessage

ForumMessage createReplyMessage(java.lang.String subject,
                                java.lang.String body,
                                long messageID,
                                long userID)
                                throws ForumMessageNotFoundException,
                                       MessageRejectedException,
                                       UserNotFoundException
Creates a new message that is a direct response to a given message.

If userID is a value less than one then the message will be created for an anonymous user.

Parameters:
subject - Subject used in creation of the thread.
body - Body used in creation of the thread.
messageID - The id of the message to respond too.
userID - The user to create this message as. Use a number less than zero for anonymous.
Returns:
The newly created message.
Throws:
ForumMessageNotFoundException
MessageRejectedException
UserNotFoundException

messageSearch

long[] messageSearch(Query query,
                     int startIndex,
                     int numResults)
                     throws UserNotFoundException
Provides the ability to create complex search queries with the ability to change sorting, filtering, etc.

Parameters:
query - The query objects.
startIndex - Starting point of results to grab.
numResults - Ending point of results to grab.
Returns:
An array of message IDs.
Throws:
UserNotFoundException

messageSearchForObjects

ForumMessage[] messageSearchForObjects(Query query,
                                       int startIndex,
                                       int numResults)
                                       throws ForumNotFoundException,
                                              ForumMessageNotFoundException,
                                              UserNotFoundException
Provides the ability to create complex search queries with the ability to change sorting, filtering, etc.

Parameters:
query - The query objects.
startIndex - Starting point of results to grab.
numResults - Ending point of results to grab.
Returns:
An array of ForumMessages.
Throws:
ForumNotFoundException
ForumMessageNotFoundException
UserNotFoundException

quickMessageSearch

long[] quickMessageSearch(java.lang.String query,
                          int startIndex,
                          int numResults)
Provides the ability to do quick search queries based on the provided string.

Parameters:
query - The query string.
startIndex - Starting point of results to grab.
numResults - Ending point of results to grab.
Returns:
An array of message IDs.

quickMessageSearchForObjects

ForumMessage[] quickMessageSearchForObjects(java.lang.String query,
                                            int startIndex,
                                            int numResults)
                                            throws ForumMessageNotFoundException
Provides the ability to do quick search queries based on the provided string.

Parameters:
query - The query string.
startIndex - Starting point of results to grab.
numResults - Ending point of results to grab.
Returns:
An array of ForumMessages.
Throws:
ForumMessageNotFoundException

countMessageSearchResults

int countMessageSearchResults(Query query)
                              throws UserNotFoundException
Returns the number of possible results for the specified query.

Parameters:
query - The query to find the number of results for.
Returns:
The number of search results.
Throws:
UserNotFoundException

countQuickMessageSearchResults

int countQuickMessageSearchResults(java.lang.String query)
Returns the number of possible results for the specified query.

Parameters:
query - The query to find the number of results for.
Returns:
The number of search results.

messageSearchByCategories

long[] messageSearchByCategories(long categoryID,
                                 Query query,
                                 int startIndex,
                                 int numResults)
                                 throws ForumCategoryNotFoundException,
                                        UserNotFoundException
Provides the ability to create complex search queries with the ability to change sorting, filtering, etc. all by category.

Parameters:
categoryID - The id of the category
query - The query objects.
startIndex - Starting point of results to grab.
numResults - Ending point of results to grab.
Returns:
An array of message IDs.
Throws:
ForumCategoryNotFoundException - Thrown if the category does not exist
UserNotFoundException

messageSearchByCategoriesForObjects

ForumMessage[] messageSearchByCategoriesForObjects(long categoryID,
                                                   Query query,
                                                   int startIndex,
                                                   int numResults)
                                                   throws ForumNotFoundException,
                                                          ForumMessageNotFoundException,
                                                          ForumCategoryNotFoundException,
                                                          UserNotFoundException
Provides the ability to create complex search queries with the ability to change sorting, filtering, etc. all by category. Messages are indexed with a date resolution of one day. Any hour, minute, or second information in beforeDate and afterDate is ignored. Also, beforeDate and afterDate are inclusive. For example, if you only want the messages created on a particular day, you would set both beforeDate and afterDate to that day.

Parameters:
categoryID - The id of the category
query - The query objects.
startIndex - Starting point of results to grab.
numResults - Ending point of results to grab.
Returns:
An array of ForumMessages.
Throws:
ForumCategoryNotFoundException - Thrown if the category does not exist
ForumNotFoundException
ForumMessageNotFoundException
UserNotFoundException

countMessageSearchResultsByCategoryID

int countMessageSearchResultsByCategoryID(long categoryID,
                                          Query query)
                                          throws ForumCategoryNotFoundException,
                                                 UserNotFoundException
Returns the number of possible results for the specified query by category.

Parameters:
categoryID - The id of the category.
query - The query to find the number of results for.
Returns:
The number of search results.
Throws:
ForumCategoryNotFoundException
UserNotFoundException

quickMessageSearchByCategoryID

long[] quickMessageSearchByCategoryID(long categoryID,
                                      java.lang.String query,
                                      int startIndex,
                                      int numResults)
                                      throws ForumCategoryNotFoundException
Provides the ability to do quick search queries based on the provided string.

Parameters:
categoryID - The id of the category.
query - The query string.
startIndex - Starting point of results to grab.
numResults - Ending point of results to grab.
Returns:
An array of message IDs.
Throws:
ForumCategoryNotFoundException

quickMessageSearchByCategoryIDForObjects

ForumMessage[] quickMessageSearchByCategoryIDForObjects(long categoryID,
                                                        java.lang.String query,
                                                        int startIndex,
                                                        int numResults)
                                                        throws ForumCategoryNotFoundException,
                                                               ForumMessageNotFoundException
Provides the ability to do quick search queries based on the provided string.

Parameters:
categoryID - The id of the category.
query - The query string.
startIndex - Starting point of results to grab.
numResults - Ending point of results to grab.
Returns:
An array of ForumMessages.
Throws:
ForumCategoryNotFoundException
ForumMessageNotFoundException

countQuickMessageSearchResultsByCategoryID

int countQuickMessageSearchResultsByCategoryID(long categoryID,
                                               java.lang.String query)
                                               throws ForumCategoryNotFoundException
Returns the number of possible results for the specified query.

Parameters:
categoryID - The id of the category.
query - The query to find the number of results for.
Returns:
The number of search results.
Throws:
ForumCategoryNotFoundException

getMessageCountByUserID

int getMessageCountByUserID(long userID)
                            throws UserNotFoundException
Returns the number of messages for created by the given userID.

Parameters:
userID - The id of the user.
Returns:
the number of messages created by the given userID.
Throws:
UserNotFoundException

getMessagesByUserID

ForumMessage[] getMessagesByUserID(long userID)
                                   throws UserNotFoundException
Returns all the messages created by the given userID.

Parameters:
userID - The id of the user.
Returns:
An array of ForumMessages created by the userID.
Throws:
UserNotFoundException

messageSearchByForum

long[] messageSearchByForum(long forumID,
                            Query query,
                            int startIndex,
                            int numResults)
                            throws ForumNotFoundException,
                                   UserNotFoundException
Provides the ability to perform a search query for messages within a forum.

Parameters:
forumID - The id of the forum.
query - The query object.
startIndex - Starting point of results to return.
numResults - Ending point of results to return.
Returns:
An array of message IDs.
Throws:
ForumNotFoundException - Thrown if the forum does not exist
UserNotFoundException

messageSearchByForumForObjects

ForumMessage[] messageSearchByForumForObjects(long forumID,
                                              Query query,
                                              int startIndex,
                                              int numResults)
                                              throws ForumNotFoundException,
                                                     ForumMessageNotFoundException,
                                                     UserNotFoundException
Provides the ability to perform a search query for messages within a forum.

Parameters:
forumID - The id of the forum.
query - The query object.
startIndex - Starting point of results to return.
numResults - Ending point of results to return.
Returns:
An array of ForumMessages.
Throws:
ForumNotFoundException - Thrown if the forum does not exist
ForumMessageNotFoundException
UserNotFoundException

countMessageSearchResultsByForumID

int countMessageSearchResultsByForumID(long forumID,
                                       Query query)
                                       throws ForumNotFoundException,
                                              UserNotFoundException
Returns the number of results for the specified query for a forum.

Parameters:
forumID - The id of the forum.
query - The query object.
Returns:
The number of search results.
Throws:
ForumNotFoundException - Thrown if the forum does not exist
UserNotFoundException

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.