|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.commons.ErrorType
public class ErrorType
The ErrorType class defines a type of error. In order to define an error you need to provide an ErrorKey and a MessagePattern.
The ErrorKey is a unique identifier for the error that may also be used as a translation key The ErrorKey should always start with the "error." prefix.
The MessagePattern is a template containing the error message and placeholders for additional parameters.
The MessagePattern must be formated according to the MessageFormat
rules.
Constructor Summary | |
---|---|
ErrorType(String errorKey,
String msgPattern)
Defines an error type. |
Method Summary | |
---|---|
String |
getKey()
Returns the error type key (might be used for internationalization). |
String |
getMessagePattern()
Returns the message pattern. |
int |
getNumParams()
Returns the number of parameters required for the message pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorType(String errorKey, String msgPattern)
errorKey
- the error key string (can be used for internationalization)msgPattern
- message pattern in english language used e.g. for loggingMethod Detail |
---|
public String getKey()
public String getMessagePattern()
public int getNumParams()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |