|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface that represents a Collaboration discussion message object. This interface handles message modification and reply message creation.
A message is the smallest unit in a discussion contains zero or one parent and zero or more children. A child of a message is a reply. To create a reply message to a topic, callcreateDiscussionReplyMessage
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: Discussion message modifications will not be stored
permanently until the 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 IDiscussion object representing the discussion that this message belongs to. |
IProject |
getContainingProject()
Returns an IProject object representing the project that this object belongs to. |
java.util.Date |
getCreatedDate()
Returns the creation date. |
java.lang.String |
getDescription()
Returns the message 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. |
int |
getParentID()
Returns the parent ID, or -1 if there is no parent. |
java.lang.String |
getSubject()
Returns the subject of the message. |
boolean |
hasCreatedDate()
Returns true if the created date is available, else false . |
boolean |
hasLastModifiedDate()
Returns true if the last modified date is available, else false . |
boolean |
isApproved()
Returns whether or not the message has been approved to display. |
void |
setApproved(boolean isApproved)
Sets the approval status of a message. |
void |
setBody(java.lang.String body)
Sets the full message body. |
void |
setDescription(java.lang.String description)
Sets the message 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. 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.setDescription("Optional description for reply message"); reply.setApproved(true); //make sure store() is called or the changes will not be persisted. reply.store();
subject
- {the subject of the reply; cannot be null
body
- the 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 was a communication problem during the execution of the remote method callpublic java.lang.String getBody()
java.lang.IllegalStateException
- if the object has already been removedpublic IDiscussion getContainingDiscussion() throws CollaborationException, java.rmi.RemoteException
IDiscussion
object representing the discussion that this message belongs to.
CollaborationException
- if the
method call resulted in an error
java.lang.IllegalStateException
- if the object has already been removed
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method callpublic IProject getContainingProject() throws CollaborationException, java.rmi.RemoteException
IProject
object representing the project that this object belongs to.
CollaborationException
- if the
method call resulted in an error
java.lang.IllegalStateException
- if the object has already been removed
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method callpublic java.util.Date getCreatedDate()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic java.lang.String getDescription()
java.lang.IllegalStateException
- if the object has already been removedpublic java.lang.String getDetailsURL()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic int getID()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic java.util.Date getLastModifiedDate()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic int getOwnerUserID()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic int getParentID()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic java.lang.String getSubject()
java.lang.IllegalStateException
- if the object has already been removedpublic boolean hasCreatedDate()
true
if the created date is available, else false
.
true
if the created date is available, else false
java.lang.IllegalStateException
- if the object has already
been removedpublic boolean hasLastModifiedDate()
true
if the last modified date is available, else false
.
true
if the last modified date is available, else false
java.lang.IllegalStateException
- if the object has already
been removedpublic boolean isApproved()
true
if the message is approved, otherwise false
java.lang.IllegalStateException
- if the object has already been removedpublic 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 removedpublic void setBody(java.lang.String body)
body
- the full message body; cannot be null
java.lang.IllegalStateException
- if the object has already been removedpublic void setDescription(java.lang.String description)
description
- the message description; not the message body
java.lang.IllegalStateException
- if the object has already been removedpublic void setSubject(java.lang.String subject)
subject
- the message subject
java.lang.IllegalStateException
- if the object has already been removedpublic 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 was 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 ©2010 Oracle® Corporation. All Rights Reserved.