Package com.verisign.epp.codec.gen
Class EPPCredentials
java.lang.Object
com.verisign.epp.codec.gen.EPPCredentials
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum length of a password.static final intMinimum length of a password. -
Constructor Summary
ConstructorsConstructorDescriptionAllocates a newEPPCredentialswith the following default attribute values:
client id - Default ofnull.EPPCredentials(String aClientId, String aPassword) Allocates a newEPPCredentialswith the required attributes.EPPCredentials(String aClientId, String aPassword, String aNewPassword) Allocates a newEPPCredentialswith client id, password, and new password.EPPCredentials(String aClientId, String aPassword, String aNewPassword, String aVersion, String aLang) Allocates a newEPPCredentialswith all attributes. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPCredentials.voiddecodeEPPCredentialsfrom a DOM element tree.encodeEPPCredentialsinto a DOM element tree.booleanimplements a deepEPPCredentialscompare.Gets the client login identifier.getLang()Gets the desired EPP language.Returns the XML namespace associated with theEPPCodecComponent.Gets the new client password.Gets the client password.Gets the desired EPP version.booleanIs a new password defined?voidsetClientId(String aClientId) Sets the client login identifier.voidSets the desired EPP language.voidsetNewPassword(String aNewPassword) Sets the new client password.voidsetPassword(String aPassword) Sets the client password.voidsetVersion(String aVersion) Sets the desired EPP version.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
MIN_PASSWORD_LEN
public static final int MIN_PASSWORD_LENMinimum length of a password.- See Also:
-
MAX_PASSWORD_LEN
public static final int MAX_PASSWORD_LENMaximum length of a password.- See Also:
-
-
Constructor Details
-
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
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
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(String aClientId, String aPassword, String aNewPassword, String aVersion, 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 Details
-
getClientId
Gets the client login identifier.- Returns:
- Client login identifier if defined;
nullotherwise.
-
setClientId
Sets the client login identifier.- Parameters:
aClientId- Client login identifier.
-
getPassword
Gets the client password.- Returns:
- Client password if defined;
nullotherwise.
-
setPassword
Sets the client password.- Parameters:
aPassword- Client password.
-
getNewPassword
Gets the new client password.- Returns:
- New client password if defined;
nullotherwise.
-
setNewPassword
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
Gets the desired EPP version. The default version is set toEPPCodec.VERSION.- Returns:
- EPP version identifier if defined;
nullotherwise.
-
setVersion
Sets the desired EPP version. The default version is set toEPPCodec.VERSION.- Parameters:
aVersion- EPP version identifier
-
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
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
encodeEPPCredentialsinto 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
decodeEPPCredentialsfrom 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
implements a deepEPPCredentialscompare. -
clone
CloneEPPCredentials.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- Deep copy clone of
EPPCredentials - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-