org.apache.cocoon.components.treeprocessor.variables
Class VariableResolverFactory

java.lang.Object
  extended by org.apache.cocoon.components.treeprocessor.variables.VariableResolverFactory

public class VariableResolverFactory
extends Object

Version:
CVS $Id: VariableResolverFactory.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Constructor Summary
VariableResolverFactory()
           
 
Method Summary
static VariableResolver getResolver(String expression, ComponentManager manager)
          Deprecated. use the version with ServiceManager
static VariableResolver getResolver(String expression, ServiceManager manager)
          Get a resolver for a given expression.
static boolean needsResolve(String expression)
          Does an expression need resolving (i.e. contain {...} patterns) ?
static void setDisposableCollector(List collector)
          Set the thread-local list where all created resolvers that need to be disposed will be collected.
static String unescape(String expression)
          Unescape an expression that doesn't need to be resolved, but may contain escaped '{' characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableResolverFactory

public VariableResolverFactory()
Method Detail

setDisposableCollector

public static void setDisposableCollector(List collector)
Set the thread-local list where all created resolvers that need to be disposed will be collected.

The purpose of collecting resolvers is to avoid manual release (or lack thereof) that requires most ProcessingNodes to implement Disposable.


needsResolve

public static boolean needsResolve(String expression)
Does an expression need resolving (i.e. contain {...} patterns) ?


unescape

public static String unescape(String expression)
Unescape an expression that doesn't need to be resolved, but may contain escaped '{' characters.

Parameters:
expression - the expression to unescape.
Returns:
the unescaped result, or expression if unescaping isn't necessary.

getResolver

public static VariableResolver getResolver(String expression,
                                           ComponentManager manager)
                                    throws PatternException
Deprecated. use the version with ServiceManager

Get a resolver for a given expression. Chooses the most efficient implementation depending on expression.

Throws:
PatternException

getResolver

public static VariableResolver getResolver(String expression,
                                           ServiceManager manager)
                                    throws PatternException
Get a resolver for a given expression. Chooses the most efficient implementation depending on expression.

Throws:
PatternException


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.