|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<MessageType> de.smartics.exceptions.i18n.message.MessageType
public enum MessageType
Defines the valid message types to be displayed.
Note that most of the time the messages provided to exceptions are intended for the system operator or software developer as long as the presentation tier is not concerned. Displaying messages in the presentation tier often requires more structured text than simple text (e.g. messages shown in a web browser). Presentation tier messages should abstract from the messages provided to the exceptions caught from lower levels.
Displaying messages intended for the operator or software developer to the user will also introduce a security risk. Please refer to Information Leakage and Improper Error Handling for details.
Enum Constant Summary | |
---|---|
DETAILS The suffix for the resource key to fetch details information. |
|
IMPLICATIONS_ON_CURRENT_TASK The suffix for the resource key to fetch information about what implications the abort of the current task has on the work of the user. |
|
SUMMARY The suffix for the resource key to fetch summary information. |
|
TITLE The suffix for the resource key to fetch title information. |
|
URL The suffix for the resource key to fetch an URL that links to further information on the problem. |
|
WHAT_TO_DO_NOW The suffix for the resource key to fetch information about what the user can do now. |
Method Summary | |
---|---|
String |
createKey(String keyPrefix) Returns the key with the message type resource key suffix ( getMessageKeySuffix() ) appended. |
String |
getMessageKeySuffix() Returns the suffix for the resource keys to fetch a specific type of message. |
List<MessageParamParser.MessageParamInfo> |
getMessageParamInfos(MessageParam messageParam) Returns the index information specified in the message parameter for the message type. |
Map<String,List<MessageParamParser.MessageParamInfo>> |
getParentMessageParamInfos(ParentMessageParam messageParam) Returns the index information for the parent attributes specified in the message parameter for the message type. |
static MessageType |
valueOf(String name) Returns the enum constant of this type with the specified name. |
static MessageType[] |
values() Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final MessageType TITLE
This information is intended to provide a simple category to be displayed in window titles. More than one message has the same title.
The value of this constant is ".title"
.
public static final MessageType SUMMARY
The summary is a short explanation of what has happened.
The value of this constant is the empty string.
public static final MessageType DETAILS
The details information gives more details on what has happened. Typical usage of this message type is to add parameter values that were passed to the module that throwed the exception of to give some technical details only relevant to users of the system that track the failure to its root cause.
The value of this constant is ".details"
.
public static final MessageType IMPLICATIONS_ON_CURRENT_TASK
While the summary and details section of the message explained what has happend, the implications show what this means for the current task being aborted. The reader of the message can e.g. be assured that his transaction has been rolled back and no money transfer has taken place.
The value of this constant is ".implications"
.
public static final MessageType WHAT_TO_DO_NOW
If the exception has been raised e.g. because of invalid user input this information can lead the user to what input has been expected. It can also give hints what configuration has lead to this problem in case a subsystem is not available.
The value of this constant is ".todo"
.
public static final MessageType URL
The information references may provide even more details on the type of failure being reported. The referenced page may only have static content that does not quote parameters provided by the exception instance, but may provide structured information and links to related information on a help portal or FAQ.
The value of this constant is ".url"
.
Method Detail |
---|
public static MessageType[] values()
for (MessageType c : MessageType.values()) System.out.println(c);
public static MessageType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant with the specified name
NullPointerException
- if the argument is null
public String getMessageKeySuffix()
public String createKey(String keyPrefix)
getMessageKeySuffix()
) appended.
keyPrefix
- the prefix of the key.
public List<MessageParamParser.MessageParamInfo> getMessageParamInfos(MessageParam messageParam)
messageParam
- the annotation that contains the specific or default index with optional OGNL path.
public Map<String,List<MessageParamParser.MessageParamInfo>> getParentMessageParamInfos(ParentMessageParam messageParam)
messageParam
- the annotation that contains the specific or default index with optional OGNL path for each parent attribute.
getMessageParamInfos(MessageParam)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |