com.ibm.portal.wcm.plr
Interface ResourceBean


public interface ResourceBean

This is the root interface for the individual items contained in BeanList objects. It is recommended (though not required) to extend your ResourceBean implementations from the ResourceBeanAdapter class. Implementations of the ResourceBean interface can expose individual bean properties either by defining a corresponding getter method or by supporting a corresponding key in the @link ResourceBean#getDynamicAttributeValue(String)} method. For example to expose an attribute with attributeName xyz the bean implementation can either define a method getXyz() or support the key xyz in the ResourceBean#getDynamicAttributeValue(String)} implementation. Attributes exposed by ResourceBean objects can be rendered using the WCM [AttributeResource attributeName=""] tag. E.g. to render the xyz attribute you can add the tag [AttributeResource attributeName="xyz"] to your corresponding WCM personalization result design. The [AttributeResource] allows rendering arrays of objects by applying a configurable separator and formating objects of type Date or Calendar by applying a format string.

Since:
8.5.0.0
Note:
This interface is designed to be implemented by clients.

Method Summary
 java.lang.Object getDynamicAttributeValue(java.lang.String name)
          Returns The value of a named attribute of the current bean.
 java.lang.String getId()
          Returns the ID of this ResourceBean.
 java.lang.String getTitle()
          Returns the human readable title of this ResourceBean.
 

Method Detail

getId

java.lang.String getId()
Returns the ID of this ResourceBean. The ID needs to be unique in scope the BeanList object containing this ResourceBean. This method must not return null.

Returns:
the ID of this ResourceBean.

getTitle

java.lang.String getTitle()
Returns the human readable title of this ResourceBean. This method may return null but it is recommended to return a meaningful value, since some generic list preview UIs will use this value to generate generic list result visualizations.

Returns:
the human readable title of this ResourceBean.

getDynamicAttributeValue

java.lang.Object getDynamicAttributeValue(java.lang.String name)
                                          throws BeanListProviderException
Returns The value of a named attribute of the current bean. You can use this method to expose bean attributes without having the declare a corresponding bean getter method for the attribute.

Parameters:
name - the name of the attribute
Returns:
the value of a named attribute of the current bean.
Throws:
BeanListProviderException