Class EPPRegistryKey

java.lang.Object
com.verisign.epp.codec.registry.EPPRegistryKey
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable
Direct Known Subclasses:
EPPRegistryDS

public class EPPRegistryKey extends Object implements EPPCodecComponent
Defines the Key Data Interface, as defined in RFC 5910, policies. The <registry:keyDataInterface> element contains the following child elements:

  • <registry:min> - the minimum number of keys associated with the domain object. Use getMin() and setMin(Integer) to get and set the element.
  • <registry:max> - the maximum number of keys associated with the domain object. Use getMax() and setMax(Integer) to get and set the element.
  • <registry:alg> - Zero or more <registry:alg> elements that define the supported algorithms as described in section 2.1.3 of RFC 4034. Use getAlgorithms() and setAlgorithms(List) to get and set the element. Use addAlgorithm(String) to add an algorithm String to an existing List.
See Also:
  • Field Details

  • Constructor Details

    • EPPRegistryKey

      public EPPRegistryKey()
      Default constructor. Must call setMin(Integer) and setMax(Integer) before calling encode(Document) method.
    • EPPRegistryKey

      public EPPRegistryKey(Integer min, Integer max, List algorithms)
      Constructs an instance with min, max and List of algorithms.
      Parameters:
      min - minimum number of keys associated with the domain object
      max - maximum number of keys associated with the domain object
      algorithms - supported algorithms as described in section 2.1.3 of RFC 4034
    • EPPRegistryKey

      public EPPRegistryKey(int min, int max, List algorithms)
      Constructs an instance with min, max and List of algorithms.
      Parameters:
      min - minimum number of keys associated with the domain object
      max - maximum number of keys associated with the domain object
      algorithms - supported algorithms as described in section 2.1.3 of RFC 4034
  • Method Details

    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPRegistryKey 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 EPPRegistryKey instance.
      Throws:
      EPPEncodeException - - Unable to encode EPPRegistryKey instance.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPRegistryKey attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root DOM Element to decode EPPRegistryKey from.
      Throws:
      EPPDecodeException - Unable to decode aElement
    • clone

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

      public boolean equals(Object aObject)
      implements a deep EPPRegistryKey compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPRegistryKey instance to compare with
      Returns:
      true if this object is the same as the aObject argument; false otherwise
    • 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.
    • getMin

      public Integer getMin()
      Get the minimum number of keys.
      Returns:
      minimum number of keys associated with the domain object.
    • setMin

      public void setMin(Integer min)
      Set the minimum number of keys.
      Parameters:
      min - minimum number of keys associated with the domain object.
    • getMax

      public Integer getMax()
      Get the maximum number of keys.
      Returns:
      maximum number of keys associated with the domain object.
    • setMax

      public void setMax(Integer max)
      Set the maximum number of keys.
      Parameters:
      max - maximum number of keys associated with the domain object.
    • getAlgorithms

      public List getAlgorithms()
      Get the supported algorithms.
      Returns:
      List of supported algorithms as dscsribed in section 2.1.3 of RFC 4034
    • setAlgorithms

      public void setAlgorithms(List algorithms)
      Set the supported algorithms.
      Parameters:
      algorithms - List of supported algorithms as dscsribed in section 2.1.3 of RFC 4034
    • addAlgorithm

      public void addAlgorithm(String altorithm)
      Add one algorithm to existing supported algorithms.
      Parameters:
      altorithm - supported algorithms as dscsribed in section 2.1.3 of RFC 4034
    • getRootName

      public String getRootName()
      Get the root element tag name.
      Returns:
      ELM_NAME
    • getNamespace

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