com.bea.content
Interface IContentContext

All Superinterfaces
Serializable
All Known Implementing Classes:
ContentContext

public interface IContentContext
extends Serializable

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


Method Summary
 IContentContext copy()
          Create a copy of this object.
 Object getParameter(ContextKey key)
          Retrieves the specified parameter value.
 boolean hasParameter(ContextKey key)
          Returns true if the specified parameter is set.
 Set<ContextKey> parameterKeySet()
           
 IContentContext removeParameter(ContextKey key)
          Remove the specified parameter, if it exists and is not mutable.
 IContentContext setParameter(ContextKey key, Serializable value)
          Stores the specified parameter key and value in the IContentContext object.
 

Method Detail

copy

IContentContext copy()
Create a copy of this object.


setParameter

IContentContext setParameter(ContextKey key,
                             Serializable value)
Stores the specified parameter key and value in the IContentContext object. If the specified parameter already exists in the IContentContext and the parameter key is mutable, the existing value will be replaced with the new value.

Immutable keys can only be set once -- an attempt to set an immutable key once it exists will fail.

Parameters
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.
Returns
The updated IContentContext
See Also
ContentListKeys

getParameter

Object getParameter(ContextKey key)
Retrieves the specified parameter value. Key must be non-null. Returns null if parameter value not found.

Parameters
key - The key for the parameter value to retrieve.
Returns
The parameter.

hasParameter

boolean hasParameter(ContextKey key)
Returns true if the specified parameter is set.

Parameters
key - The parameter key. The key must be non-null.
Returns
true if the parameter is set.

removeParameter

IContentContext removeParameter(ContextKey key)
Remove the specified parameter, if it exists and is not mutable.

Parameters
key - The parameter key. The key must be non-null.
Returns
The updated IContentContext.

parameterKeySet

Set<ContextKey> parameterKeySet()


Copyright © 2011, Oracle. All rights reserved.