lumis.service.wsrp.consumer.doui
Class MapDataProvider

Package class diagram package MapDataProvider
java.lang.Object
  extended by lumis.service.wsrp.consumer.doui.MapDataProvider
All Implemented Interfaces:
IDataProvider<TabularSource<?>>
Direct Known Subclasses:
PropertiesDataProvider

public abstract class MapDataProvider
extends 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

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
MapDataProvider()
           
 
Method Summary
protected  void buildTabularData(Map<?,?> mapData, TabularSource<?> source)
          Fill the TabularData from TabularSource using the information in the Map
 void loadData(SessionConfig sessionConfig, TabularSource<?> source, ITransaction transaction)
           
protected abstract  Map<?,?> obtainMapData(SessionConfig sessionConfig, TabularSource<?> source, ITransaction transaction)
          Provides the Map data for each specific implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapDataProvider

public MapDataProvider()
Method Detail

loadData

public void loadData(SessionConfig sessionConfig,
                     TabularSource<?> source,
                     ITransaction transaction)
              throws PortalException
Specified by:
loadData in interface IDataProvider<TabularSource<?>>
Throws:
PortalException

obtainMapData

protected abstract Map<?,?> obtainMapData(SessionConfig sessionConfig,
                                          TabularSource<?> source,
                                          ITransaction transaction)
                                   throws PortalException
Provides the Map data for each specific implementation

Parameters:
sessionConfig - an instance of SessionConfig
source - an instance of TabularSource
transaction - 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(Map<?,?> mapData,
                                TabularSource<?> source)
                         throws PortalException
Fill the TabularData from TabularSource using the information in the Map

Parameters:
mapData - the Map containing the data
source - the TabularSource instance
Throws:
PortalException - whenever an error occur


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.