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

java.lang.Object
  extended byorg.apache.cocoon.components.treeprocessor.variables.VariableResolver
      extended byorg.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver
All Implemented Interfaces:
Disposable

public final class PreparedVariableResolver
extends VariableResolver
implements Disposable

Prepared implementation of VariableResolver for fast evaluation.

Version:
$Id: PreparedVariableResolver.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token CLOSE_TOKEN
           
protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token COLON_TOKEN
           
protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token EMPTY_TOKEN
           
protected  boolean needsMapStack
           
protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token OPEN_TOKEN
           
protected  List tokens
           
 
Fields inherited from class org.apache.cocoon.components.treeprocessor.variables.VariableResolver
originalExpr, ROLE
 
Constructor Summary
PreparedVariableResolver()
           
PreparedVariableResolver(String expression, ServiceManager manager)
           
 
Method Summary
 void dispose()
           
 ServiceManager getManager()
           
protected  org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token getNewModuleToken(String moduleName)
           
protected  org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token getNewVariableToken(String variable)
           
 String resolve(InvokeContext context, Map objectModel)
          Resolve all {...} patterns using the values given in the list of maps and the object model.
 void setExpression(String expr)
           
 void setManager(ServiceManager manager)
           
 
Methods inherited from class org.apache.cocoon.components.treeprocessor.variables.VariableResolver
buildMap, buildParameters, equals, hashCode, resolve, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COLON_TOKEN

protected static final org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token COLON_TOKEN

OPEN_TOKEN

protected static final org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token OPEN_TOKEN

CLOSE_TOKEN

protected static final org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token CLOSE_TOKEN

EMPTY_TOKEN

protected static final org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token EMPTY_TOKEN

tokens

protected List tokens

needsMapStack

protected boolean needsMapStack
Constructor Detail

PreparedVariableResolver

public PreparedVariableResolver()

PreparedVariableResolver

public PreparedVariableResolver(String expression,
                                ServiceManager manager)
                         throws org.apache.cocoon.sitemap.PatternException
Method Detail

getManager

public ServiceManager getManager()

setManager

public void setManager(ServiceManager manager)

setExpression

public void setExpression(String expr)
                   throws org.apache.cocoon.sitemap.PatternException
Specified by:
setExpression in class VariableResolver
Throws:
org.apache.cocoon.sitemap.PatternException

getNewVariableToken

protected org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token getNewVariableToken(String variable)

getNewModuleToken

protected org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token getNewModuleToken(String moduleName)
                                                                                                         throws org.apache.cocoon.sitemap.PatternException
Throws:
org.apache.cocoon.sitemap.PatternException

resolve

public final String resolve(InvokeContext context,
                            Map objectModel)
                     throws org.apache.cocoon.sitemap.PatternException
Description copied from class: VariableResolver
Resolve all {...} patterns using the values given in the list of maps and the object model.

Specified by:
resolve in class VariableResolver
Throws:
org.apache.cocoon.sitemap.PatternException

dispose

public final void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.