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 String
format(String component, String key)
String
format(String component, String key, ClassLoader cl)
String
format(String component, String key, Object parameter1)
String
format(String component, String key, Object[] parameters)
String
format(String component, String key, Object[] parameters, ClassLoader cl)
String
format(String component, String key, Object parameter1, ClassLoader cl)
String
format(String component, String key, Object parameter1, Object parameter2)
String
format(String component, String key, Object parameter1, Object parameter2, ClassLoader cl)
String
format(String component, String key, Object parameter1, Object parameter2, Object parameter3)
String
format(String component, String key, Object parameter1, Object parameter2, Object parameter3, ClassLoader cl)
String
format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4)
String
format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, ClassLoader cl)
String
format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, Object parameter5)
String
format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, Object parameter5, ClassLoader cl)
Locale
getLocale()
List<Parameter>
getParameters()
MessageFormatter
newMessageFormatter()
void
postInit()
Called after all factories are initialized withFactoryObjectImplementation.preInit(AbstractParameter[])
and bind to the factory.void
preInit(AbstractParameter[] parameter)
Called directly after creating the implementation.void
setLocale(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:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, ClassLoader cl)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, ClassLoader cl)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, ClassLoader cl)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, ClassLoader cl)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, ClassLoader cl)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, Object parameter5)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object parameter1, Object parameter2, Object parameter3, Object parameter4, Object parameter5, ClassLoader cl)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object[] parameters)
- Specified by:
format
in interfaceMessageFormatter
-
format
public String format(String component, String key, Object[] parameters, ClassLoader cl)
- Specified by:
format
in interfaceMessageFormatter
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfaceMessageFormatter
-
setLocale
public void setLocale(Locale newLocale)
- Specified by:
setLocale
in interfaceMessageFormatter
-
getParameters
public List<Parameter> getParameters()
- Specified by:
getParameters
in 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:
newMessageFormatter
in interfaceMessageFormatterFactoryObject
-
postInit
public void postInit()
Description copied from class:FactoryObjectImplementation
Called after all factories are initialized withFactoryObjectImplementation.preInit(AbstractParameter[])
and bind to the factory.- Specified by:
postInit
in classFactoryObjectImplementation
-
preInit
public void preInit(AbstractParameter[] parameter)
Description copied from class:FactoryObjectImplementation
Called directly after creating the implementation.- Specified by:
preInit
in classFactoryObjectImplementation
- Parameters:
parameter
- The parameters to initialize the implementation.
-
-