|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.gui.legacy.util.SessionUtils
public class SessionUtils
| Constructor Summary | |
|---|---|
SessionUtils()
|
|
| Method Summary | |
|---|---|
static void |
addToList(javax.servlet.http.HttpSession session,
String attr,
Integer[] ids)
|
static void |
addToList(javax.servlet.http.HttpSession session,
String attr,
List ids)
Merge the given ids into the array of pending ids stored under the named session attribute. |
static void |
addToList(javax.servlet.http.HttpSession session,
String attr,
String[] ids)
|
static void |
addToListStr(javax.servlet.http.HttpSession session,
String attr,
List ids)
Merge the given ids into the array of pending ids stored under the named session attribute. |
static void |
clearWorkflow(javax.servlet.http.HttpSession session,
String workflowName)
Remove any old workflows |
static int |
countWorkflow(javax.servlet.http.HttpSession session,
String workflowName)
Returns the size of a workflow's stack. |
static Integer[] |
getList(javax.servlet.http.HttpSession session,
String attr)
Retrieve the array of pending ids stored under the named session attribute. |
static List |
getListAsList(javax.servlet.http.HttpSession session,
String attr)
Retrieve the List of pending ids stored under the named session attribute. |
static List<String> |
getListAsListStr(javax.servlet.http.HttpSession session,
String attr)
Retrieve the List of pending ids stored under the named session attribute. |
static String |
getReturnPath(javax.servlet.http.HttpSession session)
Retrieve the "return path" that locates the point at which a subflow was included into a primary workflow. |
static Boolean |
getReturnPathIgnoredForOk(javax.servlet.http.HttpSession session)
Retrieve wether the "return path" should be paid attention to for new. |
static WebUser |
getWebUser(javax.servlet.http.HttpSession session)
Retrieve the cached WebUser representing the user. |
static void |
moveAttribute(javax.servlet.http.HttpServletRequest request,
String key)
Move the attribute from the session to request scope. |
static String |
popWorkflow(javax.servlet.http.HttpSession session,
String workflowName)
Takes the current returnPath and pops it off of the workflow's stack. |
static void |
pushWorkflow(javax.servlet.http.HttpSession session,
org.apache.struts.action.ActionMapping mapping,
String workflowName)
Takes the current returnPath and pushes it onto the workflow's stack. |
static void |
removeFromList(javax.servlet.http.HttpSession session,
String attr,
Integer[] ids)
|
static void |
removeFromList(javax.servlet.http.HttpSession session,
String attr,
List ids)
Remove the given ids from the array of pending ids stored under the named session attribute. |
static void |
removeFromList(javax.servlet.http.HttpSession session,
String attr,
String[] ids)
|
static void |
removeFromListStr(javax.servlet.http.HttpSession session,
String attr,
List ids)
Remove the given ids from the array of pending ids stored under the named session attribute. |
static void |
removeList(javax.servlet.http.HttpSession session,
String attr)
Remove the array of pending ids stored under the named session attribute. |
static void |
resetReturnPath(javax.servlet.http.HttpSession session)
clear out the return path stack. |
static void |
setConfirmation(javax.servlet.http.HttpSession session,
String key)
Set a confirmation message upon completion of a user action. |
static void |
setConfirmation(javax.servlet.http.HttpSession session,
String key,
Object value0)
Set a confirmation message with a replacement value upon completion of a user action. |
static void |
setError(javax.servlet.http.HttpSession session,
String key)
Set an error message when a user action fails with a user-level error. |
static void |
setError(javax.servlet.http.HttpSession session,
String key,
Object value0)
Set an error message with a replacement value when a user action fails with a user-level error. |
static void |
setError(javax.servlet.http.HttpSession session,
String key,
Object value0,
String property)
Set an error message with a replacement value when a user action fails with a user-level error. |
static void |
setError(javax.servlet.http.HttpSession session,
String key,
String property)
Set an error message when a user action fails with a user-level error. |
static void |
setReturnPath(javax.servlet.http.HttpSession session,
String path)
Set the "returnPath", the possible point of origin for a workflow. |
static void |
setReturnPath(javax.servlet.http.HttpSession session,
String path,
Boolean ignore)
Set the "returnPath," the possible point of origin for a worklow |
static void |
setWebUser(javax.servlet.http.HttpSession session,
WebUser user)
|
static void |
unsetConfirmation(javax.servlet.http.HttpSession session,
String key)
|
static void |
unsetError(javax.servlet.http.HttpSession session)
|
static void |
unsetReturnPath(javax.servlet.http.HttpSession session)
Unset the "return path" that locates the point at which a subflow was included into a primary workflow. |
static void |
unsetReturnPathIgnoredForOk(javax.servlet.http.HttpSession session)
Unset the "return path" that locates the point at which a subflow was included into a primary workflow. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionUtils()
| Method Detail |
|---|
public static WebUser getWebUser(javax.servlet.http.HttpSession session)
WebUser representing the user.
session - the http session
public static void setWebUser(javax.servlet.http.HttpSession session,
WebUser user)
public static Integer[] getList(javax.servlet.http.HttpSession session,
String attr)
session - the http sessionattr - the name of the session attribute
public static List getListAsList(javax.servlet.http.HttpSession session,
String attr)
List of pending ids stored under the named session attribute.
session - the http sessionattr - the name of the session attribute
public static List<String> getListAsListStr(javax.servlet.http.HttpSession session,
String attr)
List of pending ids stored under the named session attribute.
session - the http sessionattr - the name of the session attribute
public static void addToList(javax.servlet.http.HttpSession session,
String attr,
List ids)
session - the http sessionattr - the name of the session attributeids - the ids to be added
public static void addToList(javax.servlet.http.HttpSession session,
String attr,
Integer[] ids)
public static void addToListStr(javax.servlet.http.HttpSession session,
String attr,
List ids)
session - the http sessionattr - the name of the session attributeids - the ids to be added
public static void addToList(javax.servlet.http.HttpSession session,
String attr,
String[] ids)
public static void removeFromList(javax.servlet.http.HttpSession session,
String attr,
List ids)
session - the http sessionattr - the name of the session attributeids - the ids to be removed
public static void removeFromList(javax.servlet.http.HttpSession session,
String attr,
Integer[] ids)
public static void removeFromListStr(javax.servlet.http.HttpSession session,
String attr,
List ids)
session - the http sessionattr - the name of the session attributeids - the ids to be removed
public static void removeFromList(javax.servlet.http.HttpSession session,
String attr,
String[] ids)
public static void removeList(javax.servlet.http.HttpSession session,
String attr)
session - the http sessionattr - the name of the session attributepublic static String getReturnPath(javax.servlet.http.HttpSession session)
session - the http session
public static void setReturnPath(javax.servlet.http.HttpSession session,
String path)
session - the http sessionpath - the return path
public static void setReturnPath(javax.servlet.http.HttpSession session,
String path,
Boolean ignore)
session - The http session.path - The return path url represented as a String.ignore - public static void resetReturnPath(javax.servlet.http.HttpSession session)
public static void unsetReturnPath(javax.servlet.http.HttpSession session)
session - the http sessionpublic static Boolean getReturnPathIgnoredForOk(javax.servlet.http.HttpSession session)
session - the http session
public static void unsetReturnPathIgnoredForOk(javax.servlet.http.HttpSession session)
session - the http session
public static void clearWorkflow(javax.servlet.http.HttpSession session,
String workflowName)
session - workflowName -
public static void pushWorkflow(javax.servlet.http.HttpSession session,
org.apache.struts.action.ActionMapping mapping,
String workflowName)
session - The HttpSesion to get and save the workflow to/frommapping - Use the input attribute from this mapping if a returnPath is not defined in the current
session.workflowName - The name of the workflow scope to save the input under.
public static String popWorkflow(javax.servlet.http.HttpSession session,
String workflowName)
session - The HttpSesion to get and save the workflow to/fromworkflowName - The name of the workflow scope to save the input under.
public static int countWorkflow(javax.servlet.http.HttpSession session,
String workflowName)
session - The HttpSesion to get and save the workflow to/fromworkflowName - The name of the workflow scope to save the input under.
public static void setConfirmation(javax.servlet.http.HttpSession session,
String key)
session - The servlet session objectkey - the message resource key
public static void setConfirmation(javax.servlet.http.HttpSession session,
String key,
Object value0)
session - The servlet session objectkey - the message resource keyvalue0 - the replacement value
public static void unsetConfirmation(javax.servlet.http.HttpSession session,
String key)
public static void setError(javax.servlet.http.HttpSession session,
String key)
session - The servlet session objectkey - the message resource key
public static void setError(javax.servlet.http.HttpSession session,
String key,
String property)
session - The servlet session objectkey - the message resource keyproperty - the form property for which the error occurred
public static void setError(javax.servlet.http.HttpSession session,
String key,
Object value0)
session - The servlet session objectkey - the message resource keyvalue0 - the replacement value
public static void setError(javax.servlet.http.HttpSession session,
String key,
Object value0,
String property)
session - The servlet session objectkey - the message resource keyvalue0 - the replacement valueproperty - the form property for which the error occurredpublic static void unsetError(javax.servlet.http.HttpSession session)
public static void moveAttribute(javax.servlet.http.HttpServletRequest request,
String key)
request - The request to move the attribute to.key - Key indicating the attribute to move scope.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||