de.laures.cewolf.storage
Class LongTermSessionStorage
java.lang.Object
de.laures.cewolf.storage.LongTermSessionStorage
- All Implemented Interfaces:
- Storage, java.io.Serializable
public class LongTermSessionStorage
- extends java.lang.Object
- implements Storage
Storage stores images in session, but expires them after a certain time.
This expiration time defaults to 300 seconds, and can be changed by adding
the timeout="xxx" parameter to and tags.
- Author:
- brianf
- See Also:
- Serialized Form
Method Summary |
ChartImage |
getChartImage(java.lang.String id,
javax.servlet.http.HttpServletRequest request)
Retrieves a chart image. |
java.lang.String |
getKey(ChartImage cid)
|
void |
init(javax.servlet.ServletContext servletContext)
Method init. |
java.lang.String |
removeChartImage(java.lang.String cid,
javax.servlet.http.HttpServletRequest request)
Removes the image from the storage |
java.lang.String |
storeChartImage(ChartImage chartImage,
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 |
LongTermSessionStorage
public LongTermSessionStorage()
getKey
public final java.lang.String getKey(ChartImage cid)
storeChartImage
public java.lang.String storeChartImage(ChartImage chartImage,
javax.servlet.jsp.PageContext pageContext)
throws CewolfException
- Description copied from interface:
Storage
- Stores a chart image.
- Specified by:
storeChartImage
in interface Storage
- Parameters:
chartImage
- the image to be storedpageContext
- servletContext which might be needed
- Returns:
- String the storage id which is used to find the image in storage
- Throws:
CewolfException
getChartImage
public ChartImage getChartImage(java.lang.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 imagerequest
- the request
- Returns:
- ChartImage the stored image instance
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
removeChartImage
public java.lang.String removeChartImage(java.lang.String cid,
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:
cid
- Image idrequest
- Servlet request
- Returns:
- Image id
- Throws:
CewolfException
- See Also:
Storage.removeChartImage(java.lang.String, javax.servlet.http.HttpServletRequest)
cewolf tag library - web charts with JFreeChart