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

Class Attachment

java.lang.Object
com.sas.services.information.metadata.Attachment
All Implemented Interfaces:
AttachmentInterface, Serializable, Remote

@SASScope("ALL") @BinaryCompatibilityOnly public class Attachment extends Object implements AttachmentInterface, Serializable
Represents an attachment for a comment.
Since:
1.1
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Attachment(String name, String description, String mimeType, InputStream content)
    Creates a new attachment, with the name, description, mimetype and content provided in this constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    InputStream
    Gets the source(stream) of the content for this attachment
    String
    Gets the description of this attachment
    String
    Gets the MIME type of this attachment
    String
    Gets the name of this attachment
    void
    setContent(InputStream content)
    Sets the source(stream) for the content of this attachment.
    void
    setDescription(String description)
    Sets the description of this attachment
    void
    setMimeType(String mimeType)
    Sets the mime type of this attachment
    void
    setName(String name)
    Sets the name of this attachment

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Attachment

      public Attachment(String name, String description, String mimeType, InputStream content) throws RemoteException
      Creates a new attachment, with the name, description, mimetype and content provided in this constructor. An internal name will be given to the attachment - the external name will be saved as a property.
      Parameters:
      name - A name for the attachment
      description - A description for the attachment
      mimeType - A MIME type for the attachment
      content - The actual attachment content, provided as an input stream
      Throws:
      RemoteException - in the event of remote object failure.
  • Method Details

    • setName

      public void setName(String name) throws RemoteException
      Description copied from interface: AttachmentInterface
      Sets the name of this attachment
      Specified by:
      setName in interface AttachmentInterface
      Parameters:
      name - The name of this attachment
      Throws:
      RemoteException - in the event of remote object failure.
    • setDescription

      public void setDescription(String description) throws RemoteException
      Description copied from interface: AttachmentInterface
      Sets the description of this attachment
      Specified by:
      setDescription in interface AttachmentInterface
      Parameters:
      description - The name of this attachment
      Throws:
      RemoteException - in the event of remote object failure.
    • setMimeType

      public void setMimeType(String mimeType) throws RemoteException
      Description copied from interface: AttachmentInterface
      Sets the mime type of this attachment
      Specified by:
      setMimeType in interface AttachmentInterface
      Parameters:
      mimeType - The MIME type for this attachment
      Throws:
      RemoteException - in the event of remote object failure.
    • setContent

      public void setContent(InputStream content) throws RemoteException
      Description copied from interface: AttachmentInterface
      Sets the source(stream) for the content of this attachment. For remote deployment the InputStream should be wrapped in an InputStreamAdapter
      Specified by:
      setContent in interface AttachmentInterface
      Parameters:
      content - The input stream containing the content for this attachment
      Throws:
      RemoteException - in the event of remote object failure.
    • getName

      public String getName() throws RemoteException
      Description copied from interface: AttachmentInterface
      Gets the name of this attachment
      Specified by:
      getName in interface AttachmentInterface
      Returns:
      String The name of this attachment
      Throws:
      RemoteException - in the event of remote object failure.
    • getDescription

      public String getDescription() throws RemoteException
      Description copied from interface: AttachmentInterface
      Gets the description of this attachment
      Specified by:
      getDescription in interface AttachmentInterface
      Returns:
      String The description of this attachment
      Throws:
      RemoteException - in the event of remote object failure.
    • getMimeType

      public String getMimeType() throws RemoteException
      Description copied from interface: AttachmentInterface
      Gets the MIME type of this attachment
      Specified by:
      getMimeType in interface AttachmentInterface
      Returns:
      String The MIME type of this attachment
      Throws:
      RemoteException - in the event of remote object failure.
    • getContent

      public InputStream getContent() throws RemoteException
      Description copied from interface: AttachmentInterface
      Gets the source(stream) of the content for this attachment
      Specified by:
      getContent in interface AttachmentInterface
      Returns:
      InputStream The stream containing the content for this attachment
      Throws:
      RemoteException - in the event of remote object failure.