|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jfw.web.util.DataContainerManager
public final class DataContainerManager
Manage objects of type DataContainer
.
The DataContainer
objects are saved:
appDataContainer
): is application relative
and can be used for all users.get(javax.servlet.http.HttpServletRequest, java.lang.String)
is used for create/get an object
DataContainer
.remove(javax.servlet.http.HttpServletRequest, java.lang.String)
is used for delete an object
DataContainer
from the session.
Field Summary | |
---|---|
static java.lang.String |
DATA_CONTAINER_KEY
The default key value when add object DataContainer
in session. |
static int |
DATA_CONTAINER_KEY_LENGTH
Length of attribute DATA_CONTAINER_KEY . |
Constructor Summary | |
---|---|
DataContainerManager()
|
Method Summary | |
---|---|
static DataContainer |
get()
Manage the application object DataContainer . |
static DataContainer |
get(javax.servlet.http.HttpServletRequest request)
Use method get(javax.servlet.http.HttpServletRequest, java.lang.String) . |
static DataContainer |
get(javax.servlet.http.HttpServletRequest request,
java.lang.String suffix)
Manage an object DataContainer . |
static boolean |
remove(javax.servlet.http.HttpServletRequest request)
Use method remove(javax.servlet.http.HttpServletRequest, java.lang.String) . |
static boolean |
remove(javax.servlet.http.HttpServletRequest request,
java.lang.String suffix)
Delete a data container from HttpSession. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATA_CONTAINER_KEY
DataContainer
in session.
public static final int DATA_CONTAINER_KEY_LENGTH
DATA_CONTAINER_KEY
.
Constructor Detail |
---|
public DataContainerManager()
Method Detail |
---|
public static DataContainer get(javax.servlet.http.HttpServletRequest request, java.lang.String suffix)
DataContainer
.getKey(java.lang.String)
.
If the object is not exist in HttpSession is created.
request
- an HttpServletRequest object.suffix
- the suffix to use for the session key. The prefix is the value
of attribute DATA_CONTAINER_KEY
. The complete key is returned by
method getKey(java.lang.String)
.
DataContainer
object relative with the
suffix.public static DataContainer get(javax.servlet.http.HttpServletRequest request)
get(javax.servlet.http.HttpServletRequest, java.lang.String)
. The default value of parameter
suffix is null.
DataContainer
object.public static DataContainer get()
DataContainer
.appDataContainer
.
appDataContainer
.public static boolean remove(javax.servlet.http.HttpServletRequest request, java.lang.String suffix)
request
- an HttpServletRequest object.suffix
- the suffix of key used in HttpSession.
public static boolean remove(javax.servlet.http.HttpServletRequest request)
remove(javax.servlet.http.HttpServletRequest, java.lang.String)
. The default value of parameter
suffix is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |