com.sap.ip.collaboration.gw.api.framework.groupware
Interface IAttachment


public interface IAttachment

This interface represents attachments of different groupware items. Copyright (c) SAP 2002

Version:
$Revision: 1.0$

Method Summary
 void close()
          Closes the input stream associated with attachment content (It is the responsibility of the client to close the input stream.)
 java.io.InputStream getContent()
          Returns an input stream to the attachment content
 java.io.InputStream getContent(com.sapportals.portal.security.usermanagement.IUser user)
          Returns an input stream to the attachment content
 long getContentLength()
          Returns the length of the resource content
 java.lang.String getContentType()
          Returns the content type of the attachment
 java.lang.String getId()
          Returns the id of the attachment
 java.lang.String getName()
          Returns the name of the attachment
 void setContent(java.io.InputStream stream)
          Sets the input stream to the attachment content
 void setContentLength(long length)
          Sets the length of the resource content
 void setContentType(java.lang.String contentType)
          Sets the content type for the attachment content
 void setGroupwareItem(IGroupwareItem item)
          Sets the parent groupware items of the attachment
 void setId(java.lang.String id)
          Sets the id of the attachment
 void setName(java.lang.String name)
          Sets the name of the attachment
 void setParentId(java.lang.String id)
          Sets the id of the parent groupware item for the attachment
 void setReadTransport(IReadTransport transport)
          Sets the read transport for fetching the content of the attachment
 

Method Detail

close

public void close()
           throws GroupwareException
Closes the input stream associated with attachment content (It is the responsibility of the client to close the input stream.)
Throws:
GroupwareException -  

getContent

public java.io.InputStream getContent()
                               throws GroupwareException
Returns an input stream to the attachment content
Returns:
InputStream input stream to the attachment content.
Throws:
GroupwareException -  

getContent

public java.io.InputStream getContent(com.sapportals.portal.security.usermanagement.IUser user)
                               throws GroupwareException
Returns an input stream to the attachment content
Parameters:
IUser - user
Returns:
InputStream input stream to the attachment content.
Throws:
GroupwareException -  

getContentLength

public long getContentLength()
                      throws GroupwareException
Returns the length of the resource content
Returns:
the length in bytes (when unknown: -1)
Throws:
GroupwareException -  

getContentType

public java.lang.String getContentType()
                                throws GroupwareException
Returns the content type of the attachment
Returns:
content type
Throws:
GroupwareException -  

getId

public java.lang.String getId()
                       throws GroupwareException
Returns the id of the attachment
Returns:
String id of the attachment
Throws:
GroupwareException -  

getName

public java.lang.String getName()
                         throws GroupwareException
Returns the name of the attachment
Returns:
String name of the attachment
Throws:
GroupwareException -  

setContent

public void setContent(java.io.InputStream stream)
                throws GroupwareException
Sets the input stream to the attachment content
Parameters:
stream -  
Throws:
GroupwareException -  

setContentLength

public void setContentLength(long length)
                      throws GroupwareException
Sets the length of the resource content
Parameters:
length - in bytes
Throws:
GroupwareException -  

setContentType

public void setContentType(java.lang.String contentType)
                    throws GroupwareException
Sets the content type for the attachment content
Parameters:
content - type
Throws:
GroupwareException -  

setGroupwareItem

public void setGroupwareItem(IGroupwareItem item)
                      throws GroupwareException
Sets the parent groupware items of the attachment
Parameters:
IGroupwareItem - item
Throws:
GroupwareException -  

setId

public void setId(java.lang.String id)
           throws GroupwareException
Sets the id of the attachment
Parameters:
id -  
Throws:
GroupwareException -  

setName

public void setName(java.lang.String name)
             throws GroupwareException
Sets the name of the attachment
Parameters:
name -  
Throws:
GroupwareException -  

setParentId

public void setParentId(java.lang.String id)
                 throws GroupwareException
Sets the id of the parent groupware item for the attachment
Parameters:
id -  
Throws:
GroupwareException -  

setReadTransport

public void setReadTransport(IReadTransport transport)
                      throws GroupwareException
Sets the read transport for fetching the content of the attachment
Parameters:
IReadTransport - read transport
Throws:
GroupwareException -