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

Interface IAttachment


public interface IAttachment

This interface represents attachments of different groupware items.


Method Summary
 void close()
          Closes the input stream associated with attachment content (It is the responsibility of the client to close the input stream.)
 InputStream getContent()
          Returns an input stream to the attachment content
 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
 String getContentType()
          Returns the content type of the attachment
 String getId()
          Returns the id of the attachment
 String getName()
          Returns the name of the attachment
 void setContent(InputStream stream)
          Sets the input stream to the attachment content
 void setContentLength(long length)
          Sets the length of the resource content
 void setContentType(String contentType)
          Sets the content type for the attachment content
 void setGroupwareItem(IGroupwareItem item)
          Sets the parent groupware items of the attachment
 void setId(String id)
          Sets the id of the attachment
 void setName(String name)
          Sets the name of the attachment
 void setParentId(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

getName

public String getName()
               throws GroupwareException
Returns the name of the attachment

Returns:
String name of the attachment
Throws:
GroupwareException - When error occurs

setName

public void setName(String name)
             throws GroupwareException
Sets the name of the attachment

Parameters:
name - Name of the attachment
Throws:
GroupwareException - When error occurs

getId

public String getId()
             throws GroupwareException
Returns the id of the attachment

Returns:
String id of the attachment
Throws:
GroupwareException - When error occurs

setId

public void setId(String id)
           throws GroupwareException
Sets the id of the attachment

Parameters:
id - Attachment Id.
Throws:
GroupwareException - When error occurs

setParentId

public void setParentId(String id)
                 throws GroupwareException
Sets the id of the parent groupware item for the attachment

Parameters:
id - id of the groupware item.
Throws:
GroupwareException - When error occurs

getContent

public InputStream getContent(com.sapportals.portal.security.usermanagement.IUser user)
                       throws GroupwareException
Returns an input stream to the attachment content

Returns:
InputStream input stream to the attachment content.
Throws:
GroupwareException - When error occurs

getContent

public InputStream getContent()
                       throws GroupwareException
Returns an input stream to the attachment content

Returns:
InputStream input stream to the attachment content.
Throws:
GroupwareException - When error occurs

setContent

public void setContent(InputStream stream)
                throws GroupwareException
Sets the input stream to the attachment content

Parameters:
stream - Inputstream containing the attachment content.
Throws:
GroupwareException - When error occurs

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 - When error occurs

getContentLength

public long getContentLength()
                      throws GroupwareException
Returns the length of the resource content

Returns:
the length in bytes (when unknown: -1)
Throws:
GroupwareException - When error occurs

setContentLength

public void setContentLength(long length)
                      throws GroupwareException
Sets the length of the resource content

Parameters:
length - in bytes length of the content in the attachment
Throws:
GroupwareException - When error occurs

getContentType

public String getContentType()
                      throws GroupwareException
Returns the content type of the attachment

Returns:
content type Attachment Content type.
Throws:
GroupwareException - When error occurs

setContentType

public void setContentType(String contentType)
                    throws GroupwareException
Sets the content type for the attachment content

Throws:
GroupwareException - When error occurs

setReadTransport

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

Throws:
GroupwareException - When error occurs

setGroupwareItem

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

Throws:
GroupwareException - When error occurs


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.