|
Copyright © 2006 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.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
The handler within the context. |
protected HttpServletRequest |
request
The request within the context. |
Constructor Summary | |
---|---|
ContentContext()
Creates a new ContentContext object. |
|
ContentContext(HttpServletRequest request)
Create a ContentContext object. |
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 parameter key must be non-null. |
HttpServletRequest |
getRequest()
Get the request contained within this object. |
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 |
setParameter(ContextKey key,
Serializable value)
Stores the specified parameter key and value in the ContentContext object. |
ContentContext |
setRequest(HttpServletRequest request)
Set the request for this object. |
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 HttpServletRequest request
protected transient P13nContextHandler handler
Constructor Detail |
---|
public ContentContext()
public ContentContext(HttpServletRequest request)
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()
public HttpServletRequest getRequest()
Request
. In that case,
certain methods in the returned Request object might not be supported.
public ContentContext setRequest(HttpServletRequest request)
request
-
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
- nfailes.fpublic ContentContext setParameter(ContextKey key, Serializable value)
Immutable keys can only be set once -- an attempt to set an immutable key once it exists will fail.
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)
key
- The key for the parameter value to retrieve.
public boolean hasParameter(ContextKey key)
key
- The parameter key. The key must be non-null.
public ContentContext removeParameter(ContextKey key)
key
- The parameter key. The key must be non-null.
public Set<ContextKey> parameterKeySet()
public String toString()
toString
in class Object
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |