com.github.dandelion.datatables.core.configuration
Class DatatablesConfigurator

java.lang.Object
  extended by com.github.dandelion.datatables.core.configuration.DatatablesConfigurator

public class DatatablesConfigurator
extends Object

The DatatablesConfigurator is used to pick up different classes in charge of the configuration loading, instantiate them and cache them.

Since:
0.9.0
Author:
Thibault Duchateau
See Also:
LocaleResolver, StandardLocaleResolver, ConfigurationLoader, StandardConfigurationLoader

Constructor Summary
DatatablesConfigurator()
           
 
Method Summary
static void clear()
          FOR INTERNAL USE ONLY
static ConfigurationLoader getConfigurationLoader()
           Returns an implementation of ConfigurationLoader using the following strategy: Check first if the dandelion.datatables.confloader.class system property is set and tries to instantiate it Otherwise, instantiate the StandardConfigurationLoader based on property files
static JavascriptGenerator getJavascriptGenerator()
           Returns an implementation of JavascriptGenerator using the following strategy: Check first if the dandelion.datatables.js.generator.class system property is set and tries to instantiate it Otherwise, instantiate the StandardJavascriptGenerator based on property files
static LocaleResolver getLocaleResolver()
          Return a uniq implementation of LocaleResolver using the following strategy: First, check if the i18n.locale.resolver has been defined in any of the user properties files.
static MessageResolver getMessageResolver(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatatablesConfigurator

public DatatablesConfigurator()
Method Detail

getLocaleResolver

public static LocaleResolver getLocaleResolver()
Return a uniq implementation of LocaleResolver using the following strategy:
  1. First, check if the i18n.locale.resolver has been defined in any of the user properties files. If so, tries to instantiate the class.
  2. If no specific LocaleResolver is defined in user properties, the default will be used

Returns:
an implementation LocaleResolver.

getMessageResolver

public static MessageResolver getMessageResolver(javax.servlet.http.HttpServletRequest request)

getConfigurationLoader

public static ConfigurationLoader getConfigurationLoader()

Returns an implementation of ConfigurationLoader using the following strategy:

  1. Check first if the dandelion.datatables.confloader.class system property is set and tries to instantiate it
  2. Otherwise, instantiate the StandardConfigurationLoader based on property files

Returns:
an implementation of ConfigurationLoader.

getJavascriptGenerator

public static JavascriptGenerator getJavascriptGenerator()

Returns an implementation of JavascriptGenerator using the following strategy:

  1. Check first if the dandelion.datatables.js.generator.class system property is set and tries to instantiate it
  2. Otherwise, instantiate the StandardJavascriptGenerator based on property files

Returns:
an implementation of JavascriptGenerator.

clear

public static void clear()
FOR INTERNAL USE ONLY



Copyright © 2013–2014 Dandelion Project. All rights reserved.