T - ID - public class StandardTableConfiguration<T,ID> extends java.lang.Object implements TableConfiguration<T,ID>
| Constructor and Description |
|---|
StandardTableConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
ApplicationSettings |
getAppSettings()
The ApplicationSettings used to provide date format among possible other things.
|
java.lang.String |
getCustomUrl()
Has to match the @RequestMapping on the controller extending AbstractDataTablesController.
|
DataTablesService<T,ID> |
getDataTablesService()
The DataTablesService that is used by the AbstractDataTablesController
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getDropDownFiller()
Returns a map of all values used to populate drop down menus on view.
|
java.util.Map<java.lang.String,java.lang.String> |
getDropDownValuesFor(java.lang.String key)
Methods for handling drop down values, will return one of the maps from the dropDownFiller based on the name.
|
T |
getEntity()
Gets an instance of T.
|
java.lang.String |
getEntityName()
The pretty entity name, that will be used on the view
|
org.apache.log4j.Logger |
getLog() |
boolean |
getRecordsCanBeAdded()
Can records be added.
|
boolean |
getRecordsCanBeDeleted()
Can records be deleted.
|
java.lang.String |
getTableName()
Returns the id used for the table on the html page
|
java.lang.String |
getViewName()
The view name, most likely a jsp page that will be used for this DataTable.
|
void |
setAppSettings(ApplicationSettings appSettings)
Sets the ApplicationSettings used to provide date format among possible other things.
|
void |
setCustomUrl(java.lang.String customUrl)
Has to match the @RequestMapping on the controller extending AbstractDataTablesController.
|
void |
setDataTablesService(DataTablesService<T,ID> dataTablesService)
Sets the DataTablesService used by the AbstractDataTablesController for this DataTable.
|
void |
setDropDownFiller(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dropDownFiller)
Sets the drop down values map
|
void |
setDropDownValuesFor(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Adds one record to the dropDownFiller map
|
void |
setEntity(T entity)
Set this entity to be used in the DataTables
|
void |
setEntityName(java.lang.String entityName)
Set the entity name to use on the add form on the view.
|
void |
setLog(org.apache.log4j.Logger log)
Sets the Logger for the implementation
|
void |
setRecordsCanBeAdded(boolean recordsCanBeAdded)
Set to true if add entity functionality is needed.
|
void |
setRecordsCanBeDeleted(boolean recordsCanBeDeleted)
Set to true if delete entity functionality is needed.
|
void |
setTableName(java.lang.String tableName)
Sets the id used for the table on the html page, defaults to DefaultValues.DEFAULTDATATABLESNAME.
|
void |
setViewName(java.lang.String viewName)
The view name, most likely a jsp page that will be used for this DataTable.
|
public DataTablesService<T,ID> getDataTablesService()
TableConfigurationgetDataTablesService in interface TableConfiguration<T,ID>public void setDataTablesService(DataTablesService<T,ID> dataTablesService)
TableConfigurationsetDataTablesService in interface TableConfiguration<T,ID>public java.lang.String getTableName()
TableConfigurationgetTableName in interface TableConfiguration<T,ID>public void setTableName(java.lang.String tableName)
TableConfigurationsetTableName in interface TableConfiguration<T,ID>public org.apache.log4j.Logger getLog()
getLog in interface TableConfiguration<T,ID>public void setLog(org.apache.log4j.Logger log)
TableConfigurationsetLog in interface TableConfiguration<T,ID>public T getEntity()
TableConfigurationgetEntity in interface TableConfiguration<T,ID>public void setEntity(T entity)
TableConfigurationsetEntity in interface TableConfiguration<T,ID>public java.lang.String getViewName()
TableConfigurationgetViewName in interface TableConfiguration<T,ID>public void setViewName(java.lang.String viewName)
TableConfigurationsetViewName in interface TableConfiguration<T,ID>viewName - the name of the view as a Stringpublic java.lang.String getCustomUrl()
TableConfigurationgetCustomUrl in interface TableConfiguration<T,ID>public void setCustomUrl(java.lang.String customUrl)
TableConfigurationsetCustomUrl in interface TableConfiguration<T,ID>public ApplicationSettings getAppSettings()
TableConfigurationgetAppSettings in interface TableConfiguration<T,ID>public void setAppSettings(ApplicationSettings appSettings)
TableConfigurationsetAppSettings in interface TableConfiguration<T,ID>public boolean getRecordsCanBeAdded()
TableConfigurationgetRecordsCanBeAdded in interface TableConfiguration<T,ID>public void setRecordsCanBeAdded(boolean recordsCanBeAdded)
TableConfigurationsetRecordsCanBeAdded in interface TableConfiguration<T,ID>public boolean getRecordsCanBeDeleted()
TableConfigurationgetRecordsCanBeDeleted in interface TableConfiguration<T,ID>public void setRecordsCanBeDeleted(boolean recordsCanBeDeleted)
TableConfigurationsetRecordsCanBeDeleted in interface TableConfiguration<T,ID>public java.lang.String getEntityName()
TableConfigurationgetEntityName in interface TableConfiguration<T,ID>public void setEntityName(java.lang.String entityName)
TableConfigurationsetEntityName in interface TableConfiguration<T,ID>public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getDropDownFiller()
TableConfigurationgetDropDownFiller in interface TableConfiguration<T,ID>public void setDropDownFiller(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dropDownFiller)
TableConfigurationsetDropDownFiller in interface TableConfiguration<T,ID>public java.util.Map<java.lang.String,java.lang.String> getDropDownValuesFor(java.lang.String key)
TableConfigurationgetDropDownValuesFor in interface TableConfiguration<T,ID>key - the key used in the dropDownFiller mappublic void setDropDownValuesFor(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
TableConfigurationsetDropDownValuesFor in interface TableConfiguration<T,ID>key - of the record to add to the dropDownFillervalues - a map containing "id":"value" to display in a drop down menu on the jsp page