Class EPPNamestoreExtNSExtErrData

java.lang.Object
com.verisign.epp.codec.namestoreext.EPPNamestoreExtNSExtErrData
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPNamestoreExtNSExtErrData extends Object implements EPPCodecComponent
Namestore <nsExtErrData> extension element to an error EPP Response. The error code and message is currently associated with an EPP response code of 2306 "Parameter value policy error", and can have one of the EPPNamestoreExtNSExtErrDataERROR constant values. Optionally, a "lang" attribute can be provide to indicate the language. The default value for "lang" is "en" (English).

See Also:
  • Field Details

    • DEFAULT_LANG

      public static final String DEFAULT_LANG
      The default language of the error message "en".
      See Also:
    • ERROR_SUB_PRODUCT_NOT_EXISTS

      public static final int ERROR_SUB_PRODUCT_NOT_EXISTS
      Specified sub-product does not exist
      See Also:
    • ELM_NAME

      public static final String ELM_NAME
      XML root tag for EPPNamestoreExtNSExtErrData.
      See Also:
  • Constructor Details

    • EPPNamestoreExtNSExtErrData

      public EPPNamestoreExtNSExtErrData()
      Default constructor. The error code is set to -1.
    • EPPNamestoreExtNSExtErrData

      public EPPNamestoreExtNSExtErrData(int aCode)
      Constructor that sets the error code. Use of the the ERROR constants for the error code.
      Parameters:
      aCode - Error code
  • Method Details

    • getCode

      public int getCode()
      Gets the error code.
      Returns:
      Error code that should be one of the ERROR constant values.
    • setCode

      public void setCode(int aCode)
      Sets the error code.
      Parameters:
      aCode - Error code that should be one of the ERROR constant values.
    • setCode

      public void setCode(int aCode, boolean aUseDefaultMessage)
      Sets the error code and the default "en" message associated with the error code if aUserDefaultMessage is set to true.
      Parameters:
      aCode - Error code that should be one of the ERROR constant values.
      aUseDefaultMessage - Use the default en message associated with aCode?
    • getMessage

      public String getMessage()
      Gets the error message.
      Returns:
      Error message associated with the error code in the specified language.
    • setMessage

      public void setMessage(String aMessage)
      Sets the error message. This should only be called if the default "en" language message is not valid.
      Parameters:
      aMessage - Error message associated with the error code in the specified language.
    • getLang

      public String getLang()
      Gets the error message language. The Language must be structured as documented in [RFC1766].
      Returns:
      Error message language.
    • setLang

      public void setLang(String aLang)
      Sets the error message language. The Language must be structured as documented in [RFC1766].
      Parameters:
      aLang - DOCUMENT ME!
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attributeis appended as a child node.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document, which acts is an Element factory
      Returns:
      Element Root element associated with the object
      Throws:
      EPPEncodeException - Error encoding EPPNamestoreExtNSExtErrData
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode a DOM element tree to initialize the instance attributes. The aElement argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Element to decode
      Throws:
      EPPDecodeException - Error decoding Element
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPNamestoreExtNSExtErrData with this instance.
      Overrides:
      equals in class Object
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if equal; false otherwise.
    • clone

      public Object clone() throws CloneNotSupportedException
      clone an EPPCodecComponent.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of concrete EPPNamestoreExtNSExtErrData
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • getRootElm

      protected String getRootElm()
      Gets the root element name.
      Returns:
      "persReg:creErrData"
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.