Class MessageFormatterImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.utils.composition.FactoryObjectImplementation
-
- de.uni_trier.wi2.procake.utils.multilanguage.jdk1_4Impl.MessageFormatterImpl
-
- All Implemented Interfaces:
MessageFormatter,MessageFormatterFactoryObject
public class MessageFormatterImpl extends FactoryObjectImplementation implements MessageFormatter, MessageFormatterFactoryObject
- Author:
- rmaximi
-
-
Field Summary
-
Fields inherited from interface de.uni_trier.wi2.procake.utils.multilanguage.MessageFormatter
COMPONENT_MULTILANGUAGE, DEFAULT_RESOURCE_PREFIX, ERROR_WRONG_FORMAT
-
-
Constructor Summary
Constructors Constructor Description MessageFormatterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(String component, String key)Stringformat(String component, String key, ClassLoader cl)Stringformat(String component, String key, Object parameter1)Stringformat(String component, String key, Object[] parameters)Stringformat(String component, String key, Object[] parameters, ClassLoader cl)Stringformat(String component, String key, Object parameter1, ClassLoader cl)Stringformat(String component, String key, Object parameter1, Object parameter2)Stringformat(String component, String key, Object parameter1, Object parameter2, ClassLoader cl)Stringformat(String component, String key, Object parameter1, Object parameter2, Object parameter3)Stringformat(String component, String key, Object parameter1, Object parameter2, Object parameter3, ClassLoader cl)Stringformat(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4)Stringformat(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, ClassLoader cl)Stringformat(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, Object parameter5)Stringformat(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, Object parameter5, ClassLoader cl)LocalegetLocale()List<Parameter>getParameters()MessageFormatternewMessageFormatter()voidpostInit()Called after all factories are initialized withFactoryObjectImplementation.preInit(AbstractParameter[])and bind to the factory.voidpreInit(AbstractParameter[] parameter)Called directly after creating the implementation.voidsetLocale(Locale newLocale)-
Methods inherited from class de.uni_trier.wi2.procake.utils.composition.FactoryObjectImplementation
getParameter, initParametersBasedOn
-
-
-
-
Method Detail
-
format
public String format(String component, String key)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, ClassLoader cl)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, ClassLoader cl)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, ClassLoader cl)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, ClassLoader cl)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, ClassLoader cl)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, Object parameter5)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, Object parameter5, ClassLoader cl)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object[] parameters)
- Specified by:
formatin interfaceMessageFormatter
-
format
public String format(String component, String key, Object[] parameters, ClassLoader cl)
- Specified by:
formatin interfaceMessageFormatter
-
getLocale
public Locale getLocale()
- Specified by:
getLocalein interfaceMessageFormatter
-
setLocale
public void setLocale(Locale newLocale)
- Specified by:
setLocalein interfaceMessageFormatter
-
getParameters
public List<Parameter> getParameters()
- Specified by:
getParametersin classFactoryObjectImplementation- Returns:
- Returns a list of available parameters in the implementation. This method can be called
without initialization and is never
null.
-
newMessageFormatter
public MessageFormatter newMessageFormatter()
- Specified by:
newMessageFormatterin interfaceMessageFormatterFactoryObject
-
postInit
public void postInit()
Description copied from class:FactoryObjectImplementationCalled after all factories are initialized withFactoryObjectImplementation.preInit(AbstractParameter[])and bind to the factory.- Specified by:
postInitin classFactoryObjectImplementation
-
preInit
public void preInit(AbstractParameter[] parameter)
Description copied from class:FactoryObjectImplementationCalled directly after creating the implementation.- Specified by:
preInitin classFactoryObjectImplementation- Parameters:
parameter- The parameters to initialize the implementation.
-
-