|
Oracle Collaboration Suite Discussions Web Services Java API Reference 10g (10.1.2.2) Part No. B28210-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Webservice interface representing the operations related to Oracle Discussions Message.
Messages are either new posts into a board (and therefore topics) or replies to other messages. Messages may contain attachments. In general, the first message of a thread is also referred to as the thread itself, while all its replies are just simply referred as messages.
The interface provides operations for
It also provides bulk operations to hide/show multiple messages in one invocation.
Axis specific Sample code illustrating the invocation/usage of MessageService.Relevant changes are to be done, if a non-axis web services client is used.
//Initialize the webservice locator.The locator contains information about webservices endpoint. MessageServiceServiceLocator mdssl = new MessageServiceServiceLocator(); //Retrieve a reference to the remote webservices interface. MessageService mdsl = mdssl.getMessageService(); //Notify the axis server that client is interested in maintaining session. ((MessageServiceSoapBindingStub)mdsl).setMaintainSession(true); //Set the cookie, retrieved during login service invocation. ((javax.xml.rpc.Stub)mdsl)._setProperty(HTTPConstants.HEADER_COOKIE,cookie); //Prepare the input parameters MessageDefinition cDefn = new MessageDefinition(); cDefn.setSubject("First category"); cDefn.setBody("First Category"); //Invoke the webservices method. ForumMessage message = mdsl.reply(1045,1000,1000,cDefn);//forumid, topic id, msg id, msgDefn if(message != null) { //Process the message bean, representing reply created. ........ }
Method Summary | |
Topic |
clipMessage(long lForumId, int iTopicId, int iMsgId) Promotes the message and all its replies into a new topic in the forum. |
ForumMessage |
createMessageFromByte(long lForumId, int iTopicId, int iMsgId, byte[] bytes) Replies to the message specified by iMsgId. |
Topic |
deleteMessage(long lForumId, int iTopicId, int iMsgId) The message and all its replies are physically removed from the system. |
ForumMessage |
editMessage(long lForumId, int iTopicId, int iMsgId, java.lang.String subject, java.lang.String content) Edits the message subject and content with those supplied. |
ForumMessage |
editMessageWithByte(long lForumId, int iTopicId, int iMsgId, byte[] bytes) Edits the topic with the byte array supplied. |
ForumMessage |
getMessage(long lForumId, int iTopicId, int iMsgId) Returns a forum message bean representing the Discussions message, depicted by iMsgId. |
byte[] |
getMessageInByte(long lForumId, int iTopicId, int iMsgId) Returns a MIME compatible byte array representing the message retrieved. |
ForumMessage |
hideMessage(long lForumId, int iTopicId, int iMsgId) Marks the message specified by iMsgId, for deletion. |
MessagesBulkResponse[] |
hideMessages(long lForumId, int iTopicId, int[] iMsgIds) Marks the messages specified by iMsgIds, for deletion. |
ForumMessage |
reply(long lForumId, int iTopicId, int iMsgId, MessageDefinition mDefn) Replies to the message specified by iMsgId. |
ForumMessage |
showMessage(long lForumId, int iTopicId, int iMsgId) A previously deleted single message is cleared from its deleted flag. |
MessagesBulkResponse[] |
showMessages(long lForumId, int iTopicId, int[] iMsgIds) Messages depicted by supplied iMsgIds are cleared from thrir deleted flags. |
Method Detail |
public Topic deleteMessage(long lForumId, int iTopicId, int iMsgId) throws TdWSException
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message to be deleted.TdWSException
- - Thrown on
public Topic clipMessage(long lForumId, int iTopicId, int iMsgId) throws TdWSException
Forum moderators may promote a message in the topic to a new topic whose topic is the message subject. This functionality is useful in controlling sub-threads within a thread as well as the overall length of a thread. Furthermore, BoardModerators may wish to promote a message into a new topic when the replies to a thread are determined to be unrelated to the original topic. There will be a visual indication that the newly created topic is the result of a Promotion operation.
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message to be clipped.TdWSException
- - Thrown on
public ForumMessage hideMessage(long lForumId, int iTopicId, int iMsgId) throws TdWSException
When a message is deleted, Oracle Threaded Discussions will mark the message as deleted. In its depiction, the deleted message will have a visual indication that it has been deleted as well as who deleted it and when.
If the deleted message had any replies, those replies will not be marked as deleted.
Users with role forum moderator and higher,can see the body of the message. For others, For others, the message body will not be visible, instead a text "Message Hidden" will be visible.
Only users, with role forum moderator or higher can post to a hidden message.
The Board Delete Policy controls who can perform which of the above operations. The default delete policy for a Threaded Discussions installation is defined as part of the Global Settings. Board Moderators can override the default policy as part of the Board settings.
There are three possible policies:
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message to be hidden.TdWSException
- - Thrown on
public ForumMessage showMessage(long lForumId, int iTopicId, int iMsgId) throws TdWSException
Once the message is un-hidden, users can post to it normally and the message body is made visible. The Board Delete Policy controls who can perform which of the above operations. The default delete policy for a Threaded Discussions installation is defined as part of the Global Settings. Board Moderators can override the default policy as part of the Board settings.
There are three possible policies:
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message to be un-hidden.TdWSException
- - Thrown on
public ForumMessage getMessage(long lForumId, int iTopicId, int iMsgId) throws TdWSException
lorumId, iTopicId should represent the parent forum and parent topic of the message respectively.
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message to be retrieved.TdWSException
- - Thrown on
public ForumMessage reply(long lForumId, int iTopicId, int iMsgId, MessageDefinition mDefn) throws TdWSException
The reply posted will be a child message of the message specified. Only users with forum writer or higher role can post a reply, unless the forum is public, with anonymous posting setting enabled.
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message to be retrieved.mDefn
- - Bean representing the message properties.TdWSException
- - Thrown on
public byte[] getMessageInByte(long lForumId, int iTopicId, int iMsgId) throws TdWSException
iTopicId
- - Id representing the parent topic of the message, being returned.iMsgId
- - Id representing the message, being retrieved.TdWSException
- - Thrown on
public ForumMessage createMessageFromByte(long lForumId, int iTopicId, int iMsgId, byte[] bytes) throws TdWSException
The reply posted will be a child message of the message specified.
The byte[] array should be MIME compatible. Useful in creating messages with attachments. The entire message, along with all the headers and attachments is converted into a byte array. The same byte array can be used in creating message.
Only users with forum writer or higher role can post a reply, unless the forum is public, with anonymous posting setting enabled.
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message to be retrieved.TdWSException
- - Thrown on
public ForumMessage editMessageWithByte(long lForumId, int iTopicId, int iMsgId, byte[] bytes) throws TdWSException
The byte array should be MIME compatible.
The entire message is replaced with the content of the byte array.A new mime message object is constructed and it overwrites the entire old message.
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message being edited.TdWSException
- - Thrown on
editMessage
public ForumMessage editMessage(long lForumId, int iTopicId, int iMsgId, java.lang.String subject, java.lang.String content) throws TdWSException
A message should have either a subject or a body. The topic posted will be of text/plain content type.
lForumId,iTopicId should represent the parent forum and topic of the message respectively. The old values of the message subject and content will be overwritten with the values supplied.
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.iMsgId
- - Id representing the message, to be edited.subject
- - Subject to be applied to the message.TdWSException
- - Thrown on
public MessagesBulkResponse[] showMessages(long lForumId, int iTopicId, int[] iMsgIds) throws TdWSException
Once a message is un-hidden, users can post to it normally and the message body is made visible. The Board Delete Policy controls who can perform which of the above operations. The default delete policy for a Threaded Discussions installation is defined as part of the Global Settings. Board Moderators can override the default policy as part of the Board settings.
There are three possible policies:
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.TdWSException
- - Thrown on
public MessagesBulkResponse[] hideMessages(long lForumId, int iTopicId, int[] iMsgIds) throws TdWSException
When a message is deleted, Oracle Threaded Discussions will mark the message as deleted. In its depiction, the deleted message will have a visual indication that it has been deleted as well as who deleted it and when.
If the deleted message had any replies, those replies will not be marked as deleted.
Users with role forum moderator and higher,can see the body of the message. For others, For others, the message body will not be visible, instead a text "Message Hidden" will be visible.
Only users, with role forum moderator or higher can post to a hidden message.
The Board Delete Policy controls who can perform which of the above operations. The default delete policy for a Threaded Discussions installation is defined as part of the Global Settings. Board Moderators can override the default policy as part of the Board settings.
There are three possible policies:
lForumId
- - Id representing the parent forum of the message.iTopicId
- - Id representing the parent topic of the message.TdWSException
- - Thrown on
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |