*** This interface provides Binary Compatibility only, not Source Compatibility ***
Interface CommentInterface
- All Superinterfaces:
Remote
- All Known Implementing Classes:
Comment
@SASScope("ALL")
@BinaryCompatibilityOnly
public interface CommentInterface
extends Remote
A comment
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachment(String name, String desc, String mimeType, InputStream content) Add an attachment to the comment.voiddelete()Delete the comment - only available to the owner of the comment groupStringformatComment(String xsl) Format the content of the comment with the transformationListReturns the list of attachments for this commentStringGet the comment authorStringgetText()Get the comment textlongGet the comment timestampStringgetTimestamp(DateFormat dtFormat) Get the formatted comment timestampbooleanDoes the comment have an attachment?booleanReturns whether this comment is private or notvoidsetAuthor(String author) Sets the author for a comment.voidsetText(String text) Sets the text for a comment.voidsetTimeStamp(long timestamp) Sets the timestamp for a comment.
-
Method Details
-
getText
String getText() throws RemoteExceptionGet the comment text- Returns:
- String The comment text
- Throws:
RemoteException- In the event of remote object failure.
-
getTimestamp
long getTimestamp() throws RemoteExceptionGet the comment timestamp- Returns:
- long The timestamp when the comment was initially created
- Throws:
RemoteException- In the event of remote object failure.
-
getTimestamp
String getTimestamp(DateFormat dtFormat) throws RemoteException Get the formatted comment timestamp- Parameters:
dtFormat- A DateFormat with which to format the comment timestamp- Returns:
- String The formatted timestamp
- Throws:
RemoteException- In the event of remote object failure.
-
getAuthor
String getAuthor() throws RemoteExceptionGet the comment author- Returns:
- String The comment author
- Throws:
RemoteException- In the event of remote object failure.
-
hasAttachments
boolean hasAttachments() throws RemoteExceptionDoes the comment have an attachment?- Returns:
- boolean True if there are attachments, false otherwise
- Throws:
RemoteException- In the event of remote object failure.
-
getAttachments
List getAttachments() throws RemoteExceptionReturns the list of attachments for this comment- Returns:
- List(of AttachmentInterface) The list of attachments for this comment
- Throws:
RemoteException- In the event of remote object failure.
-
addAttachment
void addAttachment(String name, String desc, String mimeType, InputStream content) throws RemoteException Add an attachment to the comment. Multiple attachments can be made to each comment- Parameters:
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- Throws:
RemoteException- In the event of remote object failure.
-
formatComment
String formatComment(String xsl) throws RemoteException Format the content of the comment with the transformation- Parameters:
xsl- The XSL transformation to use to format the comment.- Returns:
- The formatted comment string.
- Throws:
RemoteException- In the event of remote object failure.
-
delete
void delete() throws RemoteExceptionDelete the comment - only available to the owner of the comment group- Throws:
RemoteException- In the event of remote object failure.
-
setText
void setText(String text) throws IllegalStateException, RemoteException Sets the text for a comment. This method may only be called if the comment text is missing. If it has already set then an illegalStateException is thrown. The preferred method of creating a comment is to use the non-default constructor- Parameters:
text- The text for the comment- Throws:
IllegalStateException- If the text is already been set once.RemoteException- In the event of remote object failure.
-
setAuthor
void setAuthor(String author) throws IllegalStateException, RemoteException Sets the author for a comment. This method may only be called if the author is missing. If it has already set then an illegalStateException is thrown. The preferred method of creating a comment is to use the non-default constructor- Parameters:
author- The author for the comment- Throws:
IllegalStateException- If the author has already been set once.RemoteException- In the event of remote object failure.
-
setTimeStamp
void setTimeStamp(long timestamp) throws IllegalStateException, RemoteException Sets the timestamp for a comment. This method may only be called if the timestamp is missing. If it has already set then an illegalStateException is thrown. The preferred method of creating a comment is to use the non-default constructor- Parameters:
timestamp- The timestamp for the comment- Throws:
IllegalStateException- If the timestamp has already been set once.RemoteException- In the event of remote object failure.
-
isPrivate
boolean isPrivate() throws RemoteExceptionReturns whether this comment is private or not- Returns:
- boolean True if comment is private, false otherwise
- Throws:
RemoteException- In the event of remote object failure.
-