|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.laures.cewolf.storage.FileStorage
public class FileStorage
Storage for storing images as files in the web application directory as files _chart-XXXXX.
Note that by default the files won't ever be removed. To remove saved images on VM exit set
the FileStorage.deleteOnExit
configuration parameter to "true". For example:
storage de.laures.cewolf.storage.FileStorage FileStorage.deleteOnExit true
Field Summary | |
---|---|
(package private) java.lang.String |
basePath
|
private boolean |
deleteOnExit
|
(package private) java.util.List |
stored
|
Constructor Summary | |
---|---|
FileStorage()
|
Method Summary | |
---|---|
boolean |
contains(ChartImage chartImage,
javax.servlet.jsp.PageContext pageContext)
|
ChartImage |
getChartImage(java.lang.String id,
javax.servlet.http.HttpServletRequest request)
Retrieves a chart image. |
private java.lang.String |
getFileName(ChartImage chartImage)
|
private java.lang.String |
getFileName(java.lang.String id)
|
java.lang.String |
getKey(ChartImage chartImage)
|
void |
init(javax.servlet.ServletContext servletContext)
Method init. |
java.lang.String |
removeChartImage(java.lang.String imgKey,
javax.servlet.http.HttpServletRequest pageContext)
Removes the image from the storage |
java.lang.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 |
Field Detail |
---|
java.lang.String basePath
java.util.List stored
private boolean deleteOnExit
Constructor Detail |
---|
public FileStorage()
Method Detail |
---|
public java.lang.String storeChartImage(ChartImage cid, javax.servlet.jsp.PageContext pageContext)
Storage
storeChartImage
in interface Storage
Storage.storeChartImage(ChartImage, PageContext)
public ChartImage getChartImage(java.lang.String id, javax.servlet.http.HttpServletRequest request)
Storage
getChartImage
in interface Storage
id
- the id of the imagerequest
- the request
Storage.getChartImage(String, HttpServletRequest)
public boolean contains(ChartImage chartImage, javax.servlet.jsp.PageContext pageContext)
de.laures.cewolf.Storage#contains(ChartImage, PageContext)
public java.lang.String getKey(ChartImage chartImage)
de.laures.cewolf.Storage#getKey(ChartImage)
public void init(javax.servlet.ServletContext servletContext) throws CewolfException
Storage
init
in interface Storage
CewolfException
Storage.init(ServletContext)
private java.lang.String getFileName(ChartImage chartImage)
private java.lang.String getFileName(java.lang.String id)
public java.lang.String removeChartImage(java.lang.String imgKey, javax.servlet.http.HttpServletRequest pageContext) throws CewolfException
Storage
removeChartImage
in interface Storage
imgKey
- Image idpageContext
- Servlet request
CewolfException
de.laures.cewolf.Storage#removeChartImage(java.lang.String, javax.servlet.jsp.PageContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |