BEA Systems, Inc.

com.compoze.collab.groupware
Class DefaultEmbeddedImageListener


java.lang.Object

  |

  +--com.compoze.collab.groupware.DefaultEmbeddedImageListener

All Implemented Interfaces:
IEmbeddedImageListener, java.io.Serializable

public class DefaultEmbeddedImageListener
extends java.lang.Object
implements IEmbeddedImageListener, java.io.Serializable

This class is an embedded image listener. This listener is useful in web applications where the download servlet can be readily accessed.

See Also:
Serialized Form

Constructor Summary
DefaultEmbeddedImageListener()
          Constructor.
DefaultEmbeddedImageListener(java.lang.String sServletName)
          Constructor.
 
Method Summary
 java.lang.String getImageUrl(java.lang.String sID)
          Gets a URL that can provide the image data to the browser.
 void setIDParamName(java.lang.String sIDParamName)
          Sets the attachment id parameter name.
 void setResponse(javax.servlet.http.HttpServletResponse response)
          Sets the http response instance.
 void setServletName(java.lang.String sServletName)
          Sets the servlet name to use with the listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEmbeddedImageListener


public DefaultEmbeddedImageListener()
Constructor. This will create a listener with the default servlet name.

DefaultEmbeddedImageListener


public DefaultEmbeddedImageListener(java.lang.String sServletName)
Constructor. Creates a listener with the given servlet name.
Parameters:
sServletName - the servlet name
Method Detail

setServletName


public void setServletName(java.lang.String sServletName)
Sets the servlet name to use with the listener.
Parameters:
sServletName - the servlet name

setIDParamName


public void setIDParamName(java.lang.String sIDParamName)
Sets the attachment id parameter name. This name is used to build the final url.
Parameters:
sIDParamName - the name of the id parameter

setResponse


public void setResponse(javax.servlet.http.HttpServletResponse response)
Sets the http response instance. This is used to encode the final url. If this is not set, the URL is not encoded.
Parameters:
response - the HTTP response

getImageUrl


public java.lang.String getImageUrl(java.lang.String sID)
Description copied from interface: IEmbeddedImageListener
Gets a URL that can provide the image data to the browser.
Specified by:
getImageUrl in interface IEmbeddedImageListener
Following copied from interface: com.compoze.collab.groupware.IEmbeddedImageListener
Parameters:
sID - the id of the attachment is passed to the listener
Returns:
the image URL (not null)

BEA Systems, Inc.

Copyright ©1999-2006 BEA Systems, Inc. All rights reserved.