Class EvaluateContext

  • All Implemented Interfaces:
    Context, InternalContextAdapter, InternalEventContext, InternalHousekeepingContext, InternalWrapperContext

    public class EvaluateContext
    extends ChainedInternalContextAdapter
    Deprecated.
    Will be removed in 2.0
    This is a special, internal-use-only context implementation to be used for the #evaluate directive. We use this context to chain the existing context, preventing any changes from impacting the parent context. By separating this context into a separate class it also allows for the future possibility of changing the context behavior for the #evaluate directive. Note that the context used to store values local to #evaluate() is user defined but defaults to VelocityContext.
    Since:
    1.6
    Version:
    $Id: EvaluateContext.java 898032 2010-01-11 19:51:03Z nbubna $
    • Field Detail

      • localContext

        Context localContext
        Deprecated.
        container for any local items
    • Constructor Detail

    • Method Detail

      • initContext

        private void initContext​(RuntimeServices rsvc)
        Deprecated.
        Initialize the context based on user-configured class
        Parameters:
        rsvc -
      • put

        public java.lang.Object put​(java.lang.String key,
                                    java.lang.Object value)
        Deprecated.
        Put method also stores values in local scope
        Specified by:
        put in interface Context
        Overrides:
        put in class ChainedInternalContextAdapter
        Parameters:
        key - name of item to set
        value - object to set to key
        Returns:
        old stored object
      • get

        public java.lang.Object get​(java.lang.String key)
        Deprecated.
        Retrieves from local or global context.
        Specified by:
        get in interface Context
        Overrides:
        get in class ChainedInternalContextAdapter
        Parameters:
        key - name of item to get
        Returns:
        stored object or null
      • remove

        public java.lang.Object remove​(java.lang.Object key)
        Deprecated.
        Description copied from interface: Context
        Removes the value associated with the specified key from the context.
        Specified by:
        remove in interface Context
        Overrides:
        remove in class ChainedInternalContextAdapter
        Parameters:
        key - The name of the value to remove.
        Returns:
        The value that the key was mapped to, or null if unmapped.
        See Also:
        Context.remove(java.lang.Object)