|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.echobinding.binding.AbstractPropertyAdapter net.sf.echobinding.binding.OgnlPropertyAdapter
public class OgnlPropertyAdapter
This is an implemenation of the PropertyAdaper
interface using OGNL
expressions for accessing domain model properties.
Constructor Summary | |
---|---|
OgnlPropertyAdapter(java.lang.String expression)
Creates a new PropertyAdapter using OGNL expressions for accessing model properties. |
Method Summary | |
---|---|
java.lang.String |
getExpression()
Returns the OGNL expression. |
java.lang.String |
getLabel()
Returns the label for the adapter. |
java.lang.String |
getOgnlContextName()
|
protected java.lang.Object |
getParsedExpression()
|
java.lang.Object |
getValue(java.lang.Object bean)
Returns the value of the wrapped bean property. |
java.lang.Object |
getValue(ognl.OgnlContext context,
java.lang.Object bean)
|
PropertyAdapter |
newInstance()
Creates a new adapter instance. |
void |
setExpression(java.lang.String expression)
Sets the OGNL expression. |
void |
setValue(java.lang.Object bean,
java.lang.Object value)
Sets the value of the wrapped bean property. |
void |
setValue(ognl.OgnlContext context,
java.lang.Object bean,
java.lang.Object value)
Sets the value. |
java.lang.String |
toString()
|
ValidationReport |
validate(java.lang.Object bean,
java.lang.Object value)
Checks if the given value is valid for the specified bean. |
ValidationReport |
validateBean(java.lang.Object bean,
java.lang.Object value)
Validates a bean property by examing its annotated contraints. |
Methods inherited from class net.sf.echobinding.binding.AbstractPropertyAdapter |
---|
addValidator, format, getDecorator, getFormat, getId, getSubContext, getValidationHandler, getValidators, parse, setDecorator, setFormat, setId, setLabel, setSubContext, setValidationHandler, setValidators |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OgnlPropertyAdapter(java.lang.String expression)
expression
- The OGNL expressionMethod Detail |
---|
public void setValue(java.lang.Object bean, java.lang.Object value)
PropertyAdapter
bean
- The beanvalue
- The value to setpublic java.lang.Object getValue(java.lang.Object bean) throws BindingException
PropertyAdapter
bean
- the bean
BindingException
- If the value cannot be retrieved (eg. if the adapter is not
applicable for the bean/property)public void setValue(ognl.OgnlContext context, java.lang.Object bean, java.lang.Object value) throws BindingException
context
- bean
- value
-
BindingException
public java.lang.Object getValue(ognl.OgnlContext context, java.lang.Object bean)
context
- bean
-
public ValidationReport validateBean(java.lang.Object bean, java.lang.Object value)
bean
- value
-
ognl.OgnlException
Validation Framework
public ValidationReport validate(java.lang.Object bean, java.lang.Object value)
PropertyAdapter
validate
in interface PropertyAdapter
validate
in class AbstractPropertyAdapter
bean
- the beanvalue
- the value to validate
ValidationReport
public PropertyAdapter newInstance()
PropertyAdapter
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.Object getParsedExpression()
public java.lang.String getExpression()
public void setExpression(java.lang.String expression)
the
- OGNL expressionpublic java.lang.String getLabel()
PropertyAdapter
getLabel
in interface PropertyAdapter
getLabel
in class AbstractPropertyAdapter
public java.lang.String getOgnlContextName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |