|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.information.metadata.Comment
public class Comment
Represents a comment in a discussion thread
Constructor Summary | |
---|---|
Comment()
Creates a new comment. |
|
Comment(UserContextInterface author,
java.lang.String text)
Creates a new comment with the author coming from the user context. |
|
Comment(UserContextInterface author,
java.lang.String text,
boolean secret)
Creates a new private comment with the author coming from the user context. |
Method Summary | |
---|---|
void |
addAttachment(java.lang.String name,
java.lang.String desc,
java.lang.String mimeType,
java.io.InputStream content)
Add an attachment to the comment. |
void |
delete()
Delete the comment - only available to the owner of the comment group |
java.lang.String |
formatComment(java.lang.String xsl)
Format the content of the comment with the transformation |
java.util.List |
getAttachments()
Returns the list of attachments for this comment |
java.lang.String |
getAuthor()
Get the comment author |
java.lang.String |
getText()
Get the comment text |
long |
getTimestamp()
Get the comment timestamp |
java.lang.String |
getTimestamp(java.text.DateFormat dtFormat)
Get the formatted comment timestamp |
boolean |
hasAttachments()
Does the comment have an attachment? |
boolean |
isPrivate()
Returns whether this comment is private or not |
void |
setAuthor(java.lang.String author)
Sets the author for a comment. |
void |
setText(java.lang.String text)
Sets the text for a comment. |
void |
setTimeStamp(long timestamp)
Sets the timestamp for a comment. |
java.lang.String |
toString()
Format a comment for processing as a String. |
Constructor Detail |
---|
public Comment() throws java.rmi.RemoteException
java.rmi.RemoteException
- In the event of remote object failure.public Comment(UserContextInterface author, java.lang.String text) throws java.rmi.RemoteException
author
- The user context under which the comment is authoredtext
- The text of the comment
java.rmi.RemoteException
- in the event of remote object failure.public Comment(UserContextInterface author, java.lang.String text, boolean secret) throws java.rmi.RemoteException
author
- The user context under which the comment is authoredtext
- The text of the commentsecret
- Is this a private comment or not?
java.rmi.RemoteException
- in the event of remote object failure.Method Detail |
---|
public java.lang.String getText() throws java.rmi.RemoteException
CommentInterface
getText
in interface CommentInterface
java.rmi.RemoteException
- In the event of remote object failure.public java.lang.String getTimestamp(java.text.DateFormat dtFormat) throws java.rmi.RemoteException
CommentInterface
getTimestamp
in interface CommentInterface
dtFormat
- A DateFormat with which to format the comment timestamp
java.rmi.RemoteException
- In the event of remote object failure.public long getTimestamp() throws java.rmi.RemoteException
CommentInterface
getTimestamp
in interface CommentInterface
java.rmi.RemoteException
- In the event of remote object failure.public java.lang.String getAuthor() throws java.rmi.RemoteException
CommentInterface
getAuthor
in interface CommentInterface
java.rmi.RemoteException
- In the event of remote object failure.public boolean hasAttachments() throws java.rmi.RemoteException
CommentInterface
hasAttachments
in interface CommentInterface
java.rmi.RemoteException
- In the event of remote object failure.public java.util.List getAttachments() throws java.rmi.RemoteException
CommentInterface
getAttachments
in interface CommentInterface
java.rmi.RemoteException
- In the event of remote object failure.public void addAttachment(java.lang.String name, java.lang.String desc, java.lang.String mimeType, java.io.InputStream content) throws java.rmi.RemoteException
CommentInterface
addAttachment
in interface CommentInterface
name
- A name for this attachmentdesc
- A description for this attachmentmimeType
- A MIME type for this attachmentcontent
- An input stream with the content for this attachment
java.rmi.RemoteException
- In the event of remote object failure.public java.lang.String formatComment(java.lang.String xsl) throws java.rmi.RemoteException
CommentInterface
formatComment
in interface CommentInterface
xsl
- The XSL transformation to use to format the comment.
java.rmi.RemoteException
- In the event of remote object failure.public void delete() throws java.rmi.RemoteException
CommentInterface
delete
in interface CommentInterface
java.rmi.RemoteException
- In the event of remote object failure.public void setTimeStamp(long timestamp) throws java.lang.IllegalStateException, java.rmi.RemoteException
CommentInterface
setTimeStamp
in interface CommentInterface
timestamp
- The timestamp for the comment
java.lang.IllegalStateException
- If the timestamp has already been set once.
java.rmi.RemoteException
- In the event of remote object failure.public void setAuthor(java.lang.String author) throws java.lang.IllegalStateException, java.rmi.RemoteException
CommentInterface
setAuthor
in interface CommentInterface
author
- The author for the comment
java.lang.IllegalStateException
- If the author has already been set once.
java.rmi.RemoteException
- In the event of remote object failure.public void setText(java.lang.String text) throws java.lang.IllegalStateException, java.rmi.RemoteException
CommentInterface
setText
in interface CommentInterface
text
- The text for the comment
java.lang.IllegalStateException
- If the text is already been set once.
java.rmi.RemoteException
- In the event of remote object failure.public boolean isPrivate()
CommentInterface
isPrivate
in interface CommentInterface
public java.lang.String toString()
toString
in class java.lang.Object
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |