|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.dataengine.SessionManager
The SessionManager contains methods for storing and retrieving objects to and from the HttpSession. The session manager should be used for all DataEngine applications to allow for proper storing of objects. A hidden field is set on loaded pages which is used to uniquely identify which application is getting or setting an Object into the session. This hidden field's value will be used as a prefix for storing objects to and from the session.
This class also contains methods for getting and storing common DataEngine objects, such as RowCollections, Rows, Tables, Libraries, DBSystems, lists of Libraries and Tables, ecetera.
Field Summary | |
static String |
SESSION_VALID
|
static String |
SESSION_VALID_CHECKED
|
Fields inherited from interface planetj.dataengine.IServletParameters |
ALL, AUTO_RUN, BASE_URL, CACHE_TRACK_ON, CACHE_TRACK_WRITE_TO_FILE, CLEAN_UP_TIME, DATABASE, DRIVER, ENVIRONMENT_MODE, JDBC_OPTIMIZATIONS, MAX_CONNECTIONS, METADATA_LIBRARY, MIN_CONNECTIONS, ORPHAN_TIMEOUT, PASSWORD, PORT, SYSTEM_ALIAS, SYSTEM_ALIAS_PARAM, SYSTEM_URL, USER_ID, USER_PASSWORD |
Fields inherited from interface planetj.dataengine.IJSPPages |
CUSTOM_LOG_ON_JSP, DEFAULT_ADD_BODY_JSP, DEFAULT_EDIT_BODY_JSP, DEFAULT_PARAMS_JSP, DEFAULT_PRINT_PAGE_JSP, DEFAULT_RESULTS_JSP, DEFAULT_ROW_DETAILS, DEFAULT_SQL_OPERATION_RESULTS_JSP, DEFAULT_VIEW_BODY_JSP, DETAILS_JSP, DISPLAY_EXCEPTION_JSP, INITIAL_JSP, SIGN_ON_BODY_JSP, SIGN_ON_JSP, SIGNON_PARAMS_JSP |
Fields inherited from interface planetj.dataengine.application.IApplicationJSPs |
APPLICATION_ADD_JSP, APPLICATION_DETAILS_JSP, APPLICATION_EDIT_JSP, APPLICATION_ERROR_JSP, APPLICATION_HEADER_JSP, APPLICATION_INVALID_LICENSE_JSP, APPLICATION_JSP, APPLICATION_MESSAGE_JSP, APPLICATION_OPERATIONS_TOC, APPLICATION_RESULTS_JSP, APPLICATION_SIGN_ON_JSP, APPLICATION_TEMPLATE_JSP, APPLICATION_TOC_JSP, APPLICATION_VIEW_JSP |
Fields inherited from interface planetj.dataengine.application.IWOWJSPs |
WOW_MAIN_EXCEPTION_JSP, WOW_MANAGE_OPERATIONS_JSP, WOW_STEPS_JSP, WOW_TOC, WOW_VIEW_APPLICATIONS_JSP, WOW_VIEW_CONNECTIONS_JSP |
Constructor Summary | |
SessionManager()
|
Method Summary | |
static Object |
getAttribute(String key,
javax.servlet.http.HttpServletRequest request)
Gets an object from the HttpSession using the given key. |
static Object |
getAttribute(String sessionId,
String key,
javax.servlet.http.HttpServletRequest request)
Deprecated. |
static Map |
getAttributes(javax.servlet.http.HttpServletRequest request)
Gets the HttpSession from the given request for the requests session id. |
static Integer |
getLastRequestId(javax.servlet.http.HttpServletRequest request)
Deprecated. no longer used |
static Library |
getLibrary(javax.servlet.http.HttpServletRequest pRequest)
Gets the default Library from the session. |
static Library |
getLibrary(javax.servlet.http.HttpServletRequest pRequest,
String pLibraryKey)
Gets the Library from the session identified by the given key. |
static List |
getLibraryList(javax.servlet.http.HttpServletRequest pRequest)
Gets the default list of libraries from the session. |
static List |
getLibraryList(javax.servlet.http.HttpServletRequest pRequest,
String pLibraryListKey)
Gets a list of libraries from the session identified by the given key. |
static Row |
getRow(javax.servlet.http.HttpServletRequest pRequest,
String pRowKey)
Deprecated. Row's should no be set on the request as a persistent or page attribute. call HttpRequestManager.getAttribute(String, HttpSerlvetRequest) |
static RowCollection |
getRowCollection(javax.servlet.http.HttpServletRequest request)
Deprecated. RowCollection's should no be set on the request as a persistent or page attribute. call HttpRequestManager.getAttribute(String, HttpSerlvetRequest) |
static RowCollection |
getRowCollection(javax.servlet.http.HttpServletRequest pRequest,
String pRowCollectionKey)
Deprecated. RowCollection's should no be set on the request as a persistent or page attribute. call HttpRequestManager.getAttribute(String, HttpSerlvetRequest) |
static Object |
getSessionAttribute(javax.servlet.http.HttpServletRequest request,
String key)
Deprecated. Replaced with getAttribute(String, HttpServletRequest) to keep up parameter ordering standards with internal code. |
static Object |
getSessionAttribute(javax.servlet.http.HttpServletRequest pRequest,
String pKey,
String uniqueSessionId)
Deprecated. Replaced with getAttribute(String, String, HttpServletRequest) as of (10/8/2002 10:00:12 PM) to keep parameter ordering standards of internal code consistent |
static int |
getSessionRandomNumber(javax.servlet.http.HttpServletRequest req)
Gets a random number unique to this session. |
static Object |
getSharedAttribute(String key,
javax.servlet.http.HttpServletRequest request)
Gets an object from the HttpSession using the given key. |
static Object |
getSharedSessionAttribute(javax.servlet.http.HttpServletRequest pRequest,
String pKey)
Deprecated. Replaced by getSharedAttribute(String, HttpServletRequest) to keep parameter ordering standards for internal code. |
static DBSystem |
getSystem(javax.servlet.http.HttpServletRequest pRequest)
Gets the default DBSystem from the session. |
static DBSystem |
getSystem(javax.servlet.http.HttpServletRequest pRequest,
String pSystemKey)
Gets the DBSystem from the session identified by the given key. |
static Table |
getTable(javax.servlet.http.HttpServletRequest pRequest)
Gets the default Table from the session. |
static Table |
getTable(javax.servlet.http.HttpServletRequest pRequest,
String pTableKey)
Gets the Table from the session identified by the given key. |
static List |
getTableList(javax.servlet.http.HttpServletRequest pRequest)
Gets the default list of tables from the session. |
static List |
getTableList(javax.servlet.http.HttpServletRequest pRequest,
String pTableListKey)
Gets a list of tables from the session identified by the given key. |
static UserProperties |
getUserProperties(javax.servlet.http.HttpServletRequest request)
Deprecated. replaced with method in DataEngineManager |
static UserProperties |
getUserProperties(javax.servlet.http.HttpServletRequest request,
boolean create)
Deprecated. replaced with method in DataEngineManager |
static UserProperties |
getUserProperties(javax.servlet.http.HttpServletRequest pRequest,
String pUserPropertiesKey)
Deprecated. no longer used |
static void |
invalidateSession(javax.servlet.http.HttpServletRequest request)
Invalidates the session for the given request. |
static boolean |
isValid(javax.servlet.http.HttpServletRequest request)
Test to see if the session is valid. |
static Object |
removeAttribute(String key,
javax.servlet.http.HttpServletRequest request)
Removes the specified object from the HttpSession. |
static Object |
removeSessionAttribute(javax.servlet.http.HttpServletRequest pRequest,
String pKey)
Deprecated. Replaced by removeAttribute(String, HttpServletRequest) to keep consistant parameter ordering standards for internal code. |
static Object |
removeSharedAttribute(String key,
javax.servlet.http.HttpServletRequest request)
Removes an object in the HttpSession using the given key. |
static Object |
removeSharedSessionAttribute(javax.servlet.http.HttpServletRequest pRequest,
String pKey)
Deprecated. Replaced with removeSharedAttribute(String, HttpServletRequest) to keep parameter ordering standards for internal code consistent |
static void |
setAttribute(String key,
Object value,
javax.servlet.http.HttpServletRequest request)
Sets the given Object in the HttpSession using the given key. |
static void |
setLastRequestId(Integer id,
javax.servlet.http.HttpServletRequest request)
Deprecated. no longer used |
static void |
setLastRequestId(int id,
javax.servlet.http.HttpServletRequest request)
Deprecated. no longer used |
static void |
setRowCollection(RowCollection rc,
javax.servlet.http.HttpServletRequest request)
Deprecated. RowCollection's should now be set as request page attributes HttpRequestManager.setPageAttribute(String, Object, HttpServletRequest) |
static void |
setSessionAttribute(javax.servlet.http.HttpServletRequest pRequest,
String pKey,
Object pValue)
Deprecated. Replaced with setAttribute(String, Object, HttpServletRequest) to keep up parameter ordering standards with internal code. |
static void |
setSharedAttribute(String key,
Object value,
javax.servlet.http.HttpServletRequest request)
Puts the given Object in the request's session for the given key. |
static void |
setSharedSessionAttribute(javax.servlet.http.HttpServletRequest pRequest,
String pKey,
Object pValue)
Deprecated. Replaced with setSharedAttribute(String, Object, HttpServletRequest) |
static void |
setUserProperties(javax.servlet.http.HttpServletRequest pRequest,
UserProperties props)
Deprecated. replaced with method in DataEngineManager |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String SESSION_VALID_CHECKED
public static final String SESSION_VALID
Constructor Detail |
public SessionManager()
Method Detail |
public static Object getAttribute(String sessionId, String key, javax.servlet.http.HttpServletRequest request)
request
- request to which to get the session from
public static Object getAttribute(String key, javax.servlet.http.HttpServletRequest request)
request
- request to which to get the session from
public static Map getAttributes(javax.servlet.http.HttpServletRequest request)
request
- request to get session from.
public static Integer getLastRequestId(javax.servlet.http.HttpServletRequest request)
public static Library getLibrary(javax.servlet.http.HttpServletRequest pRequest) throws DataEngineException
pRequest
- request containing session to get Library
DataEngineException
public static Library getLibrary(javax.servlet.http.HttpServletRequest pRequest, String pLibraryKey) throws DataEngineException
pRequest
- request containing session to get Library frompLibraryKey
- key of the Library in the session
DataEngineException
public static List getLibraryList(javax.servlet.http.HttpServletRequest pRequest) throws DataEngineException
pRequest
- request containing session to get library list from
DataEngineException
public static List getLibraryList(javax.servlet.http.HttpServletRequest pRequest, String pLibraryListKey) throws DataEngineException
pRequest
- request containing session to get the library list frompLibraryListKey
- key of the library list in the session
DataEngineException
public static Row getRow(javax.servlet.http.HttpServletRequest pRequest, String pRowKey)
pRequest
- request containing session to get Row frompRowKey
- key of the Row in the session
public static RowCollection getRowCollection(javax.servlet.http.HttpServletRequest request)
request
- request containing session to get RowCollection from
public static RowCollection getRowCollection(javax.servlet.http.HttpServletRequest pRequest, String pRowCollectionKey)
pRequest
- request containing session to get RowCollection frompRowCollectionKey
- key of the RowCollection in the session
public static Object getSessionAttribute(javax.servlet.http.HttpServletRequest request, String key) throws DataEngineException
DataEngineException
public static Object getSessionAttribute(javax.servlet.http.HttpServletRequest pRequest, String pKey, String uniqueSessionId) throws DataEngineException
pRequest
- request to which to get the session frompKey
- key of the object to retrieve out of the session
DataEngineException
public static final int getSessionRandomNumber(javax.servlet.http.HttpServletRequest req)
public static Object getSharedAttribute(String key, javax.servlet.http.HttpServletRequest request)
request
- request to which to get the session from
public static Object getSharedSessionAttribute(javax.servlet.http.HttpServletRequest pRequest, String pKey)
pRequest
- request to which to get the session frompKey
- key of the object to retrieve out of the session
public static DBSystem getSystem(javax.servlet.http.HttpServletRequest pRequest) throws DataEngineException
pRequest
- request containing session to get DBSystem
DataEngineException
public static DBSystem getSystem(javax.servlet.http.HttpServletRequest pRequest, String pSystemKey) throws DataEngineException
pRequest
- request containing session to get DBSystem frompSystemKey
- key of the DBSystem in the session
DataEngineException
public static Table getTable(javax.servlet.http.HttpServletRequest pRequest) throws DataEngineException
pRequest
- request containing session to get Table from
DataEngineException
public static Table getTable(javax.servlet.http.HttpServletRequest pRequest, String pTableKey) throws DataEngineException
pRequest
- request containing session to get Table frompTableKey
- key of the Table in the session
DataEngineException
public static List getTableList(javax.servlet.http.HttpServletRequest pRequest) throws DataEngineException
pRequest
- request containing session to get table list from
DataEngineException
public static List getTableList(javax.servlet.http.HttpServletRequest pRequest, String pTableListKey) throws DataEngineException
pRequest
- request containing session to get the table list frompTableListKey
- key of the table list in the session
DataEngineException
public static UserProperties getUserProperties(javax.servlet.http.HttpServletRequest request) throws DataEngineException
DataEngineException
public static UserProperties getUserProperties(javax.servlet.http.HttpServletRequest pRequest, String pUserPropertiesKey) throws DataEngineException
pRequest
- request containing session to get UserProperties frompUserPropertiesKey
- key of the UserProperties in the session
DataEngineException
public static UserProperties getUserProperties(javax.servlet.http.HttpServletRequest request, boolean create) throws DataEngineException
DataEngineException
public static void invalidateSession(javax.servlet.http.HttpServletRequest request)
public static boolean isValid(javax.servlet.http.HttpServletRequest request)
public static Object removeAttribute(String key, javax.servlet.http.HttpServletRequest request)
public static Object removeSessionAttribute(javax.servlet.http.HttpServletRequest pRequest, String pKey) throws DataEngineException
pRequest
- request containing session to remove object frompKey
- key used to identify which object to remove from session
DataEngineException
public static Object removeSharedAttribute(String key, javax.servlet.http.HttpServletRequest request)
public static Object removeSharedSessionAttribute(javax.servlet.http.HttpServletRequest pRequest, String pKey) throws DataEngineException
pRequest
- request containing session to remove object frompKey
- key used to identify which object to remove from session
DataEngineException
public static void setAttribute(String key, Object value, javax.servlet.http.HttpServletRequest request)
public static void setLastRequestId(int id, javax.servlet.http.HttpServletRequest request)
public static void setLastRequestId(Integer id, javax.servlet.http.HttpServletRequest request)
public static void setRowCollection(RowCollection rc, javax.servlet.http.HttpServletRequest request)
public static void setSessionAttribute(javax.servlet.http.HttpServletRequest pRequest, String pKey, Object pValue) throws DataEngineException
pRequest
- request used to get the session to put the given object intopKey
- key used for setting the object in the sessionpValue
- object being set in the session
DataEngineException
public static void setSharedAttribute(String key, Object value, javax.servlet.http.HttpServletRequest request)
key
- key to store/retrieve the given Object to/from the sessionvalue
- Object to put in the sessionrequest
- HttpSerlvetRequest containing session to put Object inpublic static void setSharedSessionAttribute(javax.servlet.http.HttpServletRequest pRequest, String pKey, Object pValue) throws DataEngineException
pRequest
- request used to get the session to put the given object intopKey
- key used for setting the object in the sessionpValue
- object being set in the session
DataEngineException
public static void setUserProperties(javax.servlet.http.HttpServletRequest pRequest, UserProperties props) throws DataEngineException
DataEngineException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |