Package com.verisign.epp.codec.gen
Class EPPCredentials
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPCredentials
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPCredentials extends java.lang.Object implements EPPCodecComponent
Represents the optional <creds> element in an EPP Command. A "cred" element SHALL contain the following child elements:- A "clID" element that contains the client identifier assigned to the
client by the server. The value of this element is case insensitive. Use
getClientIdandsetClientIdto get and set the element. - A "pw" element that contains the client's plain text password. Use
getPasswordandsetPasswordto get and set the element. - An OPTIONAL "newPW" element that contains a new plain text password to be
assigned to the client for use with subsequent "login" commands. The value of
this element is case sensitive. Use
getNewPasswordandsetNewPasswordto get and set the element. - An "options" element that contains the "version" and "lang" elements. Use
getVersionandsetVersionto get and set the version. UsegetLangandsetLangto get and set the language.
- See Also:
EPPCommand, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_PASSWORD_LENMaximum length of a password.static intMIN_PASSWORD_LENMinimum length of a password.
-
Constructor Summary
Constructors Constructor Description EPPCredentials()Allocates a newEPPCredentialswith the following default attribute values:
client id - Default ofnull.EPPCredentials(java.lang.String aClientId, java.lang.String aPassword)Allocates a newEPPCredentialswith the required attributes.EPPCredentials(java.lang.String aClientId, java.lang.String aPassword, java.lang.String aNewPassword)Allocates a newEPPCredentialswith client id, password, and new password.EPPCredentials(java.lang.String aClientId, java.lang.String aPassword, java.lang.String aNewPassword, java.lang.String aVersion, java.lang.String aLang)Allocates a newEPPCredentialswith all attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPCredentials.voiddecode(org.w3c.dom.Element aElement)decodeEPPCredentialsfrom a DOM element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)encodeEPPCredentialsinto a DOM element tree.booleanequals(java.lang.Object aObject)implements a deepEPPCredentialscompare.java.lang.StringgetClientId()Gets the client login identifier.java.lang.StringgetLang()Gets the desired EPP language.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.StringgetNewPassword()Gets the new client password.java.lang.StringgetPassword()Gets the client password.java.lang.StringgetVersion()Gets the desired EPP version.booleanhasNewPassword()Is a new password defined?voidsetClientId(java.lang.String aClientId)Sets the client login identifier.voidsetLang(java.lang.String aLang)Sets the desired EPP language.voidsetNewPassword(java.lang.String aNewPassword)Sets the new client password.voidsetPassword(java.lang.String aPassword)Sets the client password.voidsetVersion(java.lang.String aVersion)Sets the desired EPP version.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
MIN_PASSWORD_LEN
public static final int MIN_PASSWORD_LEN
Minimum length of a password.- See Also:
- Constant Field Values
-
MAX_PASSWORD_LEN
public static final int MAX_PASSWORD_LEN
Maximum length of a password.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPCredentials
public EPPCredentials()
Allocates a newEPPCredentialswith the following default attribute values:
- client id - Default of
null. Set withsetClientId - password - Default of
null. Set withsetPassword - new password - Default of
null. Set withsetNewPassword - version - Default of
EPPCodec.VERSION. Set withsetVersion - language - Default of "en". Set with
setLang
- client id - Default of
-
EPPCredentials
public EPPCredentials(java.lang.String aClientId, java.lang.String aPassword)Allocates a newEPPCredentialswith the required attributes. The other attributes are initialized as follows:
- new password - Default of
null. Set withsetNewPassword - version - Default of
EPPCodec.VERSION. Set withsetVersion - language - Default of "en". Set with
setLang
- Parameters:
aClientId- Client login idaPassword- Client password
- new password - Default of
-
EPPCredentials
public EPPCredentials(java.lang.String aClientId, java.lang.String aPassword, java.lang.String aNewPassword)Allocates a newEPPCredentialswith client id, password, and new password. The other attributes are initialized as follows:
- version - Default of
EPPCodec.VERSION. Set withsetVersion - language - Default of "en". Set with
setLang
- Parameters:
aClientId- Client login idaPassword- Client passwordaNewPassword- Client new password
- version - Default of
-
EPPCredentials
public EPPCredentials(java.lang.String aClientId, java.lang.String aPassword, java.lang.String aNewPassword, java.lang.String aVersion, java.lang.String aLang)Allocates a newEPPCredentialswith all attributes.- Parameters:
aClientId- Client login idaPassword- Client passwordaNewPassword- Client new passwordaVersion- EPP protocol version desired by ClientaLang- Desired language for result messages
-
-
Method Detail
-
getClientId
public java.lang.String getClientId()
Gets the client login identifier.- Returns:
- Client login identifier if defined;
nullotherwise.
-
setClientId
public void setClientId(java.lang.String aClientId)
Sets the client login identifier.- Parameters:
aClientId- Client login identifier.
-
getPassword
public java.lang.String getPassword()
Gets the client password.- Returns:
- Client password if defined;
nullotherwise.
-
setPassword
public void setPassword(java.lang.String aPassword)
Sets the client password.- Parameters:
aPassword- Client password.
-
getNewPassword
public java.lang.String getNewPassword()
Gets the new client password.- Returns:
- New client password if defined;
nullotherwise.
-
setNewPassword
public void setNewPassword(java.lang.String aNewPassword)
Sets the new client password.- Parameters:
aNewPassword- New client password.
-
hasNewPassword
public boolean hasNewPassword()
Is a new password defined?- Returns:
trueif the new password is defined;falseotherwise.
-
getVersion
public java.lang.String getVersion()
Gets the desired EPP version. The default version is set toEPPCodec.VERSION.- Returns:
- EPP version identifier if defined;
nullotherwise.
-
setVersion
public void setVersion(java.lang.String aVersion)
Sets the desired EPP version. The default version is set toEPPCodec.VERSION.- Parameters:
aVersion- EPP version identifier
-
getLang
public java.lang.String getLang()
Gets the desired EPP language. The EPP language determines the language of the error description strings and should be one of the supported languages of theEPPGreeting. The default language is "en".- Returns:
- The desired EPP language if defined;
nullotherwise.
-
setLang
public void setLang(java.lang.String aLang)
Sets the desired EPP language. The EPP language determines the language of the error description strings and should be one of the supported languages of theEPPGreeting. The default language is "en".- Parameters:
aLang- The desired EPP language
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionencodeEPPCredentialsinto a DOM element tree.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM document used as a factory of DOM objects.- Returns:
- Encoded DOM element.
- Throws:
EPPEncodeException- Error encoding the DOM element tree.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptiondecodeEPPCredentialsfrom a DOM element tree. TheaElementargument needs to be the "trans-id" element, or an element that conforms to the XML structure of "trans-id".- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- The "trans-id" XML element.- Throws:
EPPDecodeException- Error decoding the DOM element tree.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPCredentialscompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPCredentialsinstance to compare with
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPCredentials.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- Deep copy clone of
EPPCredentials - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-