Class EPPAuthInfo

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

public class EPPAuthInfo extends Object implements EPPCodecComponent
Represents authorization information which is a shared structure been used by other mapping such as domain and contact mappings. This object structure is a direct mapping from the data type authInfo in the EPP Shared Structure Schema (with the name space eppcom).
See Also:
  • Field Details

    • TYPE_PW

      public static final short TYPE_PW
      Password auth info type
      See Also:
    • TYPE_EXT

      public static final short TYPE_EXT
      Extensible auth info type.
      See Also:
    • TYPE_NULL

      public static final short TYPE_NULL
      Null type to remove authorization information. This is not supported by all objects.
      See Also:
    • ELM_PW

      protected static final String ELM_PW
      XML Element name for password authorization type
      See Also:
    • ELM_EXT

      protected static final String ELM_EXT
      XML Element name for extensible authorization type
      See Also:
    • ELM_NULL

      protected static final String ELM_NULL
      XML Element name for null authorization type
      See Also:
    • ATTR_ROID

      protected static final String ATTR_ROID
      XML Element roid attribute name of EPPAuthInfo root element.
      See Also:
    • password

      protected String password
      Password authorization information.
    • ext

      protected EPPCodecComponent ext
      Extension authorization information.
    • type

      protected short type
      type, and default value is TYPE_PW
    • roid

      protected String roid
      roid.
  • Constructor Details

    • EPPAuthInfo

      public EPPAuthInfo()
      Default constructor that must have the password or extension attributes set before calling encode.
    • EPPAuthInfo

      public EPPAuthInfo(String aPassword)
      Constructor that takes just the authorization password.
      Parameters:
      aPassword - Authorization password
    • EPPAuthInfo

      public EPPAuthInfo(String aRootNS, String aRootName, String aPassword)
      Constructor that takes the root element and the authorization password.
      Parameters:
      aRootNS - Root element namespace URI
      aRootName - Root element of auth info.
      aPassword - Authorization password
    • EPPAuthInfo

      public EPPAuthInfo(String aRootNS, String aRootName, String aRoid, String aPassword)
      Constructor that takes the root element, the authorization password, and the roid.
      Parameters:
      aRootNS - Root element namespace URI
      aRootName - Root element of auth info.
      aRoid - Roid of the Registrant
      aPassword - Authorization password
    • EPPAuthInfo

      public EPPAuthInfo(EPPCodecComponent aExt)
      Constructor that takes just the authorization extension.
      Parameters:
      aExt - Extension authorization element
    • EPPAuthInfo

      public EPPAuthInfo(String aRootNS, String aRootName, EPPCodecComponent aExt)
      Constructor that takes a root elemeent and the authorization extension.
      Parameters:
      aRootNS - Root element namespace URI
      aRootName - Root element of auth info.
      aExt - Extension authorization element
  • Method Details

    • getRoid

      public String getRoid()
      Get Registry Object IDentifier (ROID).
      Returns:
      Registry Object IDentifier (ROID)
    • setRoid

      public void setRoid(String aRoid)
      Set Registry Object IDentifier (ROID).
      Parameters:
      aRoid - The Registry Object IDentifier (ROID) value.
    • getRootNS

      public String getRootNS()
      Gets the root element XML namespace URI.
      Returns:
      root element XML namespace URI
    • getRootName

      public String getRootName()
      Get root name such as domain or contact.
      Returns:
      String
    • setRootName

      public void setRootName(String aRootNS, String newRootName)
      Set root name and XML namespace.
      Parameters:
      aRootNS - Root element namespace URI
      newRootName - String
    • getAuthInfo

      @Deprecated public String getAuthInfo()
      Deprecated.
      Replaced by getPassword().
      Gets the password authorization information.
      Returns:
      Password
    • hasPassword

      public boolean hasPassword()
      Has the the password been set with a non-empty value?
      Returns:
      true if the password has has been set with a non-empty value; false otherwise.
    • getPassword

      public String getPassword()
      Gets the password authorization information.
      Returns:
      Authorization password
    • setPassword

      public void setPassword(String aPassword)
      Sets the password authorization information.
      Parameters:
      aPassword - Authorization password
    • removePassword

      public void removePassword()
      Removes the password authorization information on update. This option is not supported by all objects and only available with the update command. It will result in setting the type to TYPE_NULL.
    • hasExt

      public boolean hasExt()
      Has the the the extension authorization set?
      Returns:
      true if the extension authorization has been set; false otherwise.
    • getExt

      public EPPCodecComponent getExt()
      Gets the extension authorization.
      Returns:
      Authorization extension
    • setExt

      public void setExt(EPPCodecComponent aExt)
      Sets the extension authorization information.
      Parameters:
      aExt - Authorization extension
    • setAuthInfo

      @Deprecated public void setAuthInfo(String aPassword)
      Deprecated.
      Replaced by setPassword(String).
      Sets the password authorization information.
      Parameters:
      aPassword - Authorization password
    • getType

      public short getType()
      Get the type of the auth info.
      Returns:
      One of the TYPE_ constants.
    • setType

      public void setType(short aType)
      Set auth info type. The default value is TYPE_PW.
      Parameters:
      aType - One of the TYPE_ constants
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPAuthInfo.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPAuthInfo
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPAuthInfo attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - - Root DOM Element to decode EPPDomainContact from.
      Throws:
      EPPDecodeException - - Unable to decode aElement.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPAuthInfo instance.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - - DOM Document that is being built. Used as an Element factory.
      Returns:
      Element - Root DOM Element representing the EPPAuthInfo instance.
      Throws:
      EPPEncodeException - - Unable to encode EPPAuthInfo instance.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPAuthInfo compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPAuthInfo instance to compare with
      Returns:
      true if equal; false otherwise
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getNamespace

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