Package com.verisign.epp.codec.defReg
Class EPPDefRegName
java.lang.Object
com.verisign.epp.codec.defReg.EPPDefRegName
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringXML Element type attribute name oflevelassociated with name element.protected Stringlevel informnationstatic final StringPremium level of Defensive Registration.static final StringStandard level of Defensive Registration.protected Stringname information. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, which will set the level and name attributes tonull.EPPDefRegName(String aLevel, String aName) EPPDefRegName which takes attributes as arguments (aLevel, aName). -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPDefRegName.voidDecode the EPPDefRegName attributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of the EPPDefRegName instance.booleanimplements a deepEPPDefRegNamecompare.getLevel()get Level assocaited with defRegNamegetName()get Name attribute assocaited with defRegNameReturns the XML namespace associated with theEPPCodecComponent.voidSets Level attribute.voidSets Name attribute.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.voidvalidate()Validate the state of theEPPDefRegCreateCmdinstance.
-
Field Details
-
LEVEL_STANDARD
Standard level of Defensive Registration. For example, use this level when checking or creating name "john.smith".- See Also:
-
LEVEL_PREMIUM
Premium level of Defensive Registration. For example, use this level when checking or creating name "smith".- See Also:
-
ATTR_LEVEL
XML Element type attribute name oflevelassociated with name element.- See Also:
-
name
name information. -
level
level informnation
-
-
Constructor Details
-
EPPDefRegName
public EPPDefRegName()Default constructor, which will set the level and name attributes tonull. These attributes must be set before callingencode. -
EPPDefRegName
EPPDefRegName which takes attributes as arguments (aLevel, aName).- Parameters:
aLevel- EitherLEVEL_STANDARDorLEVEL_PREMIUMaName- name
-
-
Method Details
-
validate
Validate 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
Decode 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
Encode 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
implements a deepEPPDefRegNamecompare. -
clone
CloneEPPDefRegName.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPDefRegName - Throws:
CloneNotSupportedException- standard Object.clone exception
-
getName
get Name attribute assocaited with defRegName- Returns:
- String of EPPDefRegName name.
-
getLevel
get Level assocaited with defRegName- Returns:
- String of EPPDefRegName level if defined;
nullotherwise.
-
setName
Sets Name attribute.- Parameters:
aName- Sets defRegName Name attribute.
-
setLevel
Sets Level attribute.- Parameters:
aLevel- EitherLEVEL_STANDARDorLEVEL_PREMIUM
-
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.
-