|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.exceptions.i18n.message.MessageParamParser
public final class MessageParamParser
This class provides methods to parse message parameter.
Nested Class Summary | |
---|---|
static class |
MessageParamParser.MessageParamInfo Contains the placeholderId information for one message parameter. |
Method Summary | |
---|---|
static List<MessageParamParser.MessageParamInfo> |
parse(String propertyName, String input) Splits the input string into message param informations. |
static Map<String,List<MessageParamParser.MessageParamInfo>> |
parseParentMessageParam(String input) Parses the content of the parent message parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static List<MessageParamParser.MessageParamInfo> parse(String propertyName, String input) throws ParseException
The expected format is a comma separated list of placeholderId:ognlPath
strings. The OGNL path may be missing, in this case the placeholderId alone.
Example: 0:user.name,4,3:user.id
.
Spaces between tokens are removed.
If the input string is null
or empty, the empty list is returned.
propertyName
- the name of the property whose message parameter is to be parsed.
input
- the input string to parse.
ParseException
- if the input is violating the expected syntax.
public static Map<String,List<MessageParamParser.MessageParamInfo>> parseParentMessageParam(String input) throws ParseException
property=placeholderId:ognl-path
as in cause=1:message
If several properties of a referenced entity are to be displayed at different indices, separate them by commas and the information for different attributes separate by colons (;
).
cause=1:cause.message,3:message,4:localizedMessage; message=5
input
- the input string to parse.
ParseException
- if the input is violating the expected syntax.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |