|
Oracle | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.bea.console.utils.HandleUtils
public abstract class HandleUtils
Contains methods to support the use of handles, which are objects that
implement the Handle interface and are used
to correlate a org.apache.struts.action.ActionForm bean with
an underlying artifact that the bean represents, such as an MBean.
| Field Summary | |
|---|---|
static int |
MAX_SESSION_HANDLES
|
static String |
SESSION_TYPED_HANDLES
|
| Constructor Summary | |
|---|---|
HandleUtils()
|
|
| Method Summary | |
|---|---|
static void |
clearHandlesInSession(HttpServletRequest request)
Clears any existing handles from session context. |
static Handle |
getHandleContext(ActionForm actionForm,
HttpServletRequest request,
String objectType)
Searches an HttpServletRequest for an
ActionForm that contains a handle object whose
ObjectType property
contains the specified value. |
static Handle |
getHandleContextFromForm(ActionForm actionForm,
String objectType)
Searches in the HttpSession for an
ActionForm that contains a handle object whose
ObjectType property
contains the specified value. |
static Handle |
getHandleContextFromRequest(HttpServletRequest request,
String objectType)
Searches in the HttpServletRequest for the
most recent handle object whose
ObjectType property
contains the specified value. |
static Handle |
getHandleContextFromSession(HttpServletRequest request,
String objectType)
Searches in the session for the most recent handle object whose ObjectType property
contains the specified value. |
static void |
setHandleContextInSession(HttpServletRequest request,
Handle handle)
Stores the handle in the session context if it isn't already the most recent handle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SESSION_TYPED_HANDLES
public static final int MAX_SESSION_HANDLES
| Constructor Detail |
|---|
public HandleUtils()
| Method Detail |
|---|
public static Handle getHandleContext(ActionForm actionForm,
HttpServletRequest request,
String objectType)
Searches an HttpServletRequest for an
ActionForm that contains a handle object whose
ObjectType property
contains the specified value.
If this method does not find a match in the specified
ActionForm, it searches the handle object most recently
stored in the javax.servlet.http.HttpSession.
For example, if you specify getHandleContext(actionForm1,
request1, "myAppMBean"),
the method searces in request1 for actionForm1. If it finds actionForm1, it
searches actionForm1 for a handle object whose ObjectType
property contains "myAppMBean". If it does not find actionForm1, it
searches in the session context for a handle object whose
ObjectType property contains "myAppMBean".
actionForm - an org.apache.struts.action.ActionFormrequest - a javax.servlet.http.HttpServletRequestobjectType - a String describing an ObjectType value. This can be an explicit
value (like "myAppMBean"), "*" (which matches any ObjectType
value), or an expression like "typea|typeb|typec"
public static Handle getHandleContextFromForm(ActionForm actionForm,
String objectType)
Searches in the HttpSession for an
ActionForm that contains a handle object whose
ObjectType property
contains the specified value.
For example, if you specify
getHandleContext(actionForm1, "myAppMBean"), the method
searces in the session for actionForm1. If it finds actionForm1, it
searches actionForm1 for a handle object whose ObjectType
property contains "myAppMBean".
actionForm - an org.apache.struts.action.ActionFormobjectType - a String describing an ObjectType value. This can be an explicit
value (like "myAppMBean"), "*" (which matches any ObjectType
value), or an expression like "typea|typeb|typec"
public static Handle getHandleContextFromRequest(HttpServletRequest request,
String objectType)
Searches in the HttpServletRequest for the
most recent handle object whose
ObjectType property
contains the specified value.
request - a javax.servlet.http.HttpServletRequestobjectType - a String describing an ObjectType value. This can be an explicit
value (like "myAppMBean"), "*" (which matches any ObjectType
value), or an expression like "typea|typeb|typec"
public static void clearHandlesInSession(HttpServletRequest request)
request - the current HttpServletRequest
public static Handle getHandleContextFromSession(HttpServletRequest request,
String objectType)
Searches in the session for the
most recent handle object whose
ObjectType property
contains the specified value.
request - a javax.servlet.http.HttpServletRequestobjectType - a String describing an ObjectType value. This can be an explicit
value (like "myAppMBean"), "*" (which matches any ObjectType
value), or an expression like "typea|typeb|typec"
public static void setHandleContextInSession(HttpServletRequest request,
Handle handle)
request - an HttpServletRequesthandle - a Handle to a management artifact
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs103 Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||