|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.chwf.filter.PropertyFilter
An abstract superclass of property filters.
Constructor Summary | |
PropertyFilter(java.lang.Class beanClass,
java.lang.String name,
java.lang.Class type)
Constructor. |
Method Summary | |
java.util.Iterator |
attributeNames()
Get all attribute names. |
abstract java.lang.String |
get(java.lang.Object object)
Get the specified property of the target object, as a string. |
java.lang.Object |
getAttribute(java.lang.String name)
Get the named attribute value. |
java.lang.Class |
getBeanClass()
The bean class for the filter. |
java.lang.String |
getLocalizedAttribute(java.lang.String name,
java.util.Locale locale)
Get the localized value of the named attribute. |
java.lang.String |
getName()
Get the property name. |
abstract java.lang.Object |
getPropertyAsObject(java.lang.Object object)
Get the specified property of the target object, as an object. |
java.lang.Class |
getType()
Get the property's Java type. |
protected Validator |
getValidator()
Return the validator for this class, or null if the filter
should not perform external validation. |
boolean |
isReadable()
Whether the property is readable. |
boolean |
isWriteable()
Whether the property is writeable. |
abstract void |
set(java.lang.Object object,
java.lang.String value)
Set the specified property of the target object, using a string. |
protected void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set the named attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PropertyFilter(java.lang.Class beanClass, java.lang.String name, java.lang.Class type) throws InitializationException
beanClass
- The bean class.name
- The property name.type
- The property type.InitializationException
- If filter initialization fails.Method Detail |
public java.lang.Class getBeanClass()
public abstract java.lang.String get(java.lang.Object object) throws FilterException
object
- The object whose property is being retrieved.FilterException
- For read failure.public abstract java.lang.Object getPropertyAsObject(java.lang.Object object) throws FilterException
object
- The object whose property is being retrieved.FilterException
- For read failure.public abstract void set(java.lang.Object object, java.lang.String value) throws ConversionException, FilterException
object
- The object whose property is being updated.value
- The new property value.ConversionException
- If the value cannot be converted to
the correct type.FilterException
- For write failure.public java.lang.String getName()
public java.lang.Class getType()
public java.lang.Object getAttribute(java.lang.String name)
name
- The attribute name.public java.lang.String getLocalizedAttribute(java.lang.String name, java.util.Locale locale)
name
- The attribute name.locale
- The locale.public java.util.Iterator attributeNames()
public boolean isReadable()
true
. Custom filters must override this method if they
are not readablepublic boolean isWriteable()
org.chwf.converter
package.
For custom filters that extend this class, this value defaults to
true
. Custom filters must override this method if they
are not writeable.protected void setAttribute(java.lang.String name, java.lang.Object value)
name
- The attribute name.value
- The attribute value.protected Validator getValidator()
null
if the filter
should not perform external validation.null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |