Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.wcm.plr
Interface AttributeValueOnRequestProcessorFactory
public interface AttributeValueOnRequestProcessorFactory
This interface can be implemented to realize a factory the creates AttributeValueProcessor objects that depend on information from the BeanListRequest. The newProcessor(BeanListRequest) method is called once per BeanList processing.
Implementations of AttributeValueOnRequestProcessorFactory need to globally register using a plugin.xml. Here is an example fragment of a plugin.xml that registers a custom AttributeValueOnRequestProcessorFactory implementation.
<plugin id="com.acme.plr"> <extension point="com.ibm.portal.wcm.plr.AttributeValueProcessor" id="MyAttributeValueOnRequestProcessorFactory"> <factory class="com.acme.MyAttributeValueOnRequestProcessorFactoryImpl"/> </extension> </plugin>After registration of the factory you need to enable the attribute processing for a certain attribute in the list rendering profile. To enable attribute processing for a certain attribute set the meta data key "processors". The value of the meta data key must be the unique identifier of the extension. If available, this identifier is unique within the plug-in registry, and is composed of the namespace where this extension was declared and this extension's simple identifier.
This is an example of a fragment of attribute definition in a list rendering profile that enables the factory from the sample above for the attribute with the name "body"myprofile.ItemAttribute.body.processors=com.acme.plr.MyAttributeValueOnRequestProcessorFactoryImplementations must be thread-safe as the same instance might be used by multiple threads concurrently.
- Since:
- 8.5.0.0 CF03
- Note:
This interface is designed to be implemented by clients.
Method Summary AttributeValueProcessor newProcessor(BeanListRequest request)
Create a new a instance of a AttributeValueProcessor.
Method Detail newProcessor
AttributeValueProcessor newProcessor(BeanListRequest request) throws AttributeValueProcessorInstantiationException
- Create a new a instance of a AttributeValueProcessor. This method is called once per BeanList processing.
As processing results from the returned processor instance might depend on information from the BeanListRequest that was used the retrieve the ResourceBean from a BeanListResponse processing result are not cached in the scope of the BeanListResponse.
- Parameters:
- request - The request that was used to build the BeanListResponse that provides the ResourceBean
- Returns:
- A valid non-null instance of a AttributeValueProcessor
- Throws:
- AttributeValueProcessorInstantiationException - If a AttributeValueProcessor could not be instantiated
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD