Oracle® WebCenter Interaction Development Kit 10.3.3.0.0

IDiscussionMessage.CreateDiscussionReplyMessage Method 

Returns a discussion message that represents a reply.

IDiscussionMessage CreateDiscussionReplyMessage(
   string subject,
   string body
);

Parameters

subject
{The subject of the reply; cannot be null.
body
The body of the reply; cannot be null.

Return Value

A discussion message that represents a reply. The returned discussion message has already been stored with the supplied subject and body.

Remarks

This method cannot be called before the parent message has been stored. The created reply message will become persistent after this call, and no Store method is required afterwards. Note: This is different from IDiscussion.CreateDiscussionMessage, where Store must be called to persist the object. A reply can be created for either an approved or unapproved message using this method. Below sample code shows how to create a reply message.

//CreateDiscussionReplyMessage() will create a persisted message, so
//Store() does not need to be called to persist the reply message properties unless additional properties are set.
IDiscussionMessage reply = parentMessage.CreateDiscussionReplyMessage("Sample Reply Subject" , " Sample Reply Body");

//set additional properties
reply.Description = "Optional description for reply message.";
reply.Approved = true;

//make sure Store() is called or the changes will not be persisted.
reply.Store();

Exceptions

Exception Type Condition
InvalidOperationException The object has not yet been stored or has already been removed.
CollaborationException The method call resulted in an error.
SoapException There was a communication problem during the execution of the remote method call.

See Also

IDiscussionMessage Interface | Plumtree.Remote.PRC.Collaboration.Discussion Namespace