org.weborganic.uri.template
Class VariableBinder

java.lang.Object
  extended by org.weborganic.uri.template.VariableBinder

public class VariableBinder
extends Object

A convenience class is to bind variables to resolvers in a set of URI patterns.

Version:
3 January 2009
Author:
Christophe Lauret

Constructor Summary
VariableBinder()
           
 
Method Summary
 void bind(String name, VariableResolver resolver)
          Binds the variables with the specified name to the specified resolver.
 VariableResolver getResolver(String name)
          Returns the resolver used for the variable of the specified name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableBinder

public VariableBinder()
Method Detail

bind

public void bind(String name,
                 VariableResolver resolver)
Binds the variables with the specified name to the specified resolver.

Parameters:
name - The name of the variable.
resolver - The resolver to use with these variables.

getResolver

public VariableResolver getResolver(String name)
Returns the resolver used for the variable of the specified name.

This method does not return null. If the specified variable name is no bound to any resolver the default resolver if returned instead.

Parameters:
name - The name of the variables.
Returns:
the corresponding resolver.