org.rythmengine.extension
Interface IPropertyAccessor


public interface IPropertyAccessor

The interface can be implemented by application that use Rythm with dynamic expression option enabled.

The implementation should be registered via RythmEngine.registerPropertyAccessor(IPropertyAccessor...) API or via RythmConfigurationKey.EXT_PROP_ACCESSOR configuration


Method Summary
 Object getProperty(String name, Object contextObj)
          Retrieves the value of the property.
 Class getTargetType()
          Which type this property accessor can be applied
 Object setProperty(String name, Object contextObj, Object value)
          Sets the value of the property.
 

Method Detail

getTargetType

Class getTargetType()
Which type this property accessor can be applied

Returns:
the class

getProperty

Object getProperty(String name,
                   Object contextObj)
Retrieves the value of the property.

Parameters:
name - - the name of the property to be resolved.
contextObj - - the current context object.
Returns:
- the value of the property.

setProperty

Object setProperty(String name,
                   Object contextObj,
                   Object value)
Sets the value of the property.

Parameters:
name - - the name of the property to be resolved.
contextObj - - the current context object.
value - - the value to be set to the resolved property
Returns:
- the resultant value of the property (should normally be the same as the value passed)


Copyright © 2013. All Rights Reserved.