Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.faces.el
Class ClassConstantPublisherBean

    java.lang.Object
      org.jboss.portal.faces.el.ClassConstantPublisherBean

All Implemented Interfaces:
  DynamicBean

    public class ClassConstantPublisherBean

extends java.lang.Object
implements DynamicBean

An implementation of `DynamicBean` which exposes all the fields on a class which are public and static. The properties are read only and cannot be modified. It allows to use constant names from expression language rather than the constant values directly.

- Class objects of type class or interface are supported.
- Class inheritence is supported, Class object returned from `Class.getSuperClass()` is examined.
- Interface implementation is not yet supported, Class objects returned from `Class.getInterfaces()` are not examined.

todo: implement and test interfaces returned by `Class.getInterfaces()`.

Version:
  $Revision: 8784 $
Author:
  Julien Viet

Constructor Summary
`ClassConstantPublisherBean()`

Method Summary
`java.lang.String` | `getClassName()`
`java.lang.Class` | `getType(java.lang.Object propertyName)` Return the type of the specified property.
`PropertyValue` | `getValue(java.lang.Object propertyName)` Return the value of the specified property.
`void` | `setClassName(java.lang.String className)`
`boolean` | `setValue(java.lang.Object propertyName, java.lang.Object value)` 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`

Constructor Detail

### ClassConstantPublisherBean

    public ClassConstantPublisherBean()

Method Detail

### getType

    public java.lang.Class getType(java.lang.Object propertyName)
                            throws java.lang.IllegalArgumentException

  Description copied from interface: `DynamicBean`
  Return the type of the specified property.

  Specified by:
    `getType` in interface `DynamicBean`
  Parameters:
    `propertyName` - the property name
  Returns:
    the type of the specified property or null
  Throws:
    `java.lang.IllegalArgumentException` - if the property name is null

### getValue

    public PropertyValue getValue(java.lang.Object propertyName)
                           throws java.lang.IllegalArgumentException

  Description copied from interface: `DynamicBean`
  Return the value of the specified property.

  Specified by:
    `getValue` in interface `DynamicBean`
  Parameters:
    `propertyName` - the property name
  Returns:
    the property value
  Throws:
    `java.lang.IllegalArgumentException` - if the property is null

### setValue

    public boolean setValue(java.lang.Object propertyName,
                            java.lang.Object value)
                     throws java.lang.IllegalArgumentException

  Description copied from interface: `DynamicBean`
  Set the value of the specified property.

  Specified by:
    `setValue` in interface `DynamicBean`
  Parameters:
    `propertyName` - the property name
    `value` - the new property value
  Returns:
    true if the property was succesfully set
  Throws:
    `java.lang.IllegalArgumentException` - if the property name is null

### getClassName

    public java.lang.String getClassName()

### setClassName

    public void setClassName(java.lang.String className)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD