|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComputedAttributeValueProvider
This interface allows computing individual attribute values based on attribute values provided by List Rendering
Profile based BeanListProvider
s.
The generic ComputedAttributeValueProvider
interface is an optional interface that can be implemented by individual
BeanListProvider
implementations. If a specific BeanListProvider
implementation is implementing this interface,
the PLR framework will use this interface to retrieve the values for individual list rendering profile attributes that are flagged as computed
attributes. For example, a specific BeanListProvider
implementation could use the generic XML BeanListProvider
as delegate for extracting data from remote XML documents. The BeanListProvider
implementation can then add additional attributes by declaring
computed attributes in the used list rendering profile and implement the value computation for those values by implementing the ComputedAttributeValueProvider
interface.
It is not required to implement the ComputedAttributeValueProvider
interface if the BeanListProvider
implementation
is not using computed attributes or not using list rendering profile based BeanListProvider
delegates at all.
This interface is designed to be implemented by clients. |
Method Summary | |
---|---|
java.lang.Object |
getComputedItemAttributeValue(BeanListRequest request,
java.lang.String attributeName,
int listIndex,
java.util.List<? extends ResourceBean> resourceBeans,
java.util.Map<java.lang.String,java.lang.Object> computationContext)
This method is invoked by the PLR framework for list rendering driven BeanListProvider
extension to compute attribute values flagged as computed item attributes. |
java.lang.Object |
getComputedListPropertyValue(BeanListRequest request,
java.lang.String propertyName,
java.util.List<? extends ResourceBean> resourceBeans,
java.util.Map<java.lang.String,java.lang.Object> computationContext)
This method is invoked by the PLR framework for list rendering driven BeanListProvider
extension to compute list properties values flagged as computed list properties. |
java.lang.Object |
getLazyComputedItemAttributeValue(java.lang.String providerID,
java.lang.String profileName,
java.lang.String attributeName,
int listIndex,
java.util.List<? extends ResourceBean> resourceBeans)
This method is invoked by the PLR framework for list rendering driven BeanListProvider
extension to compute attribute values flagged as lazily computed item attributes. |
java.lang.Object |
getLazyComputedListPropertyValue(java.lang.String providerID,
java.lang.String profileName,
java.lang.String propertyName,
java.util.List<? extends ResourceBean> resourceBeans,
java.util.Map<java.lang.String,java.lang.Object> listProperties)
This method is invoked by the PLR framework for list rendering driven BeanListProvider
extension to compute attribute values flagged as lazily computed list properties. |
Method Detail |
---|
java.lang.Object getComputedItemAttributeValue(BeanListRequest request, java.lang.String attributeName, int listIndex, java.util.List<? extends ResourceBean> resourceBeans, java.util.Map<java.lang.String,java.lang.Object> computationContext) throws BeanListProviderException
BeanListProvider
extension to compute attribute values flagged as computed item attributes.
Attributes flagged as computed are computed immediately after loading the non-computed attributes.
The computation is performed in context of the BeanListRequest
that triggered the overall BeanList
computation.
request
- the current bean list requestattributeName
- the name of the attribute to computelistIndex
- the index of the current item in the listresourceBeans
- the current collection of resource beans as instantiated via the active profilecomputationContext
- the data that is shared by all calls to this method in the scope of the given bean list request.
This context can be used to cache objects required by multiple attribute computations.
String
, String[], Date
, or Calendar
)
BeanListProviderException
java.lang.Object getLazyComputedItemAttributeValue(java.lang.String providerID, java.lang.String profileName, java.lang.String attributeName, int listIndex, java.util.List<? extends ResourceBean> resourceBeans) throws BeanListProviderException
BeanListProvider
extension to compute attribute values flagged as lazily computed item attributes.
Attributes flagged as lazily computed are computed when the corresponding bean attribute actually gets
requested via the ResourceBean
interface.
The computation is not performed in context of the BeanListRequest
that triggered the overall BeanList
computation
since this context is typically no longer available when the attribute value is retrieved from a cached BeanList
object.
providerID
- the ID of the BeanListProvider
extension calling this method.profileName
- the unique name of the associated list rendering profileattributeName
- the name of the attribute to computelistIndex
- the index of the current item in the listresourceBeans
- the collection of all resource beans in the current bean list
String
, String[], Date
, or Calendar
)
BeanListProviderException
java.lang.Object getComputedListPropertyValue(BeanListRequest request, java.lang.String propertyName, java.util.List<? extends ResourceBean> resourceBeans, java.util.Map<java.lang.String,java.lang.Object> computationContext) throws BeanListProviderException
BeanListProvider
extension to compute list properties values flagged as computed list properties.
List properties flagged as computed are computed immediately after loading the non-computed list properties.
The computation is performed in context of the BeanListRequest
that triggered the overall BeanList
computation.
request
- the current bean list requestpropertyName
- the name of the list property to computeresourceBeans
- the collection of all resource beans in the current bean listcomputationContext
- the data that is shared by all calls to this method in the scope of the given bean list request
This context can be used to cache objects required by multiple attribute computations.
BeanListProviderException
java.lang.Object getLazyComputedListPropertyValue(java.lang.String providerID, java.lang.String profileName, java.lang.String propertyName, java.util.List<? extends ResourceBean> resourceBeans, java.util.Map<java.lang.String,java.lang.Object> listProperties) throws BeanListProviderException
BeanListProvider
extension to compute attribute values flagged as lazily computed list properties.
List properties flagged as lazily computed are computed when the corresponding list property actually gets
requested via the BeanList
interface.
The computation is not performed in context of the BeanListRequest
that triggered the overall BeanList
computation
since this context is typically no longer available when the list property is retrieved from a cached BeanList
object.
providerID
- the ID of the BeanListProvider
extension calling this method.profileName
- the unique name of the associated list rendering profilepropertyName
- the name of the list property to computeresourceBeans
- the collection of all resource beans in the current bean listlistProperties
- the map of list properties loaded and computed so far.
BeanListProviderException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |