Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.knipp.rritoolkit.response
Class ResultMessage

    java.lang.Object
      de.knipp.rritoolkit.response.ResultMessage

    public class ResultMessage

extends java.lang.Object

this class encapsulates result messages contained in the DENIC responses

Version:
  $Revision: 14936 $
Author:
  Klaus Malorny

Nested Class Summary
`static class` | `ResultMessage.Level` enumeration for the different error levels of a message

Field Summary
`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 Summary
`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

Method Summary
`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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### level

    private ResultMessage.Level level

  the level of the message

### code

    private ErrorCode code

  the error code

### message

    private java.lang.String message

  the textual message

### arguments

    private java.util.List<java.lang.String> arguments

  the arguments

### messagePattern

    private static java.util.regex.Pattern messagePattern

  the pattern for the value part

Constructor Detail

### ResultMessage

    public ResultMessage(java.lang.String key,
                         boolean levelFromKey,
                         java.lang.String value)
                  throws ResponseParseException

  constructor for key-value pairs

  Parameters:
    `key` - the key
    `levelFromKey` - if `true`, the level is derived from the key, otherwise it is derived from the message code itself
    `value` - the code and message
  Throws:
    `ResponseParseException` - if the key and value do not represent a message

### ResultMessage

    public ResultMessage(org.w3c.dom.Element el)
                  throws org.w3c.dom.DOMException,
                         ResponseParseException

  constructor for XML

  Parameters:
    `el` - the message element
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions
    `ResponseParseException` - if the key and value do not represent a message

Method Detail

### toString

    public java.lang.String toString()

  return a string representation for debugging purposes

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the string

### getLevel

    public ResultMessage.Level getLevel()

  return the error level

  Returns:
    the level

### getCode

    public ErrorCode getCode()

  return the message code

  Returns:
    the message code

### getMessage

    public java.lang.String getMessage()

  return the message text

  Returns:
    the message text

### getArguments

    public java.util.List<java.lang.String> getArguments()

  return the arguments

  Returns:
    the arguments as a list

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2011 Knipp Medien und Kommunikation GmbH