***  This API provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.information.metadata
Interface CommentInterface

All Superinterfaces:
All Known Implementing Classes:
Comment,

public interface CommentInterface
extends java.rmi.Remote

A comment


Method Summary
 void addAttachment(String name, String desc, String mimeType, InputStream content)
          Add an attachment to the comment.
 void delete()
          Delete the comment - only available to the owner of the comment group
 String formatComment(String xsl)
          Format the content of the comment with the transformation
 List getAttachments()
          Returns the list of attachments for this comment
 String getAuthor()
          Get the comment author
 String getText()
          Get the comment text
 long getTimestamp()
          Get the comment timestamp
 String getTimestamp(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(String author)
          Sets the author for a comment.
 void setText(String text)
          Sets the text for a comment.
 void setTimeStamp(long timestamp)
          Sets the timestamp for a comment.
 

Method Detail

getText

public String getText()
               throws RemoteException
Get the comment text
Returns:
String The comment text

getTimestamp

public long getTimestamp()
                  throws RemoteException
Get the comment timestamp
Returns:
long The timestamp when the comment was initially created

getTimestamp

public 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

getAuthor

public String getAuthor()
                 throws RemoteException
Get the comment author
Returns:
String The comment author

hasAttachments

public boolean hasAttachments()
                       throws RemoteException
Does the comment have an attachment?
Returns:
boolean True if there are attachments, false otherwise

getAttachments

public List getAttachments()
                    throws RemoteException
Returns the list of attachments for this comment
Returns:
List(of AttachmentInterface) The list of attachments for this comment

addAttachment

public 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 attachment
desc - A description for this attachment
mimeType - A MIME type for this attachment
content - An input stream with the content for this attachment

formatComment

public String formatComment(String xsl)
                     throws RemoteException
Format the content of the comment with the transformation

delete

public void delete()
            throws RemoteException
Delete the comment - only available to the owner of the comment group

setText

public 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.

setAuthor

public 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.

setTimeStamp

public 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.

isPrivate

public boolean isPrivate()
                  throws RemoteException
Returns whether this comment is private or not
Returns:
boolean True if comment is private, false otherwise

***  This API provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:56