public class ResultMessage
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ResultMessage.Level
enumeration for the different error levels of a message
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
arguments
the arguments
|
private ErrorCode |
code
the error code
|
private ResultMessage.Level |
level
the level of the message
|
private java.lang.String |
message
the textual message
|
private static java.util.regex.Pattern |
messagePattern
the pattern for the value part
|
Constructor and Description |
---|
ResultMessage(org.w3c.dom.Element el)
constructor for XML
|
ResultMessage(java.lang.String key,
boolean levelFromKey,
java.lang.String value)
constructor for key-value pairs
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getArguments()
return the arguments
|
ErrorCode |
getCode()
return the message code
|
ResultMessage.Level |
getLevel()
return the error level
|
java.lang.String |
getMessage()
return the message text
|
java.lang.String |
toString()
return a string representation for debugging purposes
|
private ResultMessage.Level level
private ErrorCode code
private java.lang.String message
private java.util.List<java.lang.String> arguments
private static java.util.regex.Pattern messagePattern
public ResultMessage(java.lang.String key, boolean levelFromKey, java.lang.String value) throws ResponseParseException
key
- the keylevelFromKey
- if true
, the level is derived
from the key, otherwise it is derived
from the message code itselfvalue
- the code and messageResponseParseException
- if the key and value do not represent a
messagepublic ResultMessage(org.w3c.dom.Element el) throws org.w3c.dom.DOMException, ResponseParseException
el
- the message elementorg.w3c.dom.DOMException
- on DOM exceptionsResponseParseException
- if the key and value do not represent a
messagepublic java.lang.String toString()
toString
in class java.lang.Object
public ResultMessage.Level getLevel()
public ErrorCode getCode()
public java.lang.String getMessage()
public java.util.List<java.lang.String> getArguments()
Copyright © 2005-2013 Knipp Medien und Kommunikation GmbH