com.verisign.epp.codec.registry.v02

## Class EPPRegistryDS

- java.lang.Object
- - com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
  - - com.verisign.epp.codec.registry.v02.EPPRegistryDS

- All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

      public class EPPRegistryDS
      extends EPPRegistryAbstractMinMax

  Defines the DS Data Interface, as defined in RFC 5910, policies. The <registry:dsDataInterface> element contains the following child elements:
  - <registry:min> - the minimum number of DS associated with the domain object. Use `EPPRegistryAbstractMinMax.getMin()` and `EPPRegistryAbstractMinMax.setMin(Integer)` to get and set the element.
  - <registry:max> - the maximum number of DS associated with the domain object. Use `EPPRegistryAbstractMinMax.getMax()` and `EPPRegistryAbstractMinMax.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 5.1.2 of RFC 4034. Use `getAlgorithms()` and `setAlgorithms(List)` to get and set the element.
  - <registry:digestType> - zero or more <registry:digestType> elements that define the supported digest types as described in section 5.1.3 of RFC 4034. Use `getDigestTypes()` and `setDigestTypes(List)` to get and set the element.
  See Also:
    `EPPRegistryDNSSEC`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ELM_ALGORITHM` XML Element Name of `algorithms` attribute.
    `static java.lang.String` | `ELM_DIGEST` XML tag name for the `digestTypeF` attribute.
    `static java.lang.String` | `ELM_LOCALNAME` XML local name for `EPPRegistryDS`.
    `static java.lang.String` | `ELM_NAME` XML root tag for `EPPRegistryDS`.

    - ### Fields inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax

      `ELM_MAX, ELM_MAX_LENGTH, ELM_MIN, ELM_MIN_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPRegistryDS()` Constructs a new `EPPRegistryDS` object.
    `EPPRegistryDS(java.lang.Integer aMin, java.lang.Integer aMax)` Constructs a new `EPPRegistryDS` with a min and a max value.
    `EPPRegistryDS(java.lang.Integer aMin, java.lang.Integer aMax, java.util.List<java.lang.Integer> aAlgorithms, java.util.List<java.lang.Integer> aDigestTypes)` Constructs a new `EPPRegistryDS` with given values.
    `EPPRegistryDS(int aMin, int aMax, java.util.List<java.lang.Integer> aAlgorithms, java.util.List<java.lang.Integer> aDigestTypes)` Constructs a new `EPPRegistryDS` with given values.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAlgorithm(java.lang.Integer aAlgorithm)` Adds one algorithm to existing supported algorithms.
    `void` | `addDigestType(java.lang.Integer digestType)` Add one digest type to an existing list.
    `java.lang.Object` | `clone()` Clone `EPPRegistryDS`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPRegistryDS` 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 `EPPRegistryDS` instance.
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPRegistryDS` compare.
    `java.util.List<java.lang.Integer>` | `getAlgorithms()` Gets the supported algorithms.
    `java.util.List<java.lang.Integer>` | `getDigestTypes()` Get digest types.
    `protected java.lang.String` | `getElmMax()` Gets the maximum element local name.
    `protected java.lang.String` | `getElmMin()` Gets the minimum element local name.
    `protected org.apache.log4j.Logger` | `getLogger()` Gets the `Logger` to use.
    `protected java.lang.String` | `getRootName()` Gets the root element local name.
    `boolean` | `hasAlgorithms()` Is the algorithms defined?
    `void` | `setAlgorithms(java.util.List<java.lang.Integer> aAlgorithms)` Sets the supported algorithms.
    `void` | `setDigestTypes(java.util.List<java.lang.Integer> aDigestTypes)` Set digest types.
    `java.lang.String` | `toString()` Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

    - ### Methods inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax

      `getMax, getMin, getNamespace, setMax, setMin, validateState`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

      XML local name for `EPPRegistryDS`.
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      XML root tag for `EPPRegistryDS`.
      See Also:
        Constant Field Values

    - #### ELM_ALGORITHM

          public static final java.lang.String ELM_ALGORITHM

      XML Element Name of `algorithms` attribute.
      See Also:
        Constant Field Values

    - #### ELM_DIGEST

          public static final java.lang.String ELM_DIGEST

      XML tag name for the `digestTypeF` attribute.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPRegistryDS

          public EPPRegistryDS()

      Constructs a new `EPPRegistryDS` object. All attributes are set to default. Must call `EPPRegistryAbstractMinMax.setMin(Integer)` and `EPPRegistryAbstractMinMax.setMax(Integer)` before calling `encode(Document)` method.

    - #### EPPRegistryDS

          public EPPRegistryDS(java.lang.Integer aMin,
                               java.lang.Integer aMax)

      Constructs a new `EPPRegistryDS` with a min and a max value.
      Parameters:
        `aMin` - minimum number of DS associated with the domain object
        `aMax` - maximum number of DS associated with the domain object

    - #### EPPRegistryDS

          public EPPRegistryDS(java.lang.Integer aMin,
                               java.lang.Integer aMax,
                               java.util.List<java.lang.Integer> aAlgorithms,
                               java.util.List<java.lang.Integer> aDigestTypes)

      Constructs a new `EPPRegistryDS` with given values.
      Parameters:
        `aMin` - minimum number of DS associated with the domain object
        `aMax` - maximum number of DS associated with the domain object
        `aAlgorithms` - `List` of algorithm `String`
        `aDigestTypes` - `List` of digest type `String`

    - #### EPPRegistryDS

          public EPPRegistryDS(int aMin,
                               int aMax,
                               java.util.List<java.lang.Integer> aAlgorithms,
                               java.util.List<java.lang.Integer> aDigestTypes)

      Constructs a new `EPPRegistryDS` with given values.
      Parameters:
        `aMin` - minimum number of DS associated with the domain object
        `aMax` - maximum number of DS associated with the domain object
        `aAlgorithms` - `List` of algorithm `String`
        `aDigestTypes` - `List` of digest type `String`

  - ### Method Detail

    - #### encode

          public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
                                     throws EPPEncodeException

      Encode a DOM Element tree from the attributes of the `EPPRegistryDS` instance.
      Specified by:
        `encode` in interface `EPPCodecComponent`
      Overrides:
        `encode` in class `EPPRegistryAbstractMinMax`
      Parameters:
        `aDocument` - DOM Document that is being built. Used as an Element factory.
      Returns:
        Element Root DOM Element representing the `EPPRegistryDS` instance.
      Throws:
        `EPPEncodeException` - - Unable to encode `EPPRegistryDS` instance.

    - #### decode

          public void decode(org.w3c.dom.Element aElement)
                      throws EPPDecodeException

      Decode the `EPPRegistryDS` attributes from the aElement DOM Element tree.
      Specified by:
        `decode` in interface `EPPCodecComponent`
      Overrides:
        `decode` in class `EPPRegistryAbstractMinMax`
      Parameters:
        `aElement` - Root DOM Element to decode `EPPRegistryDS` from.
      Throws:
        `EPPDecodeException` - Unable to decode aElement

    - #### clone

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

      Clone `EPPRegistryDS`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `EPPRegistryAbstractMinMax`
      Returns:
        clone of `EPPRegistryDS`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### equals

          public boolean equals(java.lang.Object aObject)

      implements a deep `EPPRegistryDS` compare.
      Overrides:
        `equals` in class `EPPRegistryAbstractMinMax`
      Parameters:
        `aObject` - `EPPRegistryDS` instance to compare with
      Returns:
        `true` if this object is the same as the aObject argument; `false` otherwise

    - #### 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 `EPPRegistryAbstractMinMax`
      Returns:
        Indented XML `String` if successful; `ERROR` otherwise.

    - #### hasAlgorithms

          public boolean hasAlgorithms()

      Is the algorithms defined?
      Returns:
        `true` if the algorithms is defined; `false` otherwise.

    - #### getAlgorithms

          public java.util.List<java.lang.Integer> getAlgorithms()

      Gets the supported algorithms.
      Returns:
        `List` of supported algorithms as described in section 5.1.2 of RFC 4034

    - #### setAlgorithms

          public void setAlgorithms(java.util.List<java.lang.Integer> aAlgorithms)

      Sets the supported algorithms.
      Parameters:
        `aAlgorithms` - `List` of supported algorithms as described in section 5.1.2 of RFC 4034

    - #### addAlgorithm

          public void addAlgorithm(java.lang.Integer aAlgorithm)

      Adds one algorithm to existing supported algorithms.
      Parameters:
        `aAlgorithm` - supported algorithm as described in section 5.1.2 of RFC 4034

    - #### getDigestTypes

          public java.util.List<java.lang.Integer> getDigestTypes()

      Get digest types.
      Returns:
        `List` of digest type in `String`

    - #### setDigestTypes

          public void setDigestTypes(java.util.List<java.lang.Integer> aDigestTypes)

      Set digest types.
      Parameters:
        `aDigestTypes` - `List` of digest type in `String`

    - #### addDigestType

          public void addDigestType(java.lang.Integer digestType)

      Add one digest type to an existing list.
      Parameters:
        `digestType` - digest type in `String`

    - #### getRootName

          protected java.lang.String getRootName()

      Gets the root element local name.
      Specified by:
        `getRootName` in class `EPPRegistryAbstractMinMax`
      Returns:
        Root element local name.

    - #### getElmMin

          protected java.lang.String getElmMin()

      Gets the minimum element local name.
      Specified by:
        `getElmMin` in class `EPPRegistryAbstractMinMax`
      Returns:
        Minimum element local name.

    - #### getElmMax

          protected java.lang.String getElmMax()

      Gets the maximum element local name.
      Specified by:
        `getElmMax` in class `EPPRegistryAbstractMinMax`
      Returns:
        Maximum element local name.

    - #### getLogger

          protected org.apache.log4j.Logger getLogger()

      Gets the `Logger` to use.
      Specified by:
        `getLogger` in class `EPPRegistryAbstractMinMax`
      Returns:
        `Logger` instance to use for logging.