|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.content.ContentContext
public class ContentContext
Holds contextual information related to the current CM call in a loosely-structured manner. Contextual information is expressed via (ContextKey key, Object value ) pairs agreed upon by the client and low-level code. It's important that both the code setting the contextual information and the code using the contextual information agree upon the key and the type of object which may be present. Some well-known context keys are defined in com.bea.content.ContextKey
Field Summary | |
---|---|
protected P13nContextHandler |
handler
Deprecated This variable will always be null, use getP13nContextHandler() instead. |
protected javax.servlet.http.HttpServletRequest |
request
Deprecated This variable will always be null, use getRequest() instead. The request object is no longer stored in this class. If the old behavior of setting/storing the request in ContentContext is required, see USE_DEPRECATED_BEHAVIOR . |
static ContextKey |
USE_DEPRECATED_BEHAVIOR
Deprecated |
Constructor Summary | |
---|---|
ContentContext()
Creates a new ContentContext object. |
|
ContentContext(javax.servlet.http.HttpServletRequest request)
Deprecated Using this constructor will not set the request, as it's now being set by PortalServletFilter and stored elsewhere. The request can be accessed from getRequest(). If the old behavior of setting/storing the request in ContentContext is required, see USE_DEPRECATED_BEHAVIOR .
Note, that this boolean needs to be set on this object before setting the request, thus the request will
have to be set using setRequest(request) after setting the boolean to true. |
Method Summary | |
---|---|
ContentContext |
copy()
Create a copy of this object. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
com.bea.p13n.entitlements.common.EntitlementRequest |
getEntitlementRequest()
Return the entitlement request object which is created in conjunction with the HttpServletRequest. |
P13nContextHandler |
getP13nContextHandler()
Return the P13n context handler for this context. |
Object |
getParameter(ContextKey key)
Retrieves the specified parameter value. |
javax.servlet.http.HttpServletRequest |
getRequest()
Get the current request. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
hasParameter(ContextKey key)
Returns true if the specified parameter is set. |
Set<ContextKey> |
parameterKeySet()
Returns all public parameter keys. |
ContentContext |
removeParameter(ContextKey key)
Remove the specified parameter, if it exists and is not mutable. |
ContentContext |
setP13nRequest(javax.servlet.http.HttpServletRequest p13nrequest,
javax.servlet.http.HttpServletRequest request)
Set the request for this object, using a p13n Request, except use the real request for the entitlement request. |
ContentContext |
setParameter(ContextKey key,
Serializable value)
Stores the specified parameter key and value in the IContentContext object. |
ContentContext |
setRequest(javax.servlet.http.HttpServletRequest request)
Deprecated This does nothing, as the request object is no longer stored in this class. If the old behavior of setting/storing the request in ContentContext is required, see USE_DEPRECATED_BEHAVIOR . |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient javax.servlet.http.HttpServletRequest request
USE_DEPRECATED_BEHAVIOR
.
public static final ContextKey USE_DEPRECATED_BEHAVIOR
Content contentContext = new ContentContext();
contentContext.setParameter(ContentContext.USE_DEPRECATED_BEHAVIOR, new Boolean(true));
contentContext.setRequest(request);
protected transient P13nContextHandler handler
Constructor Detail |
---|
public ContentContext()
public ContentContext(javax.servlet.http.HttpServletRequest request)
USE_DEPRECATED_BEHAVIOR
.
Note, that this boolean needs to be set on this object before setting the request, thus the request will
have to be set using setRequest(request) after setting the boolean to true.
request
- The http request object.Method Detail |
---|
public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.hashCode()
public ContentContext copy()
copy
in interface IContentContext
public javax.servlet.http.HttpServletRequest getRequest()
SerializableRequest
. In that case,
certain methods in the returned Request object might not be supported.
To enable deprecated behavior see USE_DEPRECATED_BEHAVIOR
.
public ContentContext setRequest(javax.servlet.http.HttpServletRequest request)
USE_DEPRECATED_BEHAVIOR
.
request
- The request to set.
RepositoryRuntimeException
- if an error happenspublic ContentContext setP13nRequest(javax.servlet.http.HttpServletRequest p13nrequest, javax.servlet.http.HttpServletRequest request)
p13nrequest
- The p13nRequest to set.request
- THe request to set.
RepositoryRuntimeException
- if an error happenspublic com.bea.p13n.entitlements.common.EntitlementRequest getEntitlementRequest()
public P13nContextHandler getP13nContextHandler() throws com.bea.p13n.entitlements.common.EntitlementsException
com.bea.p13n.entitlements.common.EntitlementsException
public ContentContext setParameter(ContextKey key, Serializable value)
IContentContext
Immutable keys can only be set once -- an attempt to set an immutable key once it exists will fail.
setParameter
in interface IContentContext
key
- The parameter key. The key must be non-null.value
- The parameter value. A null parameter value has the same effect as removing the parameter.
ContentListKeys
public Object getParameter(ContextKey key)
IContentContext
getParameter
in interface IContentContext
key
- The key for the parameter value to retrieve.
public boolean hasParameter(ContextKey key)
IContentContext
hasParameter
in interface IContentContext
key
- The parameter key. The key must be non-null.
public ContentContext removeParameter(ContextKey key)
IContentContext
removeParameter
in interface IContentContext
key
- The parameter key. The key must be non-null.
public Set<ContextKey> parameterKeySet()
parameterKeySet
in interface IContentContext
public String toString()
toString
in class Object
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |