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

java.lang.Object
  |
  +--org.apache.cocoon.components.treeprocessor.variables.VariableResolver
Direct Known Subclasses:
NOPVariableResolver, PreparedVariableResolver

public abstract class VariableResolver
extends java.lang.Object

Utility class for handling {...} pattern substitutions in sitemap statements.

Version:
CVS $Id: VariableResolver.java,v 1.3.2.1 2002/11/25 21:52:01 sylvain Exp $
Author:
Sylvain Wallez

Field Summary
static java.util.Map EMPTY_MAP
           
protected  java.lang.String originalExpr
           
 
Constructor Summary
protected VariableResolver(java.lang.String expr)
           
 
Method Summary
static java.util.Map buildMap(java.util.Map expressions, InvokeContext context, java.util.Map objectModel)
          Build a Map from a Map of named ListOfMapResolvers and a list of Maps used for resolution.
static org.apache.avalon.framework.parameters.Parameters buildParameters(java.util.Map expressions, InvokeContext context, java.util.Map objectModel)
          Build a Parameters object from a Map of named VariableResolvers and a list of Maps used for resolution.
 boolean equals(java.lang.Object object)
          Compare two VariableResolvers
 int hashCode()
          generate HashCode needed to determine uniqueness within hashtables
abstract  java.lang.String resolve(InvokeContext context, java.util.Map objectModel)
          Resolve all {...} patterns using the values given in the list of maps and the object model.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_MAP

public static final java.util.Map EMPTY_MAP

originalExpr

protected final java.lang.String originalExpr
Constructor Detail

VariableResolver

protected VariableResolver(java.lang.String expr)
Method Detail

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Compare two VariableResolvers

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
generate HashCode needed to determine uniqueness within hashtables

Overrides:
hashCode in class java.lang.Object

resolve

public abstract java.lang.String resolve(InvokeContext context,
                                         java.util.Map objectModel)
                                  throws PatternException
Resolve all {...} patterns using the values given in the list of maps and the object model.

PatternException

buildParameters

public static org.apache.avalon.framework.parameters.Parameters buildParameters(java.util.Map expressions,
                                                                                InvokeContext context,
                                                                                java.util.Map objectModel)
                                                                         throws PatternException
Build a Parameters object from a Map of named VariableResolvers and a list of Maps used for resolution.

Returns:
a fully resolved Parameters.
PatternException

buildMap

public static java.util.Map buildMap(java.util.Map expressions,
                                     InvokeContext context,
                                     java.util.Map objectModel)
                              throws PatternException
Build a Map from a Map of named ListOfMapResolvers and a list of Maps used for resolution.

Returns:
a fully resolved Map.
PatternException


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.