|
Clearspace API (1.10.16) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ForumService
Provides the ability to manipulate forum messages. This service will allow you to delete, move and acquire forum messages.
| Method Summary | |
|---|---|
void |
addAttachmentToMessage(long messageID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
Adds an attachment to the message with the specified ID. |
void |
addImageToMessage(long messageID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
Adds an image to the message with the specified ID. |
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 communityID,
long userID)
Creates a new thread. |
void |
deleteMessage(long messageID)
Delete the message with the following id. |
void |
deleteMessageAndChildren(long messageID,
boolean deleteChildren)
Delete the message with the specified id. |
void |
deleteMessageProperty(java.lang.String name,
long messageID)
Delete a property with the given name from the message with the given ID. |
void |
deleteThread(long threadID)
Deletes a thread with the specified ID. |
void |
deleteThreadProperty(java.lang.String name,
long threadID)
Delete a property with the given name from the thread with the given ID. |
Attachment[] |
getAttachmentsByMessageID(long messageID)
Returns an array of attachments that are attached to the specified message. |
ForumMessage |
getChild(long messageID,
int index)
Returns the child of parent at index index in the parent's child array. |
int |
getChildCount(long messageID)
Returns the number of children of parent. |
ForumMessage[] |
getChildren(long messageID)
Returns an array of all the child messages of the parent. |
ForumMessage |
getForumMessage(long messageID)
Returns a ForumMessage by its ID. |
ForumThread |
getForumThread(long threadID)
Returns a ForumThread by its ID. |
Image[] |
getImagesByMessageID(long messageID)
Returns an array of images that are attached to the specified message. |
int |
getIndexOfChild(long parentID,
long messageID)
Returns the index of child in parent. |
int |
getMessageCountByCommunityID(long communityID)
Returns the number of messages that are in the community. |
int |
getMessageCountByCommunityIDAndFilter(long communityID,
ResultFilter filter)
Returns the number of messages that are in the community with the specified id after the specified filter has been applied. |
int |
getMessageCountByThreadID(long threadID)
Returns the number of messages that are in the thread. |
int |
getMessageCountByThreadIDAndFilter(long threadID,
ResultFilter filter)
Returns the number of messages that are in the thread with the specified id after the specified filter has been applied. |
int |
getMessageCountsByCommunityID(long communityID)
Returns the number of messages that are in the community. |
int |
getMessageCountsByCommunityIDAndFilter(long communityID,
ResultFilter filter)
Returns the number of messages that are in the forum with the specified id after the specified filter has been applied. |
int |
getMessageDepth(long messageID)
Returns the depth of a message in the message tree hierarchy. |
long[] |
getMessageIDsByCommunityID(long communityID)
Returns all of the message IDs for all of the message that are in the community. |
long[] |
getMessageIDsByCommunityIDAndFilter(long communityID,
ResultFilter filter)
Returns all of the message IDs for all of the message that are in the community with the specified ID, filtered by the the specified result filter. |
long[] |
getMessageIDsByThreadID(long threadID)
Returns the IDs of the messages that are in the thread. |
long[] |
getMessageIDsByThreadIDAndFilter(long threadID,
ResultFilter filter)
Returns all of the message IDs for all of the message that are in the thread after the specified filter has been applied. |
Property[] |
getMessageProperties(long messageID)
Returns all tbe extended properties for the message with the specified ID. |
java.lang.String |
getMessageProperty(java.lang.String name,
long messageID)
Returns a specific extended property for the message with the specified property name and message ID. |
ForumMessage[] |
getMessagesByCommunityID(long communityID)
Returns all of the messages that are in the community. |
ForumMessage[] |
getMessagesByCommunityIDAndFilter(long communityID,
ResultFilter filter)
Returns all of the messages that are in the community with the specified ID, filtered by the the specified result filter. |
ForumMessage[] |
getMessagesByThreadID(long threadID)
Returns the messages that are in the thread. |
ForumMessage[] |
getMessagesByThreadIDAndFilter(long threadID,
ResultFilter filter)
Returns all of the messages that are in the thread after the specified filter has been applied. |
ForumMessage |
getParent(long messageID)
Returns the parent of the child ForumMessage. |
ForumThread[] |
getPopularThreads()
Returns an array of thread IDs for all the popular threads in the system. |
ForumThread[] |
getPopularThreadsByCommunityID(long communityID)
Return an array of popular threads by community. |
int |
getRecursiveChildCount(long messageID)
Returns the total number of recursive children of a parent. |
ForumMessage[] |
getRecursiveChildren(long messageID)
Returns an array for all child messages (and sub-children, etc) of the parent. |
ForumMessage[] |
getRecursiveMessages(long threadID)
Returns an array for all messages in the thread in depth-first order. |
ForumMessage |
getRootMessage(long threadID)
Returns the root of a thread. |
int |
getThreadCountByCommunityID(long communityID)
Returns the number of threads in the specified community. |
int |
getThreadCountByCommunityIDAndFilter(long communityID,
ResultFilter filter)
Returns the number of threads in the specified community after being filtered by the specified filter. |
Property[] |
getThreadProperties(long threadID)
Returns all tbe extended properties for the thread with the specified ID. |
java.lang.String |
getThreadProperty(java.lang.String name,
long threadID)
Returns a specific extended property for the thread with the specified property name and thread ID. |
ForumThread[] |
getThreadsByCommunityID(long communityID)
Returns all of the IDs for threads a community. |
ForumThread[] |
getThreadsByCommunityIDAndFilter(long communityID,
ResultFilter filter)
Returns all of the IDs for threads a community has filtered by the specified result filter. |
Property[] |
getUnfilteredMessageProperties(long messageID)
Returns the properties without applying filters to them first. |
boolean |
hasParent(long messageID)
Returns true if the child message has a parent message. |
boolean |
isLeaf(long messageID)
Returns true if node is a leaf. |
void |
moveThread(long threadID,
long communityID)
Moves the thread with the specified ID to the community with the specified ID. |
void |
setMessageProperty(java.lang.String name,
java.lang.String value,
long messageID)
Set an extended for the property with the given message id. |
void |
setThreadProperty(java.lang.String name,
java.lang.String value,
long threadID)
Set an extended for the property for the thread with the given ID. |
void |
updateForumMessage(ForumMessage message)
Used to update the subject and body of a ForumMessage |
| Method Detail |
|---|
ForumMessage getForumMessage(long messageID)
throws ForumMessageNotFoundException
ForumMessage by its ID.
messageID - id of the message.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
void deleteMessage(long messageID)
throws ForumMessageNotFoundException
messageID - the id of the message to delete.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
void deleteMessageAndChildren(long messageID,
boolean deleteChildren)
throws ForumMessageNotFoundException
messageID - The ID of the message to delete.deleteChildren - Whether or not to delete the children of this message.
ForumMessageNotFoundException - Thrown if the specified message does not exist.Property[] getMessageProperties(long messageID)
messageID - The ID of the message to retrieve properties for.
java.lang.String getMessageProperty(java.lang.String name,
long messageID)
throws ForumMessageNotFoundException
name - The name of the property.messageID - The ID of the message to retrieve the property for.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
void setMessageProperty(java.lang.String name,
java.lang.String value,
long messageID)
throws ForumMessageNotFoundException
name - The name of the property.value - The value of the property.messageID - The ID of the message to set an extended property for.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
void deleteMessageProperty(java.lang.String name,
long messageID)
throws ForumMessageNotFoundException
name - The name of the property to delete.messageID - The ID of the message to delete the property from.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
Property[] getUnfilteredMessageProperties(long messageID)
throws ForumMessageNotFoundException
messageID - The ID of the message to return unfiltered properties for.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
Attachment[] getAttachmentsByMessageID(long messageID)
throws ForumMessageNotFoundException
messageID - The ID of the message to acquire attachments for.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
void addAttachmentToMessage(long messageID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
throws AttachmentException,
ForumMessageNotFoundException,
java.io.IOException
messageID - The ID of the message.name - The name of the attachment.contentType - the content type of the attachment.source - The content for the attachment.
java.io.IOException - Thrown if there are issues adding the message.
AttachmentException - Thrown if the attachment cannot be created.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
Image[] getImagesByMessageID(long messageID)
throws ForumMessageNotFoundException
messageID - The ID of the message to acquire images for.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
void addImageToMessage(long messageID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
throws com.jivesoftware.community.ImageException,
ForumMessageNotFoundException,
java.io.IOException
messageID - The ID of the message.name - The name of the image.contentType - the content type of the image.source - The content for the image.
java.io.IOException - Thrown if there are issues adding the message.
com.jivesoftware.community.ImageException - Thrown if the image cannot be created.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
long[] getMessageIDsByCommunityIDAndFilter(long communityID,
ResultFilter filter)
throws CommunityNotFoundException
communityID - The id of the community to find messages for.filter - Filter to be apply to the results.
CommunityNotFoundException - Thrown if the specified community does not exist.
long[] getMessageIDsByCommunityID(long communityID)
throws CommunityNotFoundException
WSConstants.MAX_MESSAGE_RESULTS than then message IDs up to
WSConstants.MAX_MESSAGE_RESULTS will be returned.
communityID - The ID of the community to find messages for.
CommunityNotFoundException - Thrown if the specified community does not exist.
int getMessageCountsByCommunityIDAndFilter(long communityID,
ResultFilter filter)
throws com.jivesoftware.community.NotFoundException
communityID - The id of the community.filter - Filter that can be applied to filter out results.
com.jivesoftware.community.NotFoundException - Thrown if the specified community does not exist.
int getMessageCountsByCommunityID(long communityID)
throws com.jivesoftware.community.NotFoundException
communityID - The id of the community
com.jivesoftware.community.NotFoundException - Thrown if the community does not exist.
int getMessageCountByCommunityIDAndFilter(long communityID,
ResultFilter filter)
throws CommunityNotFoundException
communityID - The ID of the community to find the message count for.filter - The filter that can be applied to filter out results.
CommunityNotFoundException - Thrown if the specified community does not exist.
int getMessageCountByCommunityID(long communityID)
throws CommunityNotFoundException
communityID - The ID of the community to find the message count for.
CommunityNotFoundException - Thrown if the specified community does not exist.
long[] getMessageIDsByThreadIDAndFilter(long threadID,
ResultFilter filter)
throws ForumThreadNotFoundException
threadID - The ID of the thread to find messages for.filter - The filter to apply to the results.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
long[] getMessageIDsByThreadID(long threadID)
throws ForumThreadNotFoundException
WSConstants.MAX_MESSAGE_RESULTS than then message IDs up to
WSConstants.MAX_MESSAGE_RESULTS will be returned.
threadID - The ID of the thread to find message IDs for.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
int getMessageCountByThreadIDAndFilter(long threadID,
ResultFilter filter)
throws ForumThreadNotFoundException
threadID - The ID of the thread to find the message count for.filter - The filter that can be applied to filter out results.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
int getMessageCountByThreadID(long threadID)
throws ForumThreadNotFoundException
threadID - The ID of the thread to find the message count for.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
ForumMessage[] getMessagesByCommunityIDAndFilter(long communityID,
ResultFilter filter)
throws CommunityNotFoundException
communityID - The id of the community to find messages for.filter - Filter to be apply to the results.
CommunityNotFoundException - Thrown if the specified community does not exist.
ForumMessage[] getMessagesByCommunityID(long communityID)
throws CommunityNotFoundException
WSConstants.MAX_MESSAGE_RESULTS than then message IDs up to
WSConstants.MAX_MESSAGE_RESULTS will be returned.
communityID - The ID of the community to find messages for.
CommunityNotFoundException - Thrown if the specified community does not exist.
ForumMessage[] getMessagesByThreadIDAndFilter(long threadID,
ResultFilter filter)
throws ForumThreadNotFoundException
threadID - The ID of the thread to find messages for.filter - The filter to apply to the results.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
ForumMessage[] getMessagesByThreadID(long threadID)
throws ForumThreadNotFoundException
WSConstants.MAX_MESSAGE_RESULTS than then message IDs up to
WSConstants.MAX_MESSAGE_RESULTS will be returned.
threadID - The ID of the thread to find message IDs for.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
ForumMessage getRootMessage(long threadID)
throws ForumThreadNotFoundException
threadID - The ID of the thread.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
boolean hasParent(long messageID)
throws ForumMessageNotFoundException
child message has a parent message.
messageID - the message.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
ForumMessage getParent(long messageID)
throws ForumMessageNotFoundException
child ForumMessage.
messageID - The ID of the message to find the parent for.
ForumMessageNotFoundException - if child does not have a parent,
or if the parent message could not be loaded for any other reason.
ForumMessage getChild(long messageID,
int index)
throws ForumMessageNotFoundException
index >= 0, and
index < getChildCount(parent). If the index is not valid,
or if the child could not be loaded for any other reason, a
ForumMessageNotFoundException will be thrown.
messageID - The ID of the parent message.index - the index of the child.
ForumMessageNotFoundException - if the index was invalid or the
child could not be loaded for any other reason.
ForumMessage[] getChildren(long messageID)
throws ForumMessageNotFoundException
getRecursiveChildren(long) method.
messageID - The parent message.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
ForumMessage[] getRecursiveChildren(long messageID)
throws ForumMessageNotFoundException
1 |-- 3 |-- |-- 4 |-- |-- |-- 7 |-- |-- |-- |-- 10 |-- |-- 6 |-- |-- 8 |-- 5Calling getRecursiveChildren(3) on the tree above would return the sequence 4, 7, 10, 6, 8. This method is a powerful way to show all children of a message, especially in combination with the
getMessageDepth(long) method.
messageID - The ID of the parent message.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
boolean isLeaf(long messageID)
throws ForumMessageNotFoundException
messageID - A node in the thread, obtained from this data source.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
int getRecursiveChildCount(long messageID)
throws ForumMessageNotFoundException
messageID - The ID of the message.
parent.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
int getIndexOfChild(long parentID,
long messageID)
throws ForumMessageNotFoundException
4 |-- 2 |-- |-- 1 |-- |-- 6 |-- |-- 8 |-- 5In this example, getIndexOfChild(4, 2) would return 0, getIndexOfChild(4, 5) would return 1, and getIndexOfChild(2, 8) would return 2. getIndexOfChild(4, 8) -- NOT VALID
parentID - The ID of the parent message.messageID - The ID of the child message to get the index for.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
int getMessageDepth(long messageID)
throws ForumMessageNotFoundException
1 |-- 3 |-- |-- 4 |-- |-- |-- 7The depth of message 4 is 2, the depth of message 7 is 3, etc. This method is useful in combination with the
getRecursiveChildren(long)
array to build a UI of hierarchical messages.
messageID - The ID of the message to determine the depth of.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
int getChildCount(long messageID)
throws ForumMessageNotFoundException
messageID - The ID the message.
ForumMessageNotFoundException - Thrown if the specified message does not exist.
ForumMessage[] getRecursiveMessages(long threadID)
throws ForumThreadNotFoundException
1 |-- 3 |-- |-- 4 |-- |-- |-- 7 |-- |-- |-- |-- 10 |-- |-- 6 |-- |-- 8 |-- 5Calling getRecursiveMessages() on the tree above would return the sequence 1, 3, 4, 7, 10, 6, 8, 5. This method is a powerful way to show the full tree of messages, especially in combination with the
getMessageDepth(long)
method.
threadID - The ID of the thread.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
void updateForumMessage(ForumMessage message)
throws ForumMessageNotFoundException
ForumMessage
message - The message to update
ForumMessageNotFoundException - Thrown if the forum message does not exist
ForumThread getForumThread(long threadID)
throws ForumThreadNotFoundException
ForumThread by its ID.
threadID - The ID of the thread.
ForumThreadNotFoundException - Thrown if the specified therad does not exist.ForumThread[] getPopularThreads()
void deleteThread(long threadID)
throws ForumThreadNotFoundException
threadID - The ID of thread to delete.
ForumThreadNotFoundException - Thrown if the specified therad does not exist.
void moveThread(long threadID,
long communityID)
throws ForumThreadNotFoundException,
CommunityNotFoundException
threadID - The ID of the thread to move.communityID - The ID of the community to move the thread to.
ForumThreadNotFoundException - Thrown if the specified therad does not exist.
CommunityNotFoundException - Thrown if the specified community does not exist.
Property[] getThreadProperties(long threadID)
throws ForumThreadNotFoundException
threadID - The ID of the thread to retrieve properties for.
ForumThreadNotFoundException - Thrown if the specified therad does not exist.
java.lang.String getThreadProperty(java.lang.String name,
long threadID)
throws ForumThreadNotFoundException
name - The name of the property.threadID - The ID of the thread to retrieve the property for.
ForumThreadNotFoundException - Thrown if the specified thread does not exist.
void setThreadProperty(java.lang.String name,
java.lang.String value,
long threadID)
throws ForumThreadNotFoundException
name - The name of the property.value - The value of the property.threadID - The ID of the thread to set an extended property for.
ForumThreadNotFoundException - Thrown if the specified therad does not exist.
void deleteThreadProperty(java.lang.String name,
long threadID)
throws ForumThreadNotFoundException
name - The name of the property to delete.threadID - The ID of the thread to delete the property from.
ForumThreadNotFoundException - Thrown if the specified therad does not exist.
ForumThread[] getThreadsByCommunityID(long communityID)
throws CommunityNotFoundException
WSConstants.MAX_THREAD_RESULTS the threads up to
WSConstants.MAX_THREAD_RESULTS will be returned.
communityID - The ID of the community to grab threds for.
CommunityNotFoundException - Thrown if the specified community does not exist.
ForumThread[] getThreadsByCommunityIDAndFilter(long communityID,
ResultFilter filter)
throws CommunityNotFoundException
communityID - The ID of the community to grab threds for.filter - The filter to use against the result.
CommunityNotFoundException - Thrown if the specified community does not exist.
int getThreadCountByCommunityID(long communityID)
throws CommunityNotFoundException
communityID - The ID of the community to check the thread count for.
CommunityNotFoundException - Thrown if the specified community does not exist.
int getThreadCountByCommunityIDAndFilter(long communityID,
ResultFilter filter)
throws CommunityNotFoundException
communityID - The ID of the community to check the thread count for.filter - The filter to filter out results with.
CommunityNotFoundException - Thrown if the specified community does not exist.
ForumThread[] getPopularThreadsByCommunityID(long communityID)
throws CommunityNotFoundException
communityID - The ID of the community to check the thread count for.
CommunityNotFoundException - Thrown if community does not exist.
ForumThread createThread(java.lang.String subject,
java.lang.String body,
long communityID,
long userID)
throws RejectedException,
com.jivesoftware.community.NotFoundException
subject - Subject used in creation of the thread.body - Body used in creation of the thread.communityID - The community to create a new thread in.userID - The user to create this message as. Use a number less than zero for anonymous.
com.jivesoftware.community.NotFoundException - If the Community or the user does not exist.
RejectedException - If the message is not valid.
ForumMessage createMessage(java.lang.String subject,
java.lang.String body,
long threadID,
long userID)
throws RejectedException,
com.jivesoftware.community.NotFoundException
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.
com.jivesoftware.community.NotFoundException - If the community or user does not exist.
RejectedException - Thrown if the message is rejected.
ForumMessage createReplyMessage(java.lang.String subject,
java.lang.String body,
long messageID,
long userID)
throws RejectedException,
com.jivesoftware.community.NotFoundException
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.
RejectedException - Thrown if the message is invalid.
com.jivesoftware.community.NotFoundException - Thrown if the user or the original message does not exist.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||