Class EPPLoginSec
- java.lang.Object
-
- com.verisign.epp.codec.loginsec.v1_0.EPPLoginSec
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPLoginSec extends java.lang.Object implements EPPCodecComponent
Login Security Extension that extends anEPPLoginCmd
to support passing a longer password (pw
) or new password (newPW
).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
XML local name forEPPLoginSec
.static java.lang.String
ELM_NAME
XML root tag forEPPLoginSec
.static java.lang.String
LOGIN_SECURITY_PASSWORD
Password set in thepw
ornewPW
fields of the login command if overridden the password with the password in the extension.
-
Constructor Summary
Constructors Constructor Description EPPLoginSec()
Default constructor forEPPLoginSec
.EPPLoginSec(EPPLoginSecUserAgent aUserAgent)
EPPLoginSec
constructor that takes the client user agent.EPPLoginSec(EPPLoginSecUserAgent aUserAgent, java.lang.String aPassword)
EPPLoginSec
constructor that takes the password.EPPLoginSec(EPPLoginSecUserAgent aUserAgent, java.lang.String aPassword, java.lang.String aNewPassword)
EPPLoginSec
constructor that takes all attributes (user agent, password, and new password).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Clone anEPPCodecComponent
instance.void
decode(org.w3c.dom.Element aElement)
Decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode instance into a DOM element tree.boolean
equals(java.lang.Object aObject)
Compare an instance ofEPPLoginSec
with this instance.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getNewPassword()
Gets the new client password.java.lang.String
getPassword()
Gets the client password.EPPLoginSecUserAgent
getUserAgent()
Gets the user agent.boolean
hasNewPassword()
Is a new password defined?boolean
hasPassword()
Is a password defined?boolean
hasUserAgent()
Is a user agent defined?void
setNewPassword(java.lang.String aNewPassword)
Sets the new client password.void
setPassword(java.lang.String aPassword)
Sets the client password.void
setUserAgent(EPPLoginSecUserAgent aUserAgent)
Sets the user agent.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
LOGIN_SECURITY_PASSWORD
public static final java.lang.String LOGIN_SECURITY_PASSWORD
Password set in thepw
ornewPW
fields of the login command if overridden the password with the password in the extension.- See Also:
- Constant Field Values
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPLoginSec
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPLoginSec
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPLoginSec
public EPPLoginSec()
Default constructor forEPPLoginSec
.
-
EPPLoginSec
public EPPLoginSec(EPPLoginSecUserAgent aUserAgent)
EPPLoginSec
constructor that takes the client user agent.- Parameters:
aUserAgent
- Client user agent
-
EPPLoginSec
public EPPLoginSec(EPPLoginSecUserAgent aUserAgent, java.lang.String aPassword)
EPPLoginSec
constructor that takes the password.- Parameters:
aUserAgent
- Client user agent. Set tonull
if undefined.aPassword
- Client password
-
EPPLoginSec
public EPPLoginSec(EPPLoginSecUserAgent aUserAgent, java.lang.String aPassword, java.lang.String aNewPassword)
EPPLoginSec
constructor that takes all attributes (user agent, password, and new password).- Parameters:
aUserAgent
- Client user agent. Set tonull
if undefined.aPassword
- Client passwordaNewPassword
- New client password
-
-
Method Detail
-
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 tonull
to unset the user agent.
-
hasPassword
public boolean hasPassword()
Is a password defined?- Returns:
true
if the password is defined;false
otherwise.
-
getPassword
public java.lang.String getPassword()
Gets the client password.- Returns:
- Client password if defined;
null
otherwise.
-
setPassword
public void setPassword(java.lang.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 java.lang.String getNewPassword()
Gets the new client password.- Returns:
- New client password if defined;
null
otherwise.
-
setNewPassword
public void setNewPassword(java.lang.String aNewPassword)
Sets the new client password.- Parameters:
aNewPassword
- New client password.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.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 interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException
- Error encodingEPPLoginSec
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode a DOM element tree to initialize the instance attributes. TheaElement
argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
-Element
to decode- Throws:
EPPDecodeException
- Error decodingElement
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPLoginSec
with this instance.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
- Object to compare with.- Returns:
true
if equal;false
otherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Clone anEPPCodecComponent
instance.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of concrete
EPPLoginSec
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-