org.inria.ns.reflex.processor
Interface PropertyResolver

All Known Implementing Classes:
CookiesProperty, DataSetProperty, DateProperty, EncodingProperty, EnvProperty, ErrProperty, InProperty, MacroProperty, MaxOccursProperty, MinOccursProperty, NullProperty, OutProperty, OutputProperty, PropertyResolver.Impl, SessionProperty, SessionProperty, ThisProperty, ThisProperty

public interface PropertyResolver

Implementations of this class are plugged in front of the data setto compute specific properties that are not stored within the data set.

At runtime, the data set delegates the request to the implementation in charge of retrieving the required property thanks to its QName.

Several implementations may be provided for specific QNames.
A default one may be provided to handle resolution on behalf of the properties of the module. This is specifically useful when a module provides predefined properties which name is not known in advance.
The resolver used is firstly those specific to the QName given, and if none found, the default resolver is used.

Properties handled by such resolvers are shadowing usual scope (local, global, shared).

Author:
Philippe Poulard
See Also:
DataSet, QName

Nested Class Summary
static class PropertyResolver.Impl
          A default implementation that does nothing.
 
Method Summary
 Object getPropertyValue(DataSet dataSet, QName propertyName)
          Return the value of the property at runtime (this method is invoked by a data set for properties bound to this property resolver).
 Object removeProperty(DataSet dataSet, QName propertyName)
          Return the value of the property at runtime (this method is invoked by a data set for properties bound to this property resolver).
 void setPropertyValue(DataSet dataSet, QName propertyName, Object value)
          Return the value of the property at runtime (this method is invoked by a data set for properties bound to this property resolver).
 

Method Detail

getPropertyValue

Object getPropertyValue(DataSet dataSet,
                        QName propertyName)
                        throws RecoverableException
Return the value of the property at runtime (this method is invoked by a data set for properties bound to this property resolver).

Parameters:
dataSet - The set of datas used when the action is running. A concrete implementation must never try to find the property required in the data set because it would cause an infinite loop ! The data set may be used to retrieve other properties that can't be delivered by the current implementation of this interface.
propertyName - The name of the property.
Returns:
The value of the property.
Throws:
RecoverableException - When the property cause an error.

setPropertyValue

void setPropertyValue(DataSet dataSet,
                      QName propertyName,
                      Object value)
                      throws RecoverableException
Return the value of the property at runtime (this method is invoked by a data set for properties bound to this property resolver).

Parameters:
dataSet - The set of datas used when the action is running. A concrete implementation must never try to find the property required in the data set because it would cause an infinite loop ! The data set may be used to retrieve other properties that can't be delivered by the current implementation of this interface.
propertyName - The name of the property.
Throws:
RecoverableException - When the property cause an error.

removeProperty

Object removeProperty(DataSet dataSet,
                      QName propertyName)
                      throws RecoverableException
Return the value of the property at runtime (this method is invoked by a data set for properties bound to this property resolver).

Parameters:
dataSet - The set of datas used when the action is running. A concrete implementation must never try to find the property required in the data set because it would cause an infinite loop ! The data set may be used to retrieve other properties that can't be delivered by the current implementation of this interface.
propertyName - The name of the property.
Returns:
The value of the property.
Throws:
RecoverableException - When the property cause an error.