org.compass.core.converter.dynamic
Class MVELDynamicConverter

java.lang.Object
  extended by org.compass.core.converter.basic.AbstractBasicConverter
      extended by org.compass.core.converter.dynamic.AbstractDynamicConverter
          extended by org.compass.core.converter.dynamic.MVELDynamicConverter
All Implemented Interfaces:
Converter, DynamicConverter, ContextResourcePropertyConverter, ResourcePropertyConverter

public class MVELDynamicConverter
extends AbstractDynamicConverter

Author:
kimchy

Field Summary
 
Fields inherited from interface org.compass.core.converter.dynamic.DynamicConverter
DATA_CONTEXT_KEY
 
Constructor Summary
MVELDynamicConverter()
           
 
Method Summary
protected  Object evaluate(Object o, ResourcePropertyMapping resourcePropertyMapping)
          Evaluates the given data object using the configured expression.
 void setExpression(String expression)
          Sets the expression this dynamic converter will ecaluate.
 
Methods inherited from class org.compass.core.converter.dynamic.AbstractDynamicConverter
addProperty, copy, doFromString, getType, marshall, setFormatConverter, setType, suggestIndex, suggestOmitNorms, suggestOmitTf, suggestStore, suggestTermVector, unmarshall
 
Methods inherited from class org.compass.core.converter.basic.AbstractBasicConverter
canNormalize, createProperty, doSetBoost, doToString, fromString, fromString, getNullValue, handleNulls, isNullValue, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MVELDynamicConverter

public MVELDynamicConverter()
Method Detail

setExpression

public void setExpression(String expression)
                   throws ConversionException
Description copied from interface: DynamicConverter
Sets the expression this dynamic converter will ecaluate.

Parameters:
expression - The expression to evaluate
Throws:
ConversionException

evaluate

protected Object evaluate(Object o,
                          ResourcePropertyMapping resourcePropertyMapping)
                   throws ConversionException
Description copied from class: AbstractDynamicConverter
Evaluates the given data object using the configured expression.

Specified by:
evaluate in class AbstractDynamicConverter
Parameters:
o - The data object
resourcePropertyMapping - The resource mapping
Returns:
The object returned as a result of expression evaluation
Throws:
ConversionException


Copyright (c) 2004-2009 The Compass Project.