|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.config.i18n.MessageFactory
public abstract class MessageFactory
Field Summary | |
---|---|
protected Log |
logger
|
Constructor Summary | |
---|---|
MessageFactory()
|
Method Summary | |
---|---|
protected Message |
createMessage(String bundlePath,
int code)
Factory method to create a new Message instance that is filled with the formatted
message with id code from the resource bundle bundlePath . |
protected Message |
createMessage(String bundlePath,
int code,
Object... arguments)
Factory method to create a new Message instance that is filled with the formatted
message with id code from the resource bundle bundlePath . |
protected Message |
createMessage(String bundlePath,
int code,
Object arg)
Factory method to create a new Message instance that is filled with the formatted
message with id code from the resource bundle bundlePath . |
protected Message |
createMessage(String bundlePath,
int code,
Object arg1,
Object arg2)
Factory method to create a new Message instance that is filled with the formatted
message with id code from the resource bundle bundlePath . |
protected Message |
createMessage(String bundlePath,
int code,
Object arg1,
Object arg2,
Object arg3)
Factory method to create a new Message instance that is filled with the formatted
message with id code from the resource bundle bundlePath . |
static Message |
createStaticMessage(String message)
Factory method to create a Message instance that is not read from a resource bundle. |
protected static String |
getBundlePath(String bundleName)
Computes the bundle's full path ( META-INF/services/org/mule/i18n/<bundleName>-messages.properties ) from
bundleName . |
protected ClassLoader |
getClassLoader()
Override this method to return the classloader for the bundle/module which contains the needed resource files. |
protected String |
getString(String bundlePath,
int code)
Factory method to read the message with code code from the resource bundle. |
protected String |
getString(String bundlePath,
int code,
Object arg)
Factory method to read the message with code code from the resource bundle. |
protected String |
getString(String bundlePath,
int code,
Object[] args)
|
protected String |
getString(String bundlePath,
int code,
Object arg1,
Object arg2)
Factory method to read the message with code code from the resource bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient Log logger
Constructor Detail |
---|
public MessageFactory()
Method Detail |
---|
protected static String getBundlePath(String bundleName)
META-INF/services/org/mule/i18n/<bundleName>-messages.properties
) from
bundleName
.
bundleName
- Name of the bundle without the "messages" suffix and without
file extension.protected Message createMessage(String bundlePath, int code, Object arg)
Message
instance that is filled with the formatted
message with id code
from the resource bundle bundlePath
.
bundlePath
- complete path to the resource bundle for lookupcode
- numeric code of the messagearg
- getBundlePath(String)
protected Message createMessage(String bundlePath, int code, Object arg1, Object arg2)
Message
instance that is filled with the formatted
message with id code
from the resource bundle bundlePath
.
bundlePath
- complete path to the resource bundle for lookupcode
- numeric code of the messagearg1
- arg2
- getBundlePath(String)
protected Message createMessage(String bundlePath, int code, Object arg1, Object arg2, Object arg3)
Message
instance that is filled with the formatted
message with id code
from the resource bundle bundlePath
.
bundlePath
- complete path to the resource bundle for lookupcode
- numeric code of the messagearg1
- arg2
- arg3
- getBundlePath(String)
protected Message createMessage(String bundlePath, int code, Object... arguments)
Message
instance that is filled with the formatted
message with id code
from the resource bundle bundlePath
.
Attention: do not confuse this method with
createMessage(String, int, Object)
.
bundlePath
- complete path to the resource bundle for lookupcode
- numeric code of the messagearguments
- getBundlePath(String)
protected Message createMessage(String bundlePath, int code)
Message
instance that is filled with the formatted
message with id code
from the resource bundle bundlePath
.
bundlePath
- complete path to the resource bundle for lookupcode
- numeric code of the messagepublic static Message createStaticMessage(String message)
Message
instance that is not read from a resource bundle.
message
- Message's message text
protected String getString(String bundlePath, int code)
code
from the resource bundle.
bundlePath
- complete path to the resource bundle for lookupcode
- numeric code of the message
String
protected String getString(String bundlePath, int code, Object arg)
code
from the resource bundle.
bundlePath
- complete path to the resource bundle for lookupcode
- numeric code of the messagearg
-
String
protected String getString(String bundlePath, int code, Object arg1, Object arg2)
code
from the resource bundle.
bundlePath
- complete path to the resource bundle for lookupcode
- numeric code of the messagearg1
- arg2
-
String
protected String getString(String bundlePath, int code, Object[] args)
protected ClassLoader getClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |