com.github.dandelion.datatables.core.i18n
Interface MessageResolver

All Known Implementing Classes:
AbstractMessageResolver

public interface MessageResolver

Interface for all MessageResolvers.

A MessageResolver uses the messageKey to lookup in the ResourceBundle. If the defaultValue is present and no message is found for the given key, it will be used as a result.

By default, if the JSTL jar is present in the classpath and no MessageResolver has been configured in the datatables.properties (thanks to the i18n.message.resolver property), the JstlMessageResolver will be used. It is also possible to use different MessageResolver in different configuration groups.

Since:
0.9.0
Author:
Thibault Duchateau

Field Summary
static String UNDEFINED_KEY
           
 
Method Summary
 String getResource(String messageKey, String defaultValue, Object... objects)
          Return a localized String.
 

Field Detail

UNDEFINED_KEY

static final String UNDEFINED_KEY
See Also:
Constant Field Values
Method Detail

getResource

String getResource(String messageKey,
                   String defaultValue,
                   Object... objects)
Return a localized String.

Parameters:
messageKey - The key used to lookup in the configured ResourceBundle.
defaultValue - The default value to used if no key is found.
objects - Different objects that may be needed to access the ResourceBundle, depending on the present JARs.
Returns:
a localized String.


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