Package org.openbravo.materialmgmt
Class ManageVariantsDS
- java.lang.Object
-
- org.openbravo.service.datasource.BaseDataSourceService
-
- org.openbravo.service.datasource.DefaultDataSourceService
-
- org.openbravo.service.datasource.ReadOnlyDataSourceService
-
- org.openbravo.materialmgmt.ManageVariantsDS
-
- All Implemented Interfaces:
DataSourceService
public class ManageVariantsDS extends ReadOnlyDataSourceService
-
-
Constructor Summary
Constructors Constructor Description ManageVariantsDS()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkFetchDatasourceAccess(Map<String,String> parameter)
This method allows to implement a security access to a DataSource when it is used fetch() method.protected int
getCount(Map<String,String> parameters)
Returns the count of objects based on the passed parameters.protected List<Map<String,Object>>
getData(Map<String,String> parameters, int startRow, int endRow)
Read/create the set of data as a list of Maps with key-value pairs.List<DataSourceProperty>
getDataSourceProperties(Map<String,Object> parameters)
Create the properties used in the template.-
Methods inherited from class org.openbravo.service.datasource.ReadOnlyDataSourceService
add, fetch, fetch, remove, sort, update
-
Methods inherited from class org.openbravo.service.datasource.DefaultDataSourceService
add, addFetchParameters, fetch, getInitialProperties, remove
-
Methods inherited from class org.openbravo.service.datasource.BaseDataSourceService
checkEditDatasourceAccess, getDataSource, getDataUrl, getEntity, getName, getTemplate, getWhereAndFilterClause, getWhereClause, handleExceptionUnsecuredDSAccess, setDataSource, setDataUrl, setEntity, setName, setWhereClause
-
-
-
-
Method Detail
-
checkFetchDatasourceAccess
public void checkFetchDatasourceAccess(Map<String,String> parameter)
Description copied from interface:DataSourceService
This method allows to implement a security access to a DataSource when it is used fetch() method. It can be overridden in specific DataSources to apply a particular security mechanism.- Specified by:
checkFetchDatasourceAccess
in interfaceDataSourceService
- Overrides:
checkFetchDatasourceAccess
in classBaseDataSourceService
-
getCount
protected int getCount(Map<String,String> parameters)
Description copied from class:ReadOnlyDataSourceService
Returns the count of objects based on the passed parameters.- Specified by:
getCount
in classReadOnlyDataSourceService
- Parameters:
parameters
- the parameters passed in from the request- Returns:
- the total number of objects
-
getData
protected List<Map<String,Object>> getData(Map<String,String> parameters, int startRow, int endRow)
Description copied from class:ReadOnlyDataSourceService
Read/create the set of data as a list of Maps with key-value pairs.- Specified by:
getData
in classReadOnlyDataSourceService
- Parameters:
parameters
- the parameters passed in from the requeststartRow
- the first row to read (maybe -1 to indicate no startrow)endRow
- the last row to read (maybe -1 to indicate no endrow- Returns:
- the number of objects read, note that this maybe more than endRow - startRow + 1. The startRow parameter should be strictly followed though.
-
getDataSourceProperties
public List<DataSourceProperty> getDataSourceProperties(Map<String,Object> parameters)
Description copied from interface:DataSourceService
Create the properties used in the template.- Specified by:
getDataSourceProperties
in interfaceDataSourceService
- Overrides:
getDataSourceProperties
in classDefaultDataSourceService
- Parameters:
parameters
- parameters used for this request- Returns:
- the list of DataSourceProperty instances to use in the template
-
-