|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.ui.util.SessionUtils
public class SessionUtils
Utilities class that provides convenience methods for operating on bizapp objects.
Constructor Summary | |
---|---|
SessionUtils()
|
Method Summary | |
---|---|
static void |
addToList(javax.servlet.http.HttpSession session,
java.lang.String attr,
java.lang.Integer[] ids)
|
static void |
addToList(javax.servlet.http.HttpSession session,
java.lang.String attr,
java.util.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,
java.lang.String attr,
java.lang.String[] ids)
|
static void |
addToListStr(javax.servlet.http.HttpSession session,
java.lang.String attr,
java.util.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,
java.lang.String workflowName)
Remove any old workflows |
static int |
countWorkflow(javax.servlet.http.HttpSession session,
java.lang.String workflowName)
Returns the size of a workflow's stack. |
static java.lang.Integer |
getIntegerAttribute(javax.servlet.http.HttpSession session,
java.lang.String key,
java.lang.Integer defValue)
|
static java.lang.Integer[] |
getList(javax.servlet.http.HttpSession session,
java.lang.String attr)
Retrieve the array of pending ids stored under the named session attribute. |
static java.util.List |
getListAsList(javax.servlet.http.HttpSession session,
java.lang.String attr)
Retrieve the List of pending ids stored under the named
session attribute. |
static java.util.List |
getListAsListStr(javax.servlet.http.HttpSession session,
java.lang.String attr)
Retrieve the List of pending ids stored under the named
session attribute. |
static java.lang.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 java.lang.Boolean |
getReturnPathIgnoredForOk(javax.servlet.http.HttpSession session)
Retrieve wether the "return path" should be paid attention to for new. |
static java.lang.String |
getStringAttribute(javax.servlet.http.HttpSession session,
java.lang.String key,
java.lang.String defValue)
|
static WebUser |
getWebUser(javax.servlet.http.HttpSession session)
Retrieve the cached WebUser representing the user
interacting with server. |
static void |
moveAttribute(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
Move the attribute from the session to request scope. |
static java.lang.String |
popWorkflow(javax.servlet.http.HttpSession session,
java.lang.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,
java.lang.String workflowName)
Takes the current returnPath and pushes it onto the workflow's stack. |
static void |
removeFromList(javax.servlet.http.HttpSession session,
java.lang.String attr,
java.lang.Integer[] ids)
|
static void |
removeFromList(javax.servlet.http.HttpSession session,
java.lang.String attr,
java.util.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,
java.lang.String attr,
java.lang.String[] ids)
|
static void |
removeFromListStr(javax.servlet.http.HttpSession session,
java.lang.String attr,
java.util.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,
java.lang.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,
java.lang.String key)
Set a confirmation message upon completion of a user action. |
static void |
setConfirmation(javax.servlet.http.HttpSession session,
java.lang.String key,
java.lang.Object value0)
Set a confirmation message with a replacement value upon completion of a user action. |
static void |
setError(javax.servlet.http.HttpSession session,
java.lang.String key)
Set an error message when a user action fails with a user-level error. |
static void |
setError(javax.servlet.http.HttpSession session,
java.lang.String key,
java.lang.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,
java.lang.String key,
java.lang.Object value0,
java.lang.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,
java.lang.String key,
java.lang.String property)
Set an error message when a user action fails with a user-level error. |
static void |
setReturnPath(javax.servlet.http.HttpSession session,
java.lang.String path)
Set the "returnPath", the possible point of origin for a workflow. |
static void |
setReturnPath(javax.servlet.http.HttpSession session,
java.lang.String path,
java.lang.Boolean ignore)
Set the "returnPath," the possible point of origin for a worklow |
static void |
unsetConfirmation(javax.servlet.http.HttpSession session,
java.lang.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 java.lang.Integer getIntegerAttribute(javax.servlet.http.HttpSession session, java.lang.String key, java.lang.Integer defValue)
key
- the attribute key requesteddefValue
- the value to return if the key returns a null value
public static java.lang.String getStringAttribute(javax.servlet.http.HttpSession session, java.lang.String key, java.lang.String defValue)
key
- the attribute key requesteddefValue
- the value to retun if the value is null or
cannot be cast to a String
public static WebUser getWebUser(javax.servlet.http.HttpSession session)
WebUser
representing the user
interacting with server.
session
- the http sessionpublic static java.lang.Integer[] getList(javax.servlet.http.HttpSession session, java.lang.String attr)
session
- the http sessionattr
- the name of the session attributepublic static java.util.List getListAsList(javax.servlet.http.HttpSession session, java.lang.String attr)
List
of pending ids stored under the named
session attribute.
session
- the http sessionattr
- the name of the session attributepublic static java.util.List getListAsListStr(javax.servlet.http.HttpSession session, java.lang.String attr)
List
of pending ids stored under the named
session attribute.
session
- the http sessionattr
- the name of the session attributepublic static void addToList(javax.servlet.http.HttpSession session, java.lang.String attr, java.util.List ids)
session
- the http sessionattr
- the name of the session attributeids
- the ids to be addedpublic static void addToList(javax.servlet.http.HttpSession session, java.lang.String attr, java.lang.Integer[] ids)
public static void addToListStr(javax.servlet.http.HttpSession session, java.lang.String attr, java.util.List ids)
session
- the http sessionattr
- the name of the session attributeids
- the ids to be addedpublic static void addToList(javax.servlet.http.HttpSession session, java.lang.String attr, java.lang.String[] ids)
public static void removeFromList(javax.servlet.http.HttpSession session, java.lang.String attr, java.util.List ids)
session
- the http sessionattr
- the name of the session attributeids
- the ids to be removedpublic static void removeFromList(javax.servlet.http.HttpSession session, java.lang.String attr, java.lang.Integer[] ids)
public static void removeFromListStr(javax.servlet.http.HttpSession session, java.lang.String attr, java.util.List ids)
session
- the http sessionattr
- the name of the session attributeids
- the ids to be removedpublic static void removeFromList(javax.servlet.http.HttpSession session, java.lang.String attr, java.lang.String[] ids)
public static void removeList(javax.servlet.http.HttpSession session, java.lang.String attr)
session
- the http sessionattr
- the name of the session attributepublic static java.lang.String getReturnPath(javax.servlet.http.HttpSession session)
session
- the http sessionpublic static void setReturnPath(javax.servlet.http.HttpSession session, java.lang.String path)
session
- the http sessionpath
- the return pathpublic static void setReturnPath(javax.servlet.http.HttpSession session, java.lang.String path, java.lang.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 java.lang.Boolean getReturnPathIgnoredForOk(javax.servlet.http.HttpSession session)
session
- the http session
public static void unsetReturnPathIgnoredForOk(javax.servlet.http.HttpSession session)
session
- the http sessionpublic static void clearWorkflow(javax.servlet.http.HttpSession session, java.lang.String workflowName)
session
- mapping
- workflowName
- public static void pushWorkflow(javax.servlet.http.HttpSession session, org.apache.struts.action.ActionMapping mapping, java.lang.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 java.lang.String popWorkflow(javax.servlet.http.HttpSession session, java.lang.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 int countWorkflow(javax.servlet.http.HttpSession session, java.lang.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, java.lang.String key)
session
- The servlet session objectkey
- the message resource keypublic static void setConfirmation(javax.servlet.http.HttpSession session, java.lang.String key, java.lang.Object value0)
session
- The servlet session objectkey
- the message resource keyvalue0
- the replacement valuepublic static void unsetConfirmation(javax.servlet.http.HttpSession session, java.lang.String key)
public static void setError(javax.servlet.http.HttpSession session, java.lang.String key)
session
- The servlet session objectkey
- the message resource keypublic static void setError(javax.servlet.http.HttpSession session, java.lang.String key, java.lang.String property)
session
- The servlet session objectkey
- the message resource keyproperty
- the form property for which the error occurredpublic static void setError(javax.servlet.http.HttpSession session, java.lang.String key, java.lang.Object value0)
session
- The servlet session objectkey
- the message resource keyvalue0
- the replacement valuepublic static void setError(javax.servlet.http.HttpSession session, java.lang.String key, java.lang.Object value0, java.lang.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, java.lang.String key)
request
- The request to move the attribute to.key
- Key indicating the attribute to move scope.
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |