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
getName
andsetName
to get and set the Names. UsegetLevel
andsetLevel
to get and set the level attribute.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
ATTR_LEVEL
XML Element type attribute name oflevel
associated with name element.protected java.lang.String
level
level informnationstatic java.lang.String
LEVEL_PREMIUM
Premium level of Defensive Registration.static java.lang.String
LEVEL_STANDARD
Standard level of Defensive Registration.protected java.lang.String
name
name 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.Object
clone()
CloneEPPDefRegName
.void
decode(org.w3c.dom.Element aElement)
Decode the EPPDefRegName attributes from the aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of the EPPDefRegName instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPDefRegName
compare.java.lang.String
getLevel()
get Level assocaited with defRegNamejava.lang.String
getName()
get Name attribute assocaited with defRegNamejava.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.void
setLevel(java.lang.String aLevel)
Sets Level attribute.void
setName(java.lang.String aName)
Sets Name attribute.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.void
validate()
Validate the state of theEPPDefRegCreateCmd
instance.
-
-
-
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 oflevel
associated 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_STANDARD
orLEVEL_PREMIUM
aName
- name
-
-
Method Detail
-
validate
public void validate() throws EPPEncodeException
Validate the state of theEPPDefRegCreateCmd
instance. 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, theEPPCodecException
will 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 EPPDecodeException
Decode the EPPDefRegName attributes from the aElement DOM Element tree.- Specified by:
decode
in 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 EPPEncodeException
Encode a DOM Element tree from the attributes of the EPPDefRegName instance.- Specified by:
encode
in 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 deepEPPDefRegName
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPDefRegName
instance to compare with- Returns:
- DOCUMENT ME!
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPDefRegName
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in 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;
null
otherwise.
-
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_STANDARD
orLEVEL_PREMIUM
-
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
.
-
-