org.shept.org.springframework.web.servlet.mvc.formcache
public class SimpleSessionFormCache extends org.springframework.web.context.support.WebApplicationObjectSupport implements SessionFormCache
| Modifier and Type | Class and Description |
|---|---|
private class |
SimpleSessionFormCache.SizeLimitedCache<String,Object> |
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_CACHE_SIZE |
private int |
maxCacheSize |
static String |
SESSION_FORM_CACHE_ATTIRBUTE |
| Constructor and Description |
|---|
SimpleSessionFormCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache(javax.servlet.http.HttpServletRequest request) |
void |
clearForm(javax.servlet.http.HttpServletRequest request,
String formAttrName) |
void |
clearOtherForms(javax.servlet.http.HttpServletRequest request,
String formAttrName) |
Object |
getForm(javax.servlet.http.HttpServletRequest request,
String formAttrName) |
protected Map<String,Object> |
getFormCache(javax.servlet.http.HttpServletRequest request,
boolean required,
boolean create) |
long |
getLastModified(javax.servlet.http.HttpServletRequest request,
String formAttrName) |
int |
getMaxCacheSize() |
void |
saveForm(javax.servlet.http.HttpServletRequest request,
String formAttrName,
Object command) |
void |
setMaxCacheSize(int maxCacheSize) |
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextpublic static String SESSION_FORM_CACHE_ATTIRBUTE
public static int MAX_CACHE_SIZE
private int maxCacheSize
public void clearForm(javax.servlet.http.HttpServletRequest request,
String formAttrName)
throws Exception
Exceptionpublic void clearOtherForms(javax.servlet.http.HttpServletRequest request,
String formAttrName)
throws Exception
Exceptionpublic void clearCache(javax.servlet.http.HttpServletRequest request)
clearCache in interface SessionFormCacheprotected Map<String,Object> getFormCache(javax.servlet.http.HttpServletRequest request, boolean required, boolean create)
public long getLastModified(javax.servlet.http.HttpServletRequest request,
String formAttrName)
getLastModified in interface SessionFormCachepublic void saveForm(javax.servlet.http.HttpServletRequest request,
String formAttrName,
Object command)
saveForm in interface SessionFormCachepublic Object getForm(javax.servlet.http.HttpServletRequest request, String formAttrName)
getForm in interface SessionFormCachepublic int getMaxCacheSize()
public void setMaxCacheSize(int maxCacheSize)
maxCacheSize - the maxCacheSize to setCopyright © 2014. All Rights Reserved.