Package lumis.service.wsrp.consumer.doui
Class MapDataProvider
- java.lang.Object
-
- lumis.service.wsrp.consumer.doui.MapDataProvider
-
- All Implemented Interfaces:
IDataProvider<TabularSource<?>>
- Direct Known Subclasses:
PropertiesDataProvider
public abstract class MapDataProvider extends java.lang.Object implements IDataProvider<TabularSource<?>>
Abstract class that implements IDataProvider and provides a general behavior to Key/Value Data Providers. Each row in the TabularData contain only two keys: 'key' and 'value'. The subclasses of MapDataProvider must only provide the implementation for the method obtainMapData - that has to return a Map. The MapDataProvider class has the ability to construct the TabularData from the Map.- Since:
- 5.6.0
- Version:
- $Revision: 12680 $ $Date: 2011-03-04 15:32:40 -0300 (Fri, 04 Mar 2011) $
-
-
Field Summary
-
Fields inherited from interface lumis.doui.source.IDataProvider
INTERFACE_INSTANCE_PROPERTY_FIELDS, INTERFACE_INSTANCE_PROPERTY_FILTERS, INTERFACE_INSTANCE_PROPERTY_MAX_ROWS, INTERFACE_INSTANCE_PROPERTY_ORDER_BY, MAX_NUM_ORDER_BY_FIELDS
-
-
Constructor Summary
Constructors Constructor Description MapDataProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
buildTabularData(java.util.Map<?,?> mapData, TabularSource<?> source)
Fill the TabularData from TabularSource using the information in the Mapvoid
loadData(SessionConfig sessionConfig, TabularSource<?> source, ITransaction transaction)
protected abstract java.util.Map<?,?>
obtainMapData(SessionConfig sessionConfig, TabularSource<?> source, ITransaction transaction)
Provides the Map data for each specific implementation
-
-
-
Method Detail
-
loadData
public void loadData(SessionConfig sessionConfig, TabularSource<?> source, ITransaction transaction) throws PortalException
- Specified by:
loadData
in interfaceIDataProvider<TabularSource<?>>
- Throws:
PortalException
-
obtainMapData
protected abstract java.util.Map<?,?> obtainMapData(SessionConfig sessionConfig, TabularSource<?> source, ITransaction transaction) throws PortalException
Provides the Map data for each specific implementation- Parameters:
sessionConfig
- an instance of SessionConfigsource
- an instance of TabularSourcetransaction
- the current transaction- Returns:
- an instance of Map with the data to be filled in TabularData
- Throws:
PortalException
- whenever an error occur
-
buildTabularData
protected void buildTabularData(java.util.Map<?,?> mapData, TabularSource<?> source) throws PortalException
Fill the TabularData from TabularSource using the information in the Map- Parameters:
mapData
- the Map containing the datasource
- the TabularSource instance- Throws:
PortalException
- whenever an error occur
-
-