### *** This interface provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.information.metadata

# Interface CommentInterface

All Superinterfaces:
  `Remote`

All Known Implementing Classes:
  `Comment`

@SASScope("ALL") @BinaryCompatibilityOnly public interface CommentInterface extends Remote
A comment

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 Details

  - ### getText

    String getText() throws RemoteException
    Get the comment text
    Returns:
      String The comment text
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### getTimestamp

    long getTimestamp() throws RemoteException
    Get 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 RemoteException
    Get the comment author
    Returns:
      String The comment author
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### hasAttachments

    boolean hasAttachments() throws RemoteException
    Does 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 RemoteException
    Returns 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 attachment
      `desc` - A description for this attachment
      `mimeType` - A MIME type for this attachment
      `content` - 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 RemoteException
    Delete 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 RemoteException
    Returns 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.