|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bea.p13n.entitlements.common.EntitlementHelper
public class EntitlementHelper
Provides helper methods for constructing entitlements.
| Field Summary | |
|---|---|
static String |
CTXT_HNDLR
|
static String |
ENT_REQUEST
|
| Constructor Summary | |
|---|---|
EntitlementHelper()
|
|
| Method Summary | |
|---|---|
static com.bea.p13n.entitlements.common.EntitlementRequest |
createEntitlementRequest(javax.servlet.http.HttpServletRequest anHttpRequest)
Creates an EntitlementRequest and caches it on the HttpRequest, or returns the currently cached EntitlementRequest. |
static P13nContextHandler |
createP13nContextHandler(com.bea.p13n.entitlements.common.EntitlementRequest entRequest)
Returns a P13nContextHandler for the current user. |
static P13nContextHandler |
createP13nContextHandler(javax.servlet.http.HttpServletRequest httpRequest)
Returns a P13nContextHandler for the current user. |
static P13nContextHandler |
createP13nContextHandler(String aWebAppName)
Returns a P13nContextHandler for the current user,
based on a ProfileWrapper, only. |
static com.bea.p13n.entitlements.common.EntitlementRequest |
getEntitlementRequest(javax.servlet.http.HttpServletRequest anHttpRequest)
Returns the current EntitlementRequest associated with an HttpServletRequest. |
static P13nContextHandler |
getP13nContextHandler(javax.servlet.http.HttpServletRequest anHttpRequest)
Returns the current P13nContextHandler associated with an HttpServletRequest. |
static Request |
getP13nRequest(javax.servlet.http.HttpServletRequest anHttpRequest)
Returns the P13n Request associated with an HttpServletRequest |
static void |
setContextAttribute(com.bea.p13n.entitlements.common.EntitlementRequest entRequest,
int scope,
String attrName,
Object attrValue)
|
static void |
setContextAttribute(javax.servlet.http.HttpServletRequest request,
int scope,
String attrName,
Object attrValue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ENT_REQUEST
public static final String CTXT_HNDLR
| Constructor Detail |
|---|
public EntitlementHelper()
| Method Detail |
|---|
public static com.bea.p13n.entitlements.common.EntitlementRequest createEntitlementRequest(javax.servlet.http.HttpServletRequest anHttpRequest)
throws com.bea.p13n.entitlements.common.EntitlementsException
anHttpRequest - The current Http request
EntitlementRequest instance.
EntitlementsException - if an error occurrs during creation of
an EntitlementRequest.public static P13nContextHandler createP13nContextHandler(com.bea.p13n.entitlements.common.EntitlementRequest entRequest)
P13nContextHandler for the current user.
public static P13nContextHandler createP13nContextHandler(javax.servlet.http.HttpServletRequest httpRequest)
throws com.bea.p13n.entitlements.common.EntitlementsException
P13nContextHandler for the current user.
com.bea.p13n.entitlements.common.EntitlementsExceptionpublic static P13nContextHandler createP13nContextHandler(String aWebAppName)
P13nContextHandler for the current user,
based on a ProfileWrapper, only. This method allows creation of the context
handler without an HttpRequest. However, the evaluation of expression-based roles based on
such a context can only include profile-based attributes. That is, no time/date, request,
or session-based attributes can exist in the role expression.
If the current user is not authenticated, an anonymous profile will be used.
aWebAppName - The webapp name of the caller. If no webapp-scoped roles are in-scope for the
calling application, this field may be null.
public static P13nContextHandler getP13nContextHandler(javax.servlet.http.HttpServletRequest anHttpRequest)
throws com.bea.p13n.entitlements.common.EntitlementsException
P13nContextHandler associated with an HttpServletRequest.
anHttpRequest - The Http request
P13nContextHandler, else creates a new one..
com.bea.p13n.entitlements.common.EntitlementsExceptionpublic static com.bea.p13n.entitlements.common.EntitlementRequest getEntitlementRequest(javax.servlet.http.HttpServletRequest anHttpRequest)
EntitlementRequest associated with an HttpServletRequest.
anHttpRequest - The Http request
EntitlementRequest, else creates a new one.public static Request getP13nRequest(javax.servlet.http.HttpServletRequest anHttpRequest)
Request associated with an HttpServletRequest
anHttpRequest - The Http request
Request
public static void setContextAttribute(javax.servlet.http.HttpServletRequest request,
int scope,
String attrName,
Object attrValue)
public static void setContextAttribute(com.bea.p13n.entitlements.common.EntitlementRequest entRequest,
int scope,
String attrName,
Object attrValue)
|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||