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 Response

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

Direct Known Subclasses:
  AuthInfo1CreateResponse, AuthInfo1DeleteResponse, AuthInfo2CreateResponse, ContactCheckResponse, ContactCreateResponse, ContactInfoResponse, ContactUpdateResponse, DomainChangeHolderResponse, DomainChangeProvResponse, DomainCheckResponse, DomainCreateResponse, DomainDeleteResponse, DomainInfoResponse, DomainMigrateDescrResponse, DomainTransitResponse, DomainUpdateResponse, LoginResponse, LogoutResponse, QueueDeleteResponse, QueueReadResponse

    public class Response

extends java.lang.Object

base class for all DENIC responses

Version:
  $Revision: 14936 $
Author:
  Klaus Malorny

Nested Class Summary
`static class` | `Response.Result` enumeration for the different result types of a response

Field Summary
`private java.lang.String` | `clientTxnID` the client transaction ID
`private static java.lang.String[]` | `messageKeys` the message keys
`private Response.Result` | `result` the overall result
`private java.util.List<ResultMessage>` | `resultMessages` additional result messages
`private java.lang.String` | `serverTxnID` the server transaction ID

Constructor Summary
`Response()`

Method Summary
`void` | `accept(ResponseVisitor visitor)` call the suitable method of the given visitor
`protected void` | `dataFromList(KVMultiList list)` subclasses that need to read additional data from the key-value pair response should override this method.
`protected void` | `dataFromXml(org.w3c.dom.Element data)` subclasses that need to read additional data from the XML response should override this method.
`void` | `fromList(KVMultiList list)` initialize the instance from the given key-value multi-list
`void` | `fromXml(org.w3c.dom.Document doc)` initialize the instance from the given XML DOM document.
`java.lang.String` | `getClientTxnID()` returns the client transaction ID
`Response.Result` | `getResult()` returns the result
`java.util.List<ResultMessage>` | `getResultMessages()` returns a list of list of the supplied result messages
`java.lang.String` | `getServerTxnID()` returns the server transaction ID
`boolean` | `isSuccess()` returns whether the result is `Success`
`java.lang.String` | `toString()` returns 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

### clientTxnID

    private java.lang.String clientTxnID

  the client transaction ID

### serverTxnID

    private java.lang.String serverTxnID

  the server transaction ID

### result

    private Response.Result result

  the overall result

### resultMessages

    private java.util.List<ResultMessage> resultMessages

  additional result messages

### messageKeys

    private static final java.lang.String[] messageKeys

  the message keys

Constructor Detail

### Response

    public Response()

Method Detail

### fromXml

    public void fromXml(org.w3c.dom.Document doc)
                 throws org.w3c.dom.DOMException,
                        ResponseParseException

  initialize the instance from the given XML DOM document.

  Parameters:
    `doc` - the document
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions
    `ResponseParseException` - if the document does not contain the expected content

### dataFromXml

    protected void dataFromXml(org.w3c.dom.Element data)
                        throws org.w3c.dom.DOMException,
                               ResponseParseException

  subclasses that need to read additional data from the XML response should override this method. The default implementation is empty and need not to be called.

  Parameters:
    `data` - the data element or `null` if the data contains no additional data
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions
    `ResponseParseException` - if the document does not contain the expected content

### fromList

    public void fromList(KVMultiList list)
                  throws ResponseParseException

  initialize the instance from the given key-value multi-list

  Parameters:
    `list` - the multilist
  Throws:
    `ResponseParseException` - if the list does not contain the expected content

### dataFromList

    protected void dataFromList(KVMultiList list)
                         throws ResponseParseException

  subclasses that need to read additional data from the key-value pair response should override this method. The default implementation is empty and need not to be called.

  Parameters:
    `list` - the list
  Throws:
    `ResponseParseException` - if the document does not contain the expected content

### accept

    public void accept(ResponseVisitor visitor)

  call the suitable method of the given visitor

  Parameters:
    `visitor` - the visitor

### toString

    public java.lang.String toString()

  returns a string representation for debugging purposes

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

### getResult

    public Response.Result getResult()

  returns the result

  Returns:
    the result

### isSuccess

    public boolean isSuccess()

  returns whether the result is `Success`

  Returns:
    `true` if so

### getServerTxnID

    public java.lang.String getServerTxnID()

  returns the server transaction ID

  Returns:
    the ID or `null` if none was supplied

### getClientTxnID

    public java.lang.String getClientTxnID()

  returns the client transaction ID

  Returns:
    the ID or `null` if none was supplied

### getResultMessages

    public java.util.List<ResultMessage> getResultMessages()

  returns a list of list of the supplied result messages

  Returns:
    the 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