|
Oracle© Collaboration Suite Workspaces Web Services API Reference 10g Release 1 (10.1.2.2) Part No. B28209-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
DiscussionService provides methods to operate on threaded discussions component in a workspace.
Broadly, the operations are of the following types :
Board operations: Board is the counterpart of Threaded Discussion Board * in the context of a workspace. Major operations that can be performed are creation of board(s), update of board, deletion and retrieval of boards.
The Axis specific code snippet given below illustrates how a board can be created.// Invoke an instance of discussion service locator and get a handle to discussion service. DiscussionServiceServiceLocator dssl = new DiscussionServiceServiceLocator(); DiscussionService discussionService = dssl.getDiscussionService(); // Create a board definition object and set its attributes. BoardDefinition boardDef = new BoardDefinition(); boardDef.setDescription("Board1 desc"); boardDef.setName("Board1 name"); boardDef.setDisplayName("Board1 name"); boardDef.setBoardEditDeletePolicy("NONE"); boardDef.setEmailInboundPolicy("NONE"); String[] attrib = {"EDIT_DELETE_POLICY","INBOUND_POLICY"}; // Invoke method to create board within workspace. BoardItem boardItem = discussionService.createBoard(wspscId,boardDef,attrib)
Thread operations: Threads represent an aggregation of related messages. A thread is created when a new message is posted to a board and which is not a reply to an existing message. Major operations that can be performed are retrieval of messages, deletion, addition/removal of messages to the user's favorites, retrieval of popular threads.
Message operations: Message is the workspace-specific representation of a discussions message. It represents a message that has already been posted to a board. Major operations that can be performed are posting of message(s), retrieval of messages, retrieval of recent messages and deletion.
Method Summary | |
BulkResponseItem[] |
addThreadsToFavorites(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] threadIds) Add a list of thread to the user's favorites. |
void |
addThreadToFavorites(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId) Add a thread to the user's favorites. |
BoardItem |
createBoard(java.lang.String wspcId, BoardDefinition boardDef, java.lang.String[] attributes) Create a new board within the workspace with properties specified by the board definition provided. |
BoardBulkResponseItem[] |
createBoards(java.lang.String wspcId, BoardDefinition[] boardDefs, java.lang.String[] attributes) Create new boards within the workspace with properties specified by the board definitions provided. |
MessageItem |
createMessage(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, MessageDefinition messageDef, java.lang.String[] attributes) Post a message represented by the specified message definition to a board. |
MessageBulkResponseItem[] |
createMessages(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, MessageDefinition[] messageDefs, java.lang.String[] attributes) Post messages represented by the specified message definitions to a board. |
void |
deleteAllBoardsInWorkspace(java.lang.String wspcId) Given the workspace ID, delete all the boards in it. |
void |
deleteAllThreadsInBoard(java.lang.String wspcId, java.lang.String boardId) Delete the threads specified in given workspace in given board. |
void |
deleteBoards(java.lang.String wspcId, java.lang.String[] boardIds) Given the IDs of some boards in the workspace, delete the boards. |
void |
deleteMessages(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String[] messageIds) Delete the CwMessages referenced by the specified IDs from a thread. |
void |
deleteThreads(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] threadIds) Delete the threads specified by the given IDs. |
BoardItem |
getBoardByName(java.lang.String wspcId, java.lang.String boardName, java.lang.String[] attributes) Given a board's name (not display name), return the Board Item |
BoardItem |
getBoardByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] attributes) Get the Board by specifying its ID. |
BoardItem[] |
getBoardsByUids(java.lang.String wspcId, java.lang.String[] boardIds, java.lang.String[] attributes) Get the Boards by specifying their IDs. |
java.lang.String |
getBoardUidByName(java.lang.String wspcId, java.lang.String boardName) Get board ID by name. |
ThreadItem[] |
getFavoriteThreads(java.lang.String wspcId, java.lang.String boardId) Get the favorite threads of a board.. |
byte[] |
getMessageAsByteArray(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String messageUid) Returns the byte array representation of a message. |
MessageItem |
getMessageByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String messageUid, java.lang.String[] attributes) Returns a message in the thread identified by its ID. |
MessageItem[] |
getMessages(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String[] attributes) Returns all messages in the thread. |
MessageItem[] |
getMessagesByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String[] messageIds, java.lang.String[] attributes) Returns messages in the thread |
ThreadItem[] |
getPopularThreads(java.lang.String wspcId, java.lang.String boardId) Get the popular threads of a board. |
MessageItem[] |
getRecentMessages(java.lang.String wspcId, java.lang.String[] attributes) Return a list of Message objects that have recently been posted |
ThreadItem |
getThreadByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId) Given a ID which represents a thread, retrieve and return the corresponding ThreadItem object. |
ThreadItem[] |
getThreads(java.lang.String wspcId, java.lang.String boardId, int iFetchStart, int iFetchMax, boolean bSortByCreationDate, boolean bAscending) Returns the required threads of a board. |
ThreadItem[] |
getThreadsByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] threadIds) Given an array of IDs which represent CwThread objects, returns the array of threads. |
BoardItem[] |
listBoards(java.lang.String wspcId, java.lang.String[] attributes) Get all the boards of the workspace. |
void |
removeThreadFromFavorites(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId) Remove this thread from the user's favorites. |
BulkResponseItem[] |
removeThreadsFromFavorites(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] threadIds) Remove threads from the user's favorites. |
void |
updateDiscussionBoard(java.lang.String wspcId, BoardItem boardItem) Updates a discussion board |
void |
updateMessage(java.lang.String wspcId, MessageItem msgItem) Updates the message. |
Method Detail |
public MessageItem createMessage(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, MessageDefinition messageDef, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace where the message should be createdboardId
- - ID of the board where the message should be createdthreadId
- - ID of thread to which the new message is to be posted.messageDef
- - Definition of the new message.attributes
- - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE, CONTENT, SIZE, LEVEL_IN_THREAD, IS_MARKED_DELETED, PRIORITY, HAS_ATTACHMENTS, FLAGS, ATTACHMENT. Note: Value of attributes FLAGS,ATTACHMENT should be obtained from the MessageItem bean.CwWSException
- - If the workspaceId or boardId or threadId is invalid or if the properties of the message definition are invalid.public BoardItem[] listBoards(java.lang.String wspcId, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace.attributes
- - Array representing the properties that the client is interested in retrieving - extra attributes which can be requested for are BEGIN_QUOTE_PREFIX, EDIT_DELETE_POLICY, EMAIL_ADDRESS, INBOUND_POLICY, ORIGINAL_QUOTED, SUBJECT_REPLY_PREFIX, SUBSCRIPTION_FORMAT, FORWARDING_EMAIL_ADDRESSCwWSException
- - If the workspace ID is invalid.public BoardItem createBoard(java.lang.String wspcId, BoardDefinition boardDef, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace the board needs to be created inboardDef
- - Properties of the new boardattributes
- - Array representing the properties that the client is interested in retrieving - extra attributes which can be requested for are BEGIN_QUOTE_PREFIX, EDIT_DELETE_POLICY, EMAIL_ADDRESS, INBOUND_POLICY, ORIGINAL_QUOTED, SUBJECT_REPLY_PREFIX, SUBSCRIPTION_FORMAT, FORWARDING_EMAIL_ADDRESSCwWSException
- - If the workspace ID or the properties of the board definition is null or If a board with the same name as the name specified exists.public void deleteBoards(java.lang.String wspcId, java.lang.String[] boardIds) throws CwWSException
wspcId
- - ID of the workspace the boards belong toboardIds
- - IDs of the boards to be deletedCwWSException
- - If the workspace ID or any of the thread IDs are invalid.public BoardItem getBoardByName(java.lang.String wspcId, java.lang.String boardName, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspaceboardName
- - Name of the board to be retrievedattributes
- - Array representing the properties that the client is interested in retrieving - extra attributes which can be requested for are BEGIN_QUOTE_PREFIX,EDIT_DELETE_POLICY,EMAIL_ADDRESS,INBOUND_POLICY, ORIGINAL_QUOTED,SUBJECT_REPLY_PREFIX,SUBSCRIPTION_FORMAT,FORWARDING_EMAIL_ADDRESSCwWSException
- - If the workspace ID is invalid.public java.lang.String getBoardUidByName(java.lang.String wspcId, java.lang.String boardName) throws CwWSException
wspcId
- - ID of the workspace the boards belong toboardName
- - Name of the board to be gotCwWSException
- - If the workspace ID is invalid.public BoardItem getBoardByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace the board belongs toboardId
- - ID of the board to be retrievedattributes
- - Array representing the properties that the client is interested in retrieving - extra attributes which can be requested for are BEGIN_QUOTE_PREFIX, EDIT_DELETE_POLICY, EMAIL_ADDRESS,I NBOUND_POLICY, ORIGINAL_QUOTED, SUBJECT_REPLY_PREFIX, SUBSCRIPTION_FORMAT, FORWARDING_EMAIL_ADDRESSCwWSException
- - If the workspace ID or board ID is invalid.public ThreadItem[] getFavoriteThreads(java.lang.String wspcId, java.lang.String boardId) throws CwWSException
wspcId
- - ID of the workspace the board belongs toboardId
- - ID of the board from which the favorite threads will be retrievedCwWSException
- - If the workspace ID or board ID is invalid.public ThreadItem[] getPopularThreads(java.lang.String wspcId, java.lang.String boardId) throws CwWSException
wspcId
- - ID of the workspaceboardId
- - ID of the board from which the popular threads will be retrievedCwWSException
- - If the workspace ID or board ID is invalid.public ThreadItem[] getThreadsByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] threadIds) throws CwWSException
wspcId
- - ID of the workspace the threads belong toboardId
- - ID of the board the thread belongs tothreadIds
- - IDs of the threads to be retrievedCwWSException
- - If the workspace ID or board ID is invalid or if any of the thread IDs are null.public void deleteThreads(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] threadIds) throws CwWSException
wspcId
- - ID of the workspace the thread belongs toboardId
- - ID of the board the thread belongs tothreadIds
- - IDs of the threads to be deletedCwWSException
- - If the workspace ID or board ID or any of the threadIds are invalid.public ThreadItem getThreadByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId) throws CwWSException
wspcId
- - ID of the workspace the thread belongs toboardId
- - ID of the board the thread belongs tothreadId
- - ID of the thread to be retrievedCwWSException
- - If the workspace ID, board ID, or thread ID is invalid.public ThreadItem[] getThreads(java.lang.String wspcId, java.lang.String boardId, int iFetchStart, int iFetchMax, boolean bSortByCreationDate, boolean bAscending) throws CwWSException
wspcId
- - ID of the workspace the threads belong toboardId
- - ID of the board the threads belong toiFetchStart
- - Index of the first thread to return (zero-based indexing).iFetchMax
- - Maximum number of threads to be retrievedbSortByCreationDate
- - If true, will sort threads by creation date rather than by last posting date.bAscending
- - If true, will sort in ascending rather than descending order.CwWSException
- - If the workspace ID or board ID is invalid or iFetchMax exceeds 500.public void updateDiscussionBoard(java.lang.String wspcId, BoardItem boardItem) throws CwWSException
wspcId
- - ID of the workspace the board belongs toboardItem
- - board that needs to be updatedCwWSException
- - If the workspace ID is invalid or any of the properties of the board Item are invalid.public void addThreadToFavorites(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId) throws CwWSException
wspcId
- - ID of the workspace the thread belongs toboardId
- - ID of the board the thread belongs tothreadId
- - The thread that needs to be added to favoritesCwWSException
- - If the workspace ID, board ID, or thread ID is invalid.public void deleteMessages(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String[] messageIds) throws CwWSException
wspcId
- - ID of the workspace the messages belong toboardId
- - ID of the board the messages belong tothreadId
- - ID of the thread the messages belong tomessageIds
- - IDs of the messages to be deletedCwWSException
- - If the workspace ID, board ID, or thread ID is invalid or any of the message IDs are invalid.public void updateMessage(java.lang.String wspcId, MessageItem msgItem) throws CwWSException
wspcId
- - ID of the workspace to which the message belongs.msgItem
- - MessageItem bean representing the properties of the new message.CwWSException
- - If the workspace ID, board ID, or thread ID is invalid.public MessageItem getMessageByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String messageUid, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace the message belongs toboardId
- - ID of the board the message belongs tothreadId
- - ID of the thread the message belongs tomessageUid
- - The ID of the message to be retrievedattributes
- - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE, CONTENT, SIZE, LEVEL_IN_THREAD, IS_MARKED_DELETED, PRIORITY, HAS_ATTACHMENTS, FLAGS, ATTACHMENT. Note: Value of attributes FLAGS and ATTACHMENT should be obtained from the MessageItem bean.CwWSException
- - If the workspace ID, board ID, thread ID, or message ID is invalid.public byte[] getMessageAsByteArray(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String messageUid) throws CwWSException
wspcId
- - ID of the workspace the message belongs toboardId
- - ID of the board the message belongs tothreadId
- - Id of the thread the message belongs tomessageUid
- - The ID of the message to be retrievedCwWSException
- - If the workspace ID, board ID, thread ID, or message ID is invalid. Note: The byte array is constructed out of the RFC 822 format stream representing the message.public MessageItem[] getMessages(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace the messages belong toboardId
- - ID of the board the messages belong tothreadId
- - ID of the thread the messages belong to.attributes
- - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE, CONTENT, SIZE, LEVEL_IN_THREAD, IS_MARKED_DELETED, PRIORITY, HAS_ATTACHMENTS, FLAGS, ATTACHMENT. Note: Value of attributes FLAGS and ATTACHMENT should be obtained from the MessageItem bean.CwWSException
- - If the workspace ID, board ID, or thread ID is invalid.public void removeThreadFromFavorites(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId) throws CwWSException
wspcId
- - ID of the workspace the thread belongs toboardId
- - ID of the board the thread belongs tothreadId
- - ID of the thread that needs to be removedCwWSException
- - If the workspace ID, board ID, or thread ID is invalid.public MessageItem[] getRecentMessages(java.lang.String wspcId, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace.attributes
- - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE, CONTENT, SIZE, LEVEL_IN_THREAD, IS_MARKED_DELETED, PRIORITY, HAS_ATTACHMENTS, FLAGS, ATTACHMENT. Note: Attributes FLAGS and ATTACHMENT should be obtained from the MessageItem bean.CwWSException
- - If the workspace ID is invalid.public BoardBulkResponseItem[] createBoards(java.lang.String wspcId, BoardDefinition[] boardDefs, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace the board needs to be created inboardDefs
- - Properties of the new boardattributes
- - Array representing the properties that the client is interested in retrieving - extra attributes which can be requested for are BEGIN_QUOTE_PREFIX, EDIT_DELETE_POLICY, EMAIL_ADDRESS, INBOUND_POLICY, ORIGINAL_QUOTED, SUBJECT_REPLY_PREFIX, SUBSCRIPTION_FORMAT, FORWARDING_EMAIL_ADDRESSCwWSException
- - If the workspace ID is invalid or if any of the board Definitions are null.public MessageBulkResponseItem[] createMessages(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, MessageDefinition[] messageDefs, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace where the messages should be createdboardId
- - ID of the board where the messages should be createdthreadId
- - ID of the thread in which the messages should be created.messageDefs
- - Definitions of the new messages.attributes
- - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE, CONTENT, SIZE, LEVEL_IN_THREAD, IS_MARKED_DELETED, PRIORITY, HAS_ATTACHMENTS, FLAGS, ATTACHMENT. Note: Value of attributes FLAGS and ATTACHMENT should be obtained from the MessageItem bean inside MessageBulkResponseItem.CwWSException
- - If the workspace ID, board ID, or thread ID is invalid or if any of the message Definitions are null.public BoardItem[] getBoardsByUids(java.lang.String wspcId, java.lang.String[] boardIds, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace the board belongs toboardIds
- - IDs of the board to be retrievedattributes
- - Array representing the properties that the client is interested in retrieving - extra attributes which can be requested for are BEGIN_QUOTE_PREFIX, EDIT_DELETE_POLICY, EMAIL_ADDRESS, INBOUND_POLICY, ORIGINAL_QUOTED, SUBJECT_REPLY_PREFIX, SUBSCRIPTION_FORMAT, FORWARDING_EMAIL_ADDRESSCwWSException
- - If the workspace ID is invalid or any of the board IDs are null.public void deleteAllBoardsInWorkspace(java.lang.String wspcId) throws CwWSException
wspcId
- - ID of the workspace the boards belong toCwWSException
- - If the workspace iD specified is not validpublic void deleteAllThreadsInBoard(java.lang.String wspcId, java.lang.String boardId) throws CwWSException
wspcId
- - ID of the workspace the threads belongs toboardId
- - ID of the board the threads belongs toCwWSException
- - If the workspace ID or board ID is invalid.public BulkResponseItem[] addThreadsToFavorites(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] threadIds) throws CwWSException
wspcId
- - ID of the workspace the thread belongs toboardId
- - ID of the board the thread belongs tothreadIds
- - IDs of the threads that need to be added to favoritesCwWSException
- - If the workspace ID or board ID is invalid or if any of the thread IDs are null.public BulkResponseItem[] removeThreadsFromFavorites(java.lang.String wspcId, java.lang.String boardId, java.lang.String[] threadIds) throws CwWSException
wspcId
- - ID of the workspace the thread belongs toboardId
- - ID of the board the thread belongs tothreadIds
- - IDs of the threads that needs to be removedCwWSException
- - If the workspace ID or board ID is invalid or if any of the thread IDs are null.public MessageItem[] getMessagesByUid(java.lang.String wspcId, java.lang.String boardId, java.lang.String threadId, java.lang.String[] messageIds, java.lang.String[] attributes) throws CwWSException
wspcId
- - ID of the workspace the message belongs toboardId
- - ID of the board the message belongs tothreadId
- - ID of the thread the message belongs tomessageIds
- - The IDs of the messages to be retrievedattributes
- - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE, CONTENT, SIZE, LEVEL_IN_THREAD, IS_MARKED_DELETED, PRIORITY, HAS_ATTACHMENTS, FLAGS, ATTACHMENT. Note: Value of attributes FLAGS and ATTACHMENT should be obtained from the MessageItem bean.CwWSException
- - If the workspace ID, board ID, or thread ID is invalid or if any of the message IDs are null.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |