Class EPPDefRegName

java.lang.Object
com.verisign.epp.codec.defReg.EPPDefRegName
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPDefRegName extends 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 and setName to get and set the Names. Use getLevel and setLevel to get and set the level attribute.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
    XML Element type attribute name of level associated with name element.
    protected String
    level informnation
    static final String
    Premium level of Defensive Registration.
    static final String
    Standard level of Defensive Registration.
    protected String
    name information.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor, which will set the level and name attributes to null.
    EPPDefRegName(String aLevel, String aName)
    EPPDefRegName which takes attributes as arguments (aLevel, aName).
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPDefRegName.
    void
    decode(Element aElement)
    Decode the EPPDefRegName attributes from the aElement DOM Element tree.
    encode(Document aDocument)
    Encode a DOM Element tree from the attributes of the EPPDefRegName instance.
    boolean
    equals(Object aObject)
    implements a deep EPPDefRegName compare.
    get Level assocaited with defRegName
    get Name attribute assocaited with defRegName
    Returns the XML namespace associated with the EPPCodecComponent.
    void
    setLevel(String aLevel)
    Sets Level attribute.
    void
    setName(String aName)
    Sets Name attribute.
    Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
    void
    Validate the state of the EPPDefRegCreateCmd instance.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • LEVEL_STANDARD

      public static final String LEVEL_STANDARD
      Standard level of Defensive Registration. For example, use this level when checking or creating name "john.smith".
      See Also:
    • LEVEL_PREMIUM

      public static final String LEVEL_PREMIUM
      Premium level of Defensive Registration. For example, use this level when checking or creating name "smith".
      See Also:
    • ATTR_LEVEL

      protected static final String ATTR_LEVEL
      XML Element type attribute name of level associated with name element.
      See Also:
    • name

      protected String name
      name information.
    • level

      protected String level
      level informnation
  • Constructor Details

    • 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(String aLevel, String aName)
      EPPDefRegName which takes attributes as arguments (aLevel, aName).
      Parameters:
      aLevel - Either LEVEL_STANDARD or LEVEL_PREMIUM
      aName - name
  • Method Details

    • 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(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 Element encode(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(Object aObject)
      implements a deep EPPDefRegName compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPDefRegName instance to compare with
      Returns:
      DOCUMENT ME!
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPDefRegName.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPDefRegName
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • getName

      public String getName()
      get Name attribute assocaited with defRegName
      Returns:
      String of EPPDefRegName name.
    • getLevel

      public String getLevel()
      get Level assocaited with defRegName
      Returns:
      String of EPPDefRegName level if defined; null otherwise.
    • setName

      public void setName(String aName)
      Sets Name attribute.
      Parameters:
      aName - Sets defRegName Name attribute.
    • setLevel

      public void setLevel(String aLevel)
      Sets Level attribute.
      Parameters:
      aLevel - Either LEVEL_STANDARD or LEVEL_PREMIUM
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.