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

com.sas.services.information.metadata
Class Attachment

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

public class Attachment
implements AttachmentInterface, java.io.Serializable

Represents an attachment for a comment.

Since:
1.1
See Also:
Serialized Form

Constructor Summary
Attachment(java.lang.String name, java.lang.String description, java.lang.String mimeType, java.io.InputStream content)
          Creates a new attachment, with the name, description, mimetype and content provided in this constructor.
 
Method Summary
 java.io.InputStream getContent()
          Gets the source(stream) of the content for this attachment
 java.lang.String getDescription()
          Gets the description of this attachment
 java.lang.String getMimeType()
          Gets the MIME type of this attachment
 java.lang.String getName()
          Gets the name of this attachment
 void setContent(java.io.InputStream content)
          Sets the source(stream) for the content of this attachment.
 void setDescription(java.lang.String description)
          Sets the description of this attachment
 void setMimeType(java.lang.String mimeType)
          Sets the mime type of this attachment
 void setName(java.lang.String name)
          Sets the name of this attachment
 

Constructor Detail

Attachment

public Attachment(java.lang.String name,
                  java.lang.String description,
                  java.lang.String mimeType,
                  java.io.InputStream content)
           throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.
Method Detail

setName

public void setName(java.lang.String name)
             throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

setDescription

public void setDescription(java.lang.String description)
                    throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

setMimeType

public void setMimeType(java.lang.String mimeType)
                 throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

setContent

public void setContent(java.io.InputStream content)
                throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

getName

public java.lang.String getName()
                         throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

getDescription

public java.lang.String getDescription()
                                throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

getMimeType

public java.lang.String getMimeType()
                             throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

getContent

public java.io.InputStream getContent()
                               throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.