|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
IDiscussionMessage represents a collaboration
discussion message object. This interface handles message
modification and reply message creation.
createDiscussionReplyMessage
method on the topic message. To create a reply to a reply message,
call createDiscussionReplyMessage method on the parent reply
message, which is also an IDiscussionMessage.
This will create a tree-like structure of the messages
with various levels of reply.
Note that all discussion message modifications will not be stored
permanently until store method is called.
| Method Summary | |
IDiscussionMessage |
createDiscussionReplyMessage(java.lang.String subject,
java.lang.String body)
Returns a discussion message that represents a reply. |
java.lang.String |
getBody()
Returns the full message body. |
IDiscussion |
getContainingDiscussion()
Returns the discussion that this message belongs to. |
IProject |
getContainingProject()
Returns the project that this object belongs to. |
java.util.Date |
getCreatedDate()
Returns the creation date. |
java.lang.String |
getDescription()
Returns the description. |
java.lang.String |
getDetailsURL()
Returns the URL at which the discussion message details can be viewed. |
int |
getID()
Returns the message ID. |
java.util.Date |
getLastModifiedDate()
Returns the last modified date; the last modified date will also get updated whenever a new reply message is created. |
int |
getOwnerUserID()
Returns the user ID of the owner of this object. |
java.lang.String |
getSubject()
Returns the subject of the message. |
boolean |
hasCreatedDate()
Returns true if created date is available, else false. |
boolean |
hasLastModifiedDate()
Returns true if last modified date is available, else false. |
boolean |
isApproved()
Returns if the message has been approved to display. |
void |
setApproved(boolean isApproved)
Sets the approval of a message. |
void |
setBody(java.lang.String body)
Sets the full message body. |
void |
setDescription(java.lang.String description)
Sets the description. |
void |
setSubject(java.lang.String subject)
Sets the subject of the message. |
void |
store()
Stores the discussion message. |
| Method Detail |
public IDiscussionMessage createDiscussionReplyMessage(java.lang.String subject,
java.lang.String body)
throws CollaborationException,
java.rmi.RemoteException
store
method is required afterwards. Notice this is different
from IDiscussion.createDiscussionMessage,
where store needs to be call to persist the object.
A reply can be created for both an approved and 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.setDescription("Optional description for reply message");
reply.setApproved(true);
//make sure store() is called or the changes will not be persisted.
reply.store();
subject - subject of the reply; cannot be null.body - body of the reply; cannot be null.
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.
CollaborationException - if the method call resulted in an error.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.public java.lang.String getBody()
java.lang.IllegalStateException - if the object has already been removed.
public IDiscussion getContainingDiscussion()
throws CollaborationException,
java.rmi.RemoteException
CollaborationException - if the
method call resulted in an error.
java.lang.IllegalStateException - if the object already been removed.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
public IProject getContainingProject()
throws CollaborationException,
java.rmi.RemoteException
CollaborationException - if the
method call resulted in an error.
java.lang.IllegalStateException - if the object already been removed.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.public java.util.Date getCreatedDate()
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public java.lang.String getDescription()
java.lang.IllegalStateException - if the object already been removed.public java.lang.String getDetailsURL()
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public int getID()
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public java.util.Date getLastModifiedDate()
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public int getOwnerUserID()
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public java.lang.String getSubject()
java.lang.IllegalStateException - if the object has already been removed.public boolean hasCreatedDate()
true if created date is available, else false.
true if created date is available, else false.
java.lang.IllegalStateException - if the object has already
been removed.public boolean hasLastModifiedDate()
true if last modified date is available, else false.
true if last modified date is available, else false.
java.lang.IllegalStateException - if the object has already
been removed.public boolean isApproved()
true if the message is approved, otherwise false.
java.lang.IllegalStateException - if the object has already been removed.public void setApproved(boolean isApproved)
isApproved - true if the message is approved, otherwise
false. Default value is true.
java.lang.IllegalStateException - if the object has already been removed.public void setBody(java.lang.String body)
body - the full message body; cannot be null.
java.lang.IllegalStateException - if the object has already been removed.public void setDescription(java.lang.String description)
description - the message description; not the message body
java.lang.IllegalStateException - if the object already been removed.public void setSubject(java.lang.String subject)
subject - the message subject.
java.lang.IllegalStateException - if the object has already been removed.
public void store()
throws CollaborationException,
java.rmi.RemoteException
CollaborationException - if the method call resulted in an error.
java.lang.IllegalStateException - if the object has already been removed.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.