org.jboss.portal.faces.el.decorator
Class AbstractBeanDecorator
java.lang.Object
org.jboss.portal.faces.el.decorator.AbstractBeanDecorator
- All Implemented Interfaces:
- BeanDecorator
- Direct Known Subclasses:
- SimpleBeanDecorator
public abstract class AbstractBeanDecorator
- extends java.lang.Object
- implements BeanDecorator
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
Method Summary |
protected abstract PropertyDecorator |
getProperty(java.lang.Object propertyName)
|
java.lang.Class |
getType(java.lang.Object bean,
java.lang.Object propertyName)
Return the type of the specified property. |
PropertyValue |
getValue(java.lang.Object bean,
java.lang.Object propertyName)
Return the value of the specified property. |
boolean |
setValue(java.lang.Object bean,
java.lang.Object propertyName,
java.lang.Object propertyValue)
Set the value of the specified property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractBeanDecorator
public AbstractBeanDecorator()
getType
public java.lang.Class getType(java.lang.Object bean,
java.lang.Object propertyName)
throws java.lang.IllegalArgumentException
- Description copied from interface:
BeanDecorator
- Return the type of the specified property.
- Specified by:
getType
in interface BeanDecorator
- Parameters:
bean
- the decorated beanpropertyName
- the property name
- Returns:
- the type of the specified property or null
- Throws:
java.lang.IllegalArgumentException
- if the bean is null or the property name is null
getValue
public PropertyValue getValue(java.lang.Object bean,
java.lang.Object propertyName)
throws java.lang.IllegalArgumentException
- Description copied from interface:
BeanDecorator
- Return the value of the specified property.
- Specified by:
getValue
in interface BeanDecorator
- Parameters:
bean
- the decorated beanpropertyName
- the property name
- Returns:
- the property value
- Throws:
java.lang.IllegalArgumentException
- if the bean is null or the property is null
setValue
public boolean setValue(java.lang.Object bean,
java.lang.Object propertyName,
java.lang.Object propertyValue)
throws java.lang.IllegalArgumentException
- Description copied from interface:
BeanDecorator
- Set the value of the specified property.
- Specified by:
setValue
in interface BeanDecorator
- Parameters:
bean
- the decorated beanpropertyName
- the property namepropertyValue
- the new property value
- Returns:
- true if the property was succesfully set
- Throws:
java.lang.IllegalArgumentException
- if the bean is null or the property name is null
getProperty
protected abstract PropertyDecorator getProperty(java.lang.Object propertyName)