Class ContextUtils
- java.lang.Object
 - 
- com.atlassian.confluence.velocity.ContextUtils
 
 
- 
public final class ContextUtils extends Object
Utilities for manipulating Velocity contexts. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidputAll(org.apache.velocity.context.Context dest, org.apache.velocity.context.Context source)Copies entries from a sourceContextto a destinationContext.static Map<String,Object>toMap(org.apache.velocity.context.Context context)Convert a velocityContextinto a map. 
 - 
 
- 
- 
Method Detail
- 
toMap
public static Map<String,Object> toMap(org.apache.velocity.context.Context context)
Convert a velocityContextinto a map.Uses
AbstractContext.getKeys()so is vulnerable to the same problems described withputAll(Context, Context)- Parameters:
 context- Context to convert into a map- Returns:
 - map of context values
 
 
- 
putAll
public static void putAll(org.apache.velocity.context.Context dest, org.apache.velocity.context.Context source)Copies entries from a sourceContextto a destinationContext.This method is inherently unreliable because the implementation of AbstractContext.getKeys() used in other Velocity contexts doesn't delegate correctly. Because of this only values present in the outmost context of the source are likely to be copied.
- Parameters:
 dest- Destination contextsource- Context to
 
 - 
 
 -