com.atlassian.confluence.setup.webwork
Class CompositeContext
java.lang.Object
com.atlassian.confluence.setup.webwork.CompositeContext
- All Implemented Interfaces:
- org.apache.velocity.context.Context
public class CompositeContext
- extends java.lang.Object
- implements org.apache.velocity.context.Context
Simple immutable composite Velocity Context
implementation that delegates
to a collection of other contexts. The order of the contexts is important
as it checks them in iteration order.
Note: If passed to Velocity it should be wrapped in a VelocityContext
or other chained context that keeps its own local map for mutability as Velocity
likes to put(String, Object)
stuff in the passed in context.
Method Summary |
boolean |
containsKey(java.lang.Object key)
|
java.lang.Object |
get(java.lang.String key)
|
java.lang.Object[] |
getKeys()
Union of all keys for all contexts. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
|
java.lang.Object |
remove(java.lang.Object key)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface org.apache.velocity.context.Context
get
public java.lang.Object get(java.lang.String key)
- Specified by:
get
in interface org.apache.velocity.context.Context
getKeys
public java.lang.Object[] getKeys()
- Union of all keys for all contexts.
- Specified by:
getKeys
in interface org.apache.velocity.context.Context
put
public java.lang.Object put(java.lang.String key,
java.lang.Object value)
- Specified by:
put
in interface org.apache.velocity.context.Context
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interface org.apache.velocity.context.Context
Copyright © 2003-2014 Atlassian. All Rights Reserved.