com.verisign.epp.serverstub.registry.v01

## Class RegistryHandler.RegistryZone

- java.lang.Object
- - com.verisign.epp.serverstub.registry.v01.RegistryHandler.RegistryZone

- Enclosing class:
    RegistryHandler

      public static class RegistryHandler.RegistryZone
      extends java.lang.Object

  `RegistryZone` represents an in-memory version of a Registry Zone with the base zone information along with all policy extensions.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegistryZone()` Default constructor.
    `RegistryZone(EPPRegistryZone aZoneInfo)` `RegistryZone` constructor that takes the required zone information.
    `RegistryZone(EPPRegistryZone aZoneInfo, java.util.List<EPPRegistryZoneInterface> aExtensions)` `RegistryZone` constructor that takes both attributes (zone information and extensions).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addExtension(EPPRegistryZoneInterface aExtension)` Adds a policy extension to the list of extensions.
    `EPPRegistryZoneInterface` | `getExtension(java.lang.Class aExtClass)` Gets the policy extension by `Class`.
    `java.util.List<EPPRegistryZoneInterface>` | `getExtensions()` Gets the extensions list.
    `EPPRegistryZone` | `getZoneInfo()` Gets the zone information as defined in `draft-gould-carney-regext-registry`.
    `boolean` | `hasExtensions()` Is the extensions list defined?
    `boolean` | `hasZoneInfo()` Is the zone information defined?
    `void` | `setExtension(EPPRegistryZoneInterface aExtension)` Sets an policy extension in the list of extensions.
    `void` | `setExtensions(java.util.List<EPPRegistryZoneInterface> aExtensions)` Sets the extensions list.
    `void` | `setZoneInfo(EPPRegistryZone aZoneInfo)` Sets the zone information as defined in `draft-gould-carney-regext-registry`.
    `java.lang.String` | `toString()` Convert the `RegistryZone` into a `String` for printing.

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

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

- - ### Constructor Detail

    - #### RegistryZone

          public RegistryZone()

      Default constructor. The zone information and the extensions should be set.

    - #### RegistryZone

          public RegistryZone(EPPRegistryZone aZoneInfo)

      `RegistryZone` constructor that takes the required zone information.
      Parameters:
        `aZoneInfo` - Zone information as defined in `draft-gould-carney-regext-registry`.

    - #### RegistryZone

          public RegistryZone(EPPRegistryZone aZoneInfo,
                              java.util.List<EPPRegistryZoneInterface> aExtensions)

      `RegistryZone` constructor that takes both attributes (zone information and extensions).
      Parameters:
        `aZoneInfo` - Zone information as defined in `draft-gould-carney-regext-registry`.
        `aExtensions` - Policy extensions included in the command

  - ### Method Detail

    - #### hasZoneInfo

          public boolean hasZoneInfo()

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

    - #### getZoneInfo

          public EPPRegistryZone getZoneInfo()

      Gets the zone information as defined in `draft-gould-carney-regext-registry`.
      Returns:
        Zone information if defined; `null` otherwise.

    - #### setZoneInfo

          public void setZoneInfo(EPPRegistryZone aZoneInfo)

      Sets the zone information as defined in `draft-gould-carney-regext-registry`.
      Parameters:
        `aZoneInfo` - Zone information as defined in `draft-gould-carney-regext-registry`.

    - #### hasExtensions

          public boolean hasExtensions()

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

    - #### getExtensions

          public java.util.List<EPPRegistryZoneInterface> getExtensions()

      Gets the extensions list.
      Returns:
        Extensions list if defined; `null` otherwise.

    - #### setExtensions

          public void setExtensions(java.util.List<EPPRegistryZoneInterface> aExtensions)

      Sets the extensions list.
      Parameters:
        `aExtensions` - Policy extensions included with the command. Set to `null` if undefined.

    - #### setExtension

          public void setExtension(EPPRegistryZoneInterface aExtension)

      Sets an policy extension in the list of extensions. If the policy extension is already defined based on the policy extension class, it will be replaced; otherwise it will be added.
      Parameters:
        `aExtension` - The policy extension to set (add or replace)

    - #### getExtension

          public EPPRegistryZoneInterface getExtension(java.lang.Class aExtClass)

      Gets the policy extension by `Class`.
      Parameters:
        `aExtClass` - The policy extension `Class` to look for
      Returns:
        Policy extension if found; `null` otherwise

    - #### addExtension

          public void addExtension(EPPRegistryZoneInterface aExtension)

      Adds a policy extension to the list of extensions.
      Parameters:
        `aExtension` - Policy extension to add

    - #### toString

          public java.lang.String toString()

      Convert the `RegistryZone` into a `String` for printing.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Encoded `RegistryZone` instance as a `String`.