com.verisign.epp.codec.defReg
Class EPPDefRegName

java.lang.Object
  extended by 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:

See Also:
Serialized Form

Field Summary
protected static java.lang.String ATTR_LEVEL
          XML Element type attribute name of level associated with name element.
protected  java.lang.String level
          level informnation
static 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
EPPDefRegName()
          Default constructor, which will set the level and name attributes to null.
EPPDefRegName(java.lang.String aLevel, java.lang.String aName)
          EPPDefRegName which takes attributes as arguments (aLevel, aName).
 
Method Summary
 java.lang.Object clone()
          Clone EPPDefRegName.
 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 deep EPPDefRegName compare.
 java.lang.String getLevel()
          get Level assocaited with defRegName
 java.lang.String getName()
          get Name attribute assocaited with defRegName
 void setLevel(java.lang.String aLevel)
          Sets Level attribute.
 void setName(java.lang.String aName)
          Sets Name attribute.
 java.lang.String toString()
          Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
 void validate()
          Validate the state of the EPPDefRegCreateCmd instance.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 of level 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 to null. These attributes must be set before calling encode.


EPPDefRegName

public EPPDefRegName(java.lang.String aLevel,
                     java.lang.String aName)
EPPDefRegName which takes attributes as arguments (aLevel, aName).

Parameters:
aLevel - Either LEVEL_STANDARD or LEVEL_PREMIUM
aName - name
Method Detail

validate

public void validate()
              throws EPPEncodeException
Validate the state of the EPPDefRegCreateCmd 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, the EPPCodecException 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 interface EPPCodecComponent
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 interface EPPCodecComponent
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 deep EPPDefRegName compare.

Overrides:
equals in class java.lang.Object
Parameters:
aObject - EPPDefRegName instance to compare with
Returns:
DOCUMENT ME!

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone EPPDefRegName.

Specified by:
clone in interface EPPCodecComponent
Overrides:
clone in class java.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 - Either LEVEL_STANDARD or LEVEL_PREMIUM

toString

public java.lang.String toString()
Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

Overrides:
toString in class java.lang.Object
Returns:
Indented XML String if successful; ERROR otherwise.


Copyright ? VeriSign Inc. All Rights Reserved.