Class EPPLoginSec

java.lang.Object
com.verisign.epp.codec.loginsec.v1_0.EPPLoginSec
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPLoginSec extends Object implements EPPCodecComponent
Login Security Extension that extends an EPPLoginCmd to support passing a longer password (pw) or new password (newPW).
See Also:
  • Field Details

    • LOGIN_SECURITY_PASSWORD

      public static final String LOGIN_SECURITY_PASSWORD
      Password set in the pw or newPW fields of the login command if overridden the password with the password in the extension.
      See Also:
    • ELM_LOCALNAME

      public static final String ELM_LOCALNAME
      XML local name for EPPLoginSec.
      See Also:
    • ELM_NAME

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

    • EPPLoginSec

      public EPPLoginSec()
      Default constructor for EPPLoginSec.
    • EPPLoginSec

      public EPPLoginSec(EPPLoginSecUserAgent aUserAgent)
      EPPLoginSec constructor that takes the client user agent.
      Parameters:
      aUserAgent - Client user agent
    • EPPLoginSec

      public EPPLoginSec(EPPLoginSecUserAgent aUserAgent, String aPassword)
      EPPLoginSec constructor that takes the password.
      Parameters:
      aUserAgent - Client user agent. Set to null if undefined.
      aPassword - Client password
    • EPPLoginSec

      public EPPLoginSec(EPPLoginSecUserAgent aUserAgent, String aPassword, String aNewPassword)
      EPPLoginSec constructor that takes all attributes (user agent, password, and new password).
      Parameters:
      aUserAgent - Client user agent. Set to null if undefined.
      aPassword - Client password
      aNewPassword - New client password
  • Method Details

    • hasUserAgent

      public boolean hasUserAgent()
      Is a user agent defined?
      Returns:
      true if the user agent is defined; false otherwise.
    • getUserAgent

      public EPPLoginSecUserAgent getUserAgent()
      Gets the user agent.
      Returns:
      User agent if defined; null otherwise.
    • setUserAgent

      public void setUserAgent(EPPLoginSecUserAgent aUserAgent)
      Sets the user agent.
      Parameters:
      aUserAgent - User agent. Set to null to unset the user agent.
    • hasPassword

      public boolean hasPassword()
      Is a password defined?
      Returns:
      true if the password is defined; false otherwise.
    • getPassword

      public String getPassword()
      Gets the client password.
      Returns:
      Client password if defined; null otherwise.
    • setPassword

      public void setPassword(String aPassword)
      Sets the client password.
      Parameters:
      aPassword - Client password.
    • hasNewPassword

      public boolean hasNewPassword()
      Is a new password defined?
      Returns:
      true if the new password is defined; false otherwise.
    • getNewPassword

      public String getNewPassword()
      Gets the new client password.
      Returns:
      New client password if defined; null otherwise.
    • setNewPassword

      public void setNewPassword(String aNewPassword)
      Sets the new client password.
      Parameters:
      aNewPassword - New client password.
    • 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 attribute is 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 EPPLoginSec
    • 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 EPPLoginSec 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 instance.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of concrete EPPLoginSec
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • 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.