|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PropertyAdapter
A PropertyAdapter is an adapter for a single bean property or a collection of beans.
Through a PropertyAdapter you can retrieve and set the value of properties in
a uniform way. The PropertyAdapter interface defines the
protocol for accessing, manipulating and validating beans.
BindingContext,
Format,
Decorator,
ValidationHandler| Method Summary | |
|---|---|
PropertyAdapter |
addValidator(Validator validator)
Adds a validator to the list of validators. |
Decorator |
getDecorator()
Returns the decorator. |
Format |
getFormat()
Sets the format to be used by the getValue() method. |
java.lang.String |
getId()
Returns the identifier of the adapter. |
java.lang.String |
getLabel()
Returns the label for the adapter. |
BindingContext |
getSubContext()
Returns the sub context. |
ValidationHandler |
getValidationHandler()
Returns the validation handler. |
java.lang.Object |
getValue(java.lang.Object bean)
Returns the value of the wrapped bean property. |
PropertyAdapter |
newInstance()
Creates a new adapter instance. |
PropertyAdapter |
setDecorator(Decorator decorator)
Sets the decorator for this adapter. |
PropertyAdapter |
setFormat(Format format)
Sets the format to be used by the getValue() method. |
PropertyAdapter |
setId(java.lang.String id)
Sets the identifier for the adapter. |
PropertyAdapter |
setLabel(java.lang.String labelName)
Sets the label. |
PropertyAdapter |
setSubContext(BindingContext context)
Sets the sub context. |
PropertyAdapter |
setValidationHandler(ValidationHandler handler)
Sets the validation handler. |
PropertyAdapter |
setValidators(java.util.Set<Validator> validators)
Sets the validators. |
void |
setValue(java.lang.Object bean,
java.lang.Object value)
Sets the value of the wrapped bean property. |
ValidationReport |
validate(java.lang.Object bean,
java.lang.Object value)
Checks if the given value is valid for the specified bean. |
| Method Detail |
|---|
PropertyAdapter setId(java.lang.String id)
id - the id
java.lang.String getId()
void setValue(java.lang.Object bean,
java.lang.Object value)
throws BindingException
value - The value to setbean - The bean
BindingException - If the value cannot be set (eg. if the adapter is not
applicable for the bean/property)
java.lang.Object getValue(java.lang.Object bean)
throws BindingException
bean - the bean
BindingException - If the value cannot be retrieved (eg. if the adapter is not
applicable for the bean/property)
ValidationReport validate(java.lang.Object bean,
java.lang.Object value)
value - the value to validatebean - the bean
ValidationReportPropertyAdapter setValidators(java.util.Set<Validator> validators)
validators - the validators
ValidatorPropertyAdapter addValidator(Validator validator)
validator -
ValidatorPropertyAdapter setFormat(Format format)
format - the format
Format getFormat()
format - *
PropertyAdapter setDecorator(Decorator decorator)
decorator - the decorator
Decorator getDecorator()
PropertyAdapter setLabel(java.lang.String labelName)
labelName - The label to set.
java.lang.String getLabel()
PropertyAdapter setSubContext(BindingContext context)
context - The context to set
BindingContext getSubContext()
PropertyAdapter newInstance()
PropertyAdapter setValidationHandler(ValidationHandler handler)
handler - The validation handler
ValidationHandler getValidationHandler()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||