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()
TableConfiguration
getDataTablesService
in interface TableConfiguration<T,ID>
public void setDataTablesService(DataTablesService<T,ID> dataTablesService)
TableConfiguration
setDataTablesService
in interface TableConfiguration<T,ID>
public java.lang.String getTableName()
TableConfiguration
getTableName
in interface TableConfiguration<T,ID>
public void setTableName(java.lang.String tableName)
TableConfiguration
setTableName
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)
TableConfiguration
setLog
in interface TableConfiguration<T,ID>
public T getEntity()
TableConfiguration
getEntity
in interface TableConfiguration<T,ID>
public void setEntity(T entity)
TableConfiguration
setEntity
in interface TableConfiguration<T,ID>
public java.lang.String getViewName()
TableConfiguration
getViewName
in interface TableConfiguration<T,ID>
public void setViewName(java.lang.String viewName)
TableConfiguration
setViewName
in interface TableConfiguration<T,ID>
viewName
- the name of the view as a Stringpublic java.lang.String getCustomUrl()
TableConfiguration
getCustomUrl
in interface TableConfiguration<T,ID>
public void setCustomUrl(java.lang.String customUrl)
TableConfiguration
setCustomUrl
in interface TableConfiguration<T,ID>
public ApplicationSettings getAppSettings()
TableConfiguration
getAppSettings
in interface TableConfiguration<T,ID>
public void setAppSettings(ApplicationSettings appSettings)
TableConfiguration
setAppSettings
in interface TableConfiguration<T,ID>
public boolean getRecordsCanBeAdded()
TableConfiguration
getRecordsCanBeAdded
in interface TableConfiguration<T,ID>
public void setRecordsCanBeAdded(boolean recordsCanBeAdded)
TableConfiguration
setRecordsCanBeAdded
in interface TableConfiguration<T,ID>
public boolean getRecordsCanBeDeleted()
TableConfiguration
getRecordsCanBeDeleted
in interface TableConfiguration<T,ID>
public void setRecordsCanBeDeleted(boolean recordsCanBeDeleted)
TableConfiguration
setRecordsCanBeDeleted
in interface TableConfiguration<T,ID>
public java.lang.String getEntityName()
TableConfiguration
getEntityName
in interface TableConfiguration<T,ID>
public void setEntityName(java.lang.String entityName)
TableConfiguration
setEntityName
in interface TableConfiguration<T,ID>
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getDropDownFiller()
TableConfiguration
getDropDownFiller
in interface TableConfiguration<T,ID>
public void setDropDownFiller(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dropDownFiller)
TableConfiguration
setDropDownFiller
in interface TableConfiguration<T,ID>
public java.util.Map<java.lang.String,java.lang.String> getDropDownValuesFor(java.lang.String key)
TableConfiguration
getDropDownValuesFor
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)
TableConfiguration
setDropDownValuesFor
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