Package com.verisign.epp.codec.defReg
Class EPPDefRegName
- java.lang.Object
-
- com.verisign.epp.codec.defReg.EPPDefRegName
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPDefRegName extends java.lang.Object implements EPPCodecComponent
Represents EPPDefRegName information which is a shared structure been used by other objects. The <defReg:name> element MUST contain the following child elements:
-
A <defReg:level>attribute that maps to either "premium" or
"standard". .Use
getNameandsetNameto get and set the Names. UsegetLevelandsetLevelto get and set the level attribute.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringATTR_LEVELXML Element type attribute name oflevelassociated with name element.protected java.lang.Stringlevellevel informnationstatic java.lang.StringLEVEL_PREMIUMPremium level of Defensive Registration.static java.lang.StringLEVEL_STANDARDStandard level of Defensive Registration.protected java.lang.Stringnamename information.
-
Constructor Summary
Constructors Constructor Description EPPDefRegName()Default constructor, which will set the level and name attributes tonull.EPPDefRegName(java.lang.String aLevel, java.lang.String aName)EPPDefRegName which takes attributes as arguments (aLevel, aName).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPDefRegName.voiddecode(org.w3c.dom.Element aElement)Decode the EPPDefRegName attributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of the EPPDefRegName instance.booleanequals(java.lang.Object aObject)implements a deepEPPDefRegNamecompare.java.lang.StringgetLevel()get Level assocaited with defRegNamejava.lang.StringgetName()get Name attribute assocaited with defRegNamejava.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.voidsetLevel(java.lang.String aLevel)Sets Level attribute.voidsetName(java.lang.String aName)Sets Name attribute.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.voidvalidate()Validate the state of theEPPDefRegCreateCmdinstance.
-
-
-
Field Detail
-
LEVEL_STANDARD
public static final java.lang.String LEVEL_STANDARD
Standard level of Defensive Registration. For example, use this level when checking or creating name "john.smith".- See Also:
- Constant Field Values
-
LEVEL_PREMIUM
public static final java.lang.String LEVEL_PREMIUM
Premium level of Defensive Registration. For example, use this level when checking or creating name "smith".- See Also:
- Constant Field Values
-
ATTR_LEVEL
protected static final java.lang.String ATTR_LEVEL
XML Element type attribute name oflevelassociated with name element.- See Also:
- Constant Field Values
-
name
protected java.lang.String name
name information.
-
level
protected java.lang.String level
level informnation
-
-
Constructor Detail
-
EPPDefRegName
public EPPDefRegName()
Default constructor, which will set the level and name attributes tonull. These attributes must be set before callingencode.
-
EPPDefRegName
public EPPDefRegName(java.lang.String aLevel, java.lang.String aName)EPPDefRegName which takes attributes as arguments (aLevel, aName).- Parameters:
aLevel- EitherLEVEL_STANDARDorLEVEL_PREMIUMaName- name
-
-
Method Detail
-
validate
public void validate() throws EPPEncodeExceptionValidate the state of theEPPDefRegCreateCmdinstance. A valid state means that all of the required attributes have been set. If validateState returns without an exception, the state is valid. If the state is not valid, theEPPCodecExceptionwill contain a description of the error. throws EPPCodecException State error. This will contain the name of the attribute that is not valid.- Throws:
EPPEncodeException- DOCUMENT ME!
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode the EPPDefRegName attributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- - Root DOM Element to decode EPPDomainContact from.- Throws:
EPPDecodeException- - Unable to decode aElement.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of the EPPDefRegName instance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the EPPDefRegName instance.
- Throws:
EPPEncodeException- - Unable to encode EPPDefRegName instance.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPDefRegNamecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPDefRegNameinstance to compare with- Returns:
- DOCUMENT ME!
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPDefRegName.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPDefRegName - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
getName
public java.lang.String getName()
get Name attribute assocaited with defRegName- Returns:
- String of EPPDefRegName name.
-
getLevel
public java.lang.String getLevel()
get Level assocaited with defRegName- Returns:
- String of EPPDefRegName level if defined;
nullotherwise.
-
setName
public void setName(java.lang.String aName)
Sets Name attribute.- Parameters:
aName- Sets defRegName Name attribute.
-
setLevel
public void setLevel(java.lang.String aLevel)
Sets Level attribute.- Parameters:
aLevel- EitherLEVEL_STANDARDorLEVEL_PREMIUM
-
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.
-
-