de.laures.cewolf.storage
Class AbstractSessionStorage

java.lang.Object
  extended by de.laures.cewolf.storage.AbstractSessionStorage
All Implemented Interfaces:
Storage
Direct Known Subclasses:
ClusterableSessionStorage, TransientSessionStorage

public abstract class AbstractSessionStorage
extends Object
implements Storage

Author:
glaures

Constructor Summary
AbstractSessionStorage()
           
 
Method Summary
 boolean contains(ChartImage cid, javax.servlet.jsp.PageContext pageContext)
           
protected abstract  Object getCacheObject(ChartImage cid)
           
 ChartImage getChartImage(String id, javax.servlet.http.HttpServletRequest request)
          Retrieves a chart image.
 String getKey(ChartImage cid)
           
 void init(javax.servlet.ServletContext servletContext)
          Method init.
 String removeChartImage(String imgKey, javax.servlet.http.HttpServletRequest request)
          Removes the image from the storage
protected  String removeChartImage(String cid, javax.servlet.http.HttpSession session)
           
protected  String storeChartImage(ChartImage cid, javax.servlet.http.HttpSession session)
           
 String storeChartImage(ChartImage cid, javax.servlet.jsp.PageContext pageContext)
          Stores a chart image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSessionStorage

public AbstractSessionStorage()
Method Detail

storeChartImage

public String storeChartImage(ChartImage cid,
                              javax.servlet.jsp.PageContext pageContext)
                       throws CewolfException
Description copied from interface: Storage
Stores a chart image.

Specified by:
storeChartImage in interface Storage
Returns:
String the storage id which is used to find the image in storage
Throws:
CewolfException
See Also:
de.laures.cewolf.Storage#storeChartImage(ChartImage, ServletContext)

getChartImage

public ChartImage getChartImage(String id,
                                javax.servlet.http.HttpServletRequest request)
Description copied from interface: Storage
Retrieves a chart image.

Specified by:
getChartImage in interface Storage
Parameters:
id - the id of the image
request - the request
Returns:
ChartImage the stored image instance
See Also:
de.laures.cewolf.Storage#getChartImage(String)

contains

public boolean contains(ChartImage cid,
                        javax.servlet.jsp.PageContext pageContext)

getKey

public final String getKey(ChartImage cid)

storeChartImage

protected String storeChartImage(ChartImage cid,
                                 javax.servlet.http.HttpSession session)
                          throws CewolfException
Throws:
CewolfException

removeChartImage

public String removeChartImage(String imgKey,
                               javax.servlet.http.HttpServletRequest request)
                        throws CewolfException
Description copied from interface: Storage
Removes the image from the storage

Specified by:
removeChartImage in interface Storage
Parameters:
imgKey - Image id
request - Servlet request
Returns:
Image id
Throws:
CewolfException

removeChartImage

protected String removeChartImage(String cid,
                                  javax.servlet.http.HttpSession session)
                           throws CewolfException
Parameters:
cid -
session -
Returns:
Throws:
CewolfException

getCacheObject

protected abstract Object getCacheObject(ChartImage cid)
                                  throws CewolfException
Throws:
CewolfException

init

public void init(javax.servlet.ServletContext servletContext)
          throws CewolfException
Description copied from interface: Storage
Method init.

Specified by:
init in interface Storage
Throws:
CewolfException
See Also:
Storage.init(ServletContext)


Copyright © 2012. All Rights Reserved.