public class TableConfigurationFactory extends Object
Factory that creates TableConfiguration
instances.
Once created, the instance is cached by Locale
and then by group
name.
Modifier and Type | Method and Description |
---|---|
static void |
clear()
FOR INTERNAL USE ONLY
|
static Map<Locale,Map<String,Map<com.github.dandelion.core.option.Option<?>,Object>>> |
getConfigurationStore()
FOR INTERNAL USE ONLY
|
static TableConfiguration |
newInstance(String tableId,
javax.servlet.http.HttpServletRequest request)
Returns a new instance of
TableConfiguration corresponding to
ConfigLoader.DEFAULT_GROUP_NAME , i.e. containing all global
configuration. |
static TableConfiguration |
newInstance(String tableId,
javax.servlet.http.HttpServletRequest request,
String groupName)
Returns a new instance of
TableConfiguration corresponding to the
passed groupName and locale resolved from the request. |
static void |
resolveGroupsForLocale(Locale locale,
javax.servlet.http.HttpServletRequest request)
Resolves configurations groups for the given locale and stores them in the
OPTIONS_BY_GROUP_BY_LOCALE map. |
public static TableConfiguration newInstance(String tableId, javax.servlet.http.HttpServletRequest request)
Returns a new instance of TableConfiguration
corresponding to
ConfigLoader.DEFAULT_GROUP_NAME
, i.e. containing all global
configuration.
The instance is duplicated from the template instance stored in the
OPTIONS_BY_GROUP_BY_LOCALE
map.
tableId
- The DOM id of the HTML table.request
- The current request.TableConfiguration
.public static TableConfiguration newInstance(String tableId, javax.servlet.http.HttpServletRequest request, String groupName)
Returns a new instance of TableConfiguration
corresponding to the
passed groupName
and locale resolved from the request.
If the passed group name doesn't exist, the DEFAULT_GROUP_NAME (global) will be used.
The instance is duplicated from the template instance stored in the
OPTIONS_BY_GROUP_BY_LOCALE
map.
tableId
- The DOM id of the HTML table.request
- The current request.groupName
- Name of the configuration group to load.TableConfiguration
.public static void resolveGroupsForLocale(Locale locale, javax.servlet.http.HttpServletRequest request)
Resolves configurations groups for the given locale and stores them in the
OPTIONS_BY_GROUP_BY_LOCALE
map.
locale
- The locale resolved from the user properties or from the
request.request
- The current request.public static Map<Locale,Map<String,Map<com.github.dandelion.core.option.Option<?>,Object>>> getConfigurationStore()
public static void clear()
Copyright © 2013–2015 Dandelion Project. All rights reserved.