BEA Systems, Inc.

portlets.compoze.groupware
Class CollabEmbeddedImageListener

java.lang.Object
  extended by portlets.compoze.groupware.CollabEmbeddedImageListener
All Implemented Interfaces:
IEmbeddedImageListener, java.io.Serializable

public class CollabEmbeddedImageListener
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
CollabEmbeddedImageListener()
          Constructor.
CollabEmbeddedImageListener(java.lang.String sServletName)
          Constructor.
 
Method Summary
 java.lang.String getIDParamName()
          Gets the attachment id parameter name.
 java.lang.String getImageUrl(java.lang.String sID)
          Gets a URL that can provide the image data to the browser.
 java.lang.String getServletName()
          Gets the servlet name
 void setIDParamName(java.lang.String sIDParamName)
          Sets the attachment id parameter name.
 void setResponse(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

CollabEmbeddedImageListener

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


CollabEmbeddedImageListener

public CollabEmbeddedImageListener(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

getServletName

public java.lang.String getServletName()
Gets 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

getIDParamName

public java.lang.String getIDParamName()
Gets the attachment id parameter name. This name is used to build the final url


setResponse

public void setResponse(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
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.