Class PropertyFileUtil.Arg
java.lang.Object
jp.ecuacion.lib.core.util.PropertyFileUtil.Arg
- Enclosing class:
PropertyFileUtil
Is considered as an argument string, but you can set message ID replaced to message string
with
PropertyFileUtil.getMessage(String).
In UI application like web,
usually "throw new AppException" part does not care about the locale.
It's taken care at ExceptionHandler.
So you also don't want obtain an appropriate locale
when you put message obtained from PropertyFileUtil.getMsg(...)
into the argument of AppException.
That's why this is needed.
Usually message argument is like {0}, {1}, ...
but BeanValidation message argument is like {value}, {min}, ...
so it supports both of them.
When you want to use the former format you need to set value to messageArgs,
the latter messageArgMap.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic PropertyFileUtil.ArgConstructs a new instance of messageId and messageArgs.static PropertyFileUtil.ArgConstructs a new instance of messageId and messageArgs.static PropertyFileUtil.Argmessage(String messageId, PropertyFileUtil.Arg... messageArgs) Constructs a new instance of messageId and messageArgs.static PropertyFileUtil.ArgConstructs a new instance of normal string.static PropertyFileUtil.Arg[]Constructs an array of new instances of normal string.
-
Method Details
-
string
Constructs a new instance of normal string.- Parameters:
argString- normal string- Returns:
- Arg
-
strings
Constructs an array of new instances of normal string.- Parameters:
argStrings- an array of normal string- Returns:
- Arg[]
-
message
Constructs a new instance of messageId and messageArgs.- Parameters:
messageId- messageId- Returns:
- Arg
-
message
Constructs a new instance of messageId and messageArgs.- Parameters:
messageId- messageIdstringArgs- stringArgs- Returns:
- Arg
-
message
Constructs a new instance of messageId and messageArgs.- Parameters:
messageId- messageIdmessageArgs- messageArgs- Returns:
- Arg
-
getArgString
-
isMessageId
public boolean isMessageId() -
getMessageArgs
-