|
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.ContextKey
public class ContextKey
Context keys are used to store and retrieve context values in the class ContentContext. Context keys may have an associated type defined. If the type is specified, then when the key/value pair is stored, the value will be validated against the specified context key type. Context keys may be marked as mutable, which means that the context value can be changed and removed. They can also be immutable, in which case setting or removing a context value is not allowed. Context keys may be public, which means that the key appears when retrieving the list of context keys. They can also be private, in which case they do not appear in the list of keys. This class defines both the ContextKey type and some ContextKey key objects. Other context keys (of type ContextKey) can also be created (elsewhere) and used. all context key objects need not be created here.
Constructor Summary | |
---|---|
ContextKey(String keyName,
Class<?> expectedType,
boolean isPublic,
boolean isMutable)
Create a context key |
Method Summary | |
---|---|
boolean |
equals(Object o)
Tests this ContextKey to that passed in for equality. |
Class<?> |
getExpectedType()
Return the expected type. |
String |
getKeyName()
Return the key name. |
int |
hashCode()
Generates a hash code for this ContextKey. |
boolean |
isMutable()
Return true if the key is mutable. |
boolean |
isPublic()
Return true if the key is public. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContextKey(String keyName, Class<?> expectedType, boolean isPublic, boolean isMutable)
expectedType
- the expected type of key value (optional - can be null)isPublic
- if the key should be listed when retrieving the set of keysisMutable
- if the value can be changed or removed once it is setMethod Detail |
---|
public String getKeyName()
public Class<?> getExpectedType()
public boolean isPublic()
public boolean isMutable()
public boolean equals(Object o)
equals
in class Object
o
- the ContextKey to test for equality.
public int hashCode()
hashCode
in class Object
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 |