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

## com.verisign.epp.codec.suggestion
Class EPPSuggestionInfoResp

    java.lang.Object
      com.verisign.epp.codec.gen.EPPResponse
          com.verisign.epp.codec.suggestion.EPPSuggestionInfoResp

All Implemented Interfaces:
  EPPCodecComponent, EPPMessage, java.io.Serializable, java.lang.Cloneable

    public class EPPSuggestionInfoResp

extends EPPResponse

An `EPPSuggestionInfoResp` provides an answer to an `EPPSuggestionInfoCmd` and includes the following attributes:

- key - Required suggestion key that matches the `EPPSuggestionInfoCmd` key
- answer - Optional answer in either grid or table view
- tokens - Optional suggestion tokens

Author:
  jcolosi
See Also:
  `EPPSuggestionInfoCmd`, Serialized Form

Field Summary

Fields inherited from class com.verisign.epp.codec.gen.EPPResponse
`extensions, TRANSFER_CLIENT_APPROVED, TRANSFER_CLIENT_CANCELLED, TRANSFER_CLIENT_REJECTED, TRANSFER_PENDING, TRANSFER_SERVER_APPROVED, TRANSFER_SERVER_CANCELLED`

Constructor Summary
`EPPSuggestionInfoResp()` Default constructor that needs the `key` attribute and the transid attribute set prior to calling `encode`.
`EPPSuggestionInfoResp(EPPTransId aTransId)` Creates an `EPPSuggestionInfoResp` only the transaction id set.
`EPPSuggestionInfoResp(EPPTransId aTransId, java.lang.String aKey)` Creates an `EPPSuggestionInfoResp` with the required attributes set.
`EPPSuggestionInfoResp(EPPTransId aTransId, java.lang.String aKey, java.lang.String aLanguage, java.util.List<EPPSuggestionToken> aTokens, EPPSuggestionAnswer aAnswer)` Creates an `EPPSuggestionInfoResp` with the all the attributes.

Method Summary
`void` | `addToken(EPPSuggestionToken aToken)` Adds a suggestion token to the response.
`java.lang.Object` | `clone()` Clone `EPPResponse`.
`protected void` | `doDecode(org.w3c.dom.Element aElement)` Decodes the attributes of the concrete `EPPResponse` and must be overridden by `EPPResponse` derived classes.
`protected org.w3c.dom.Element` | `doEncode(org.w3c.dom.Document aDocument)` Encodes the attributes of the concrete `EPPResponse` and must be overridden by `EPPResponse` derived classes.
`boolean` | `equals(java.lang.Object o)` implements a deep `EPPResponse` compare.
`EPPSuggestionAnswer` | `getAnswer()` Gets the suggestion answer that is either in table or grid view.
`java.lang.String` | `getKey()` Gets the suggestion key.
`java.lang.String` | `getLanguage()`
`java.lang.String` | `getNamespace()` Gets the EPP command namespace associated with `EPPSuggestionInfoResp`.
`java.util.List<EPPSuggestionToken>` | `getTokens()` Gets the suggestion tokens.
`java.lang.String` | `getType()` Gets the EPP response type associated with `EPPSuggestionInfoResp`.
`boolean` | `hasAnswer()` Is the answer defined?
`boolean` | `hasTokens()` Does the response have tokens defined?
`void` | `resetTokens()` Resets the tokens to an empty list.
`void` | `setAnswer(EPPSuggestionAnswer aAnswer)` Sets the suggestion answer in either table or grid view.
`void` | `setKey(java.lang.String aKey)` Sets the suggestion key
`void` | `setLanguage(java.lang.String aLanguage)` sets the suggestion language
`java.lang.String` | `toString()` Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

Methods inherited from class com.verisign.epp.codec.gen.EPPResponse
`addExtension, decode, encode, getExtension, getExtension, getExtensions, getMessageQueue, getMsgQueue, getMsgQueueCount, getMsgQueueDate, getMsgQueueMsg, getQDate, getResult, getResults, getTransId, hasExtension, hasExtensions, hasMessageQueue, hasMsgQueue, hasResultCode, isSuccess, setExtension, setExtensions, setMsgQueue, setResult, setResult, setResult, setResult, setResults, setTransId`

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

Constructor Detail

### EPPSuggestionInfoResp

    public EPPSuggestionInfoResp()

  Default constructor that needs the `key` attribute and the transid attribute set prior to calling `encode`.

### EPPSuggestionInfoResp

    public EPPSuggestionInfoResp(EPPTransId aTransId)

  Creates an `EPPSuggestionInfoResp` only the transaction id set. The `key` attribute must be set prior to calling `encode`.

  Parameters:
    `aTransId` - The transaction id containing the server transaction and optionally the client transaction id

### EPPSuggestionInfoResp

    public EPPSuggestionInfoResp(EPPTransId aTransId,
                                 java.lang.String aKey)

  Creates an `EPPSuggestionInfoResp` with the required attributes set.

  Parameters:
    `aTransId` - The transaction id containing the server transaction and optionally the client transaction id
    `aKey` - Suggestion key

### EPPSuggestionInfoResp

    public EPPSuggestionInfoResp(EPPTransId aTransId,
                                 java.lang.String aKey,
                                 java.lang.String aLanguage,
                                 java.util.List<EPPSuggestionToken> aTokens,
                                 EPPSuggestionAnswer aAnswer)

  Creates an `EPPSuggestionInfoResp` with the all the attributes.

  Parameters:
    `aTransId` - The transaction id containing the server transaction and optionally the client transaction id
    `aKey` - Suggestion key
    `aLanguage` - Suggestion language
    `aTokens` - The optional suggestion tokens
    `aAnswer` - the optional answer in table or grid view

Method Detail

### addToken

    public void addToken(EPPSuggestionToken aToken)
                  throws InvalidValueException

  Adds a suggestion token to the response.

  Parameters:
    `aToken` - Suggestion token to add
  Throws:
    `InvalidValueException`

### hasAnswer

    public boolean hasAnswer()

  Is the answer defined?

  Returns:
    `true` if is defined;`false` otherwise.

### getAnswer

    public EPPSuggestionAnswer getAnswer()

  Gets the suggestion answer that is either in table or grid view.

  Returns:
    Suggestion answer if defined;`null` otherwise.

### getKey

    public java.lang.String getKey()

  Gets the suggestion key.

  Returns:
    Returns the key.

### getNamespace

    public java.lang.String getNamespace()

  Gets the EPP command namespace associated with `EPPSuggestionInfoResp`.

  Specified by:
    `getNamespace` in interface `EPPMessage`
  Overrides:
    `getNamespace` in class `EPPResponse`
  Returns:
    `EPPSuggestionMapFactory.NS`

### hasTokens

    public boolean hasTokens()

  Does the response have tokens defined?

  Returns:
    `true` if is defined;`false` otherwise.

### getTokens

    public java.util.List<EPPSuggestionToken> getTokens()

  Gets the suggestion tokens.

  Returns:
    Returns the tokens if defined;`null` otherwise.

### getType

    public java.lang.String getType()

  Gets the EPP response type associated with `EPPSuggestionInfoResp`.

  Overrides:
    `getType` in class `EPPResponse`
  Returns:
    `EPPSuggestionInfoResp.ELM_NAME`

### resetTokens

    public void resetTokens()

  Resets the tokens to an empty list.

### setAnswer

    public void setAnswer(EPPSuggestionAnswer aAnswer)

  Sets the suggestion answer in either table or grid view.

  Parameters:
    `aAnswer` - The suggestion answer

### setKey

    public void setKey(java.lang.String aKey)

  Sets the suggestion key

  Parameters:
    `aKey` - Suggestion key

### getLanguage

    public java.lang.String getLanguage()

  Returns:
    Returns the language.

### setLanguage

    public void setLanguage(java.lang.String aLanguage)

  sets the suggestion language

  Parameters:
    `aLanguage` - The language to set - a null value will force the default to be set

### toString

    public java.lang.String toString()

  Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

  Overrides:
    `toString` in class `EPPResponse`
  Returns:
    Indented XML `String` if successful; `ERROR` otherwise.

### doDecode

    protected void doDecode(org.w3c.dom.Element aElement)
                     throws EPPDecodeException

  Description copied from class: `EPPResponse`
  Decodes the attributes of the concrete `EPPResponse` and must be overridden by `EPPResponse` derived classes. The default implementation is to do nothing, since `EPPResponse` is a concrete class. `decode` is a Template Method and this method is a Primitive Operation within the Template Method Design Pattern.

  Overrides:
    `doDecode` in class `EPPResponse`
  Parameters:
    `aElement` - root DOM element associated with instance
  Throws:
    `EPPDecodeException` - Error decoding the DOM element tree.

### doEncode

    protected org.w3c.dom.Element doEncode(org.w3c.dom.Document aDocument)
                                    throws EPPEncodeException

  Description copied from class: `EPPResponse`
  Encodes the attributes of the concrete `EPPResponse` and must be overridden by `EPPResponse` derived classes. The default implementation is to do nothing, since `EPPResponse` is a concrete class. `encode` is a Template Method and this method is a Primitive Operation within the Template Method Design Pattern.

  Overrides:
    `doEncode` in class `EPPResponse`
  Parameters:
    `aDocument` - DOM document used as a factory of DOM objects.
  Returns:
    instance root DOM element along with attribute child nodes.
  Throws:
    `EPPEncodeException` - Error encoding the DOM element tree.

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Description copied from class: `EPPResponse`
  Clone `EPPResponse`.

  Specified by:
    `clone` in interface `EPPCodecComponent`
  Overrides:
    `clone` in class `EPPResponse`
  Returns:
    clone of `EPPResponse`
  Throws:
    `java.lang.CloneNotSupportedException` - standard Object.clone exception

### equals

    public boolean equals(java.lang.Object o)

  Description copied from class: `EPPResponse`
  implements a deep `EPPResponse` compare.

  Overrides:
    `equals` in class `EPPResponse`
  Parameters:
    `o` - `EPPResponse` instance to compare with
  Returns:
    `true` if equal; `false` otherwise

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 © VeriSign Inc. All Rights Reserved.