org.weborganic.furi
Interface VariableResolver

All Known Implementing Classes:
VariableResolverList, VariableResolverMap

public interface VariableResolver

Classes implementing this interface should provide a mechanism to resolve the value of a variable in the context of a URI pattern matching operation.

Version:
3 January 2009
Author:
Christophe Lauret

Method Summary
 boolean exists(String value)
          Indicates whether the given value exists.
 Object resolve(String value)
          Resolves the variable and returns the associated object.
 

Method Detail

exists

boolean exists(String value)
Indicates whether the given value exists. This method should return true only if the value can be resolved, that is resolve(value) != null.

Parameters:
value - The value to check for existence.
Returns:
true if the specified value can be resolved; false otherwise.

resolve

Object resolve(String value)
Resolves the variable and returns the associated object. This method allows implementations to provide a lookup mechanism for variables if bound to particular objects. It must not return null if the value a value exists, but should return null, if the value cannot be resolved. If the implementation does not bind values to objects, this method should return the value if it can be resolved otherwise, it should return null.

Parameters:
value - The value to resolve.
Returns:
Any associated object.