com.verisign.epp.interfaces.registry.v01

## Class EPPRegistry

- java.lang.Object
- - com.verisign.epp.interfaces.registry.v01.EPPRegistry

-     public class EPPRegistry
      extends java.lang.Object

  Interface class for the EPP Registry Object that complies with v01 (urn:ietf:params:xml:ns:registry-0.1) of the XML schema. This class can be used to prepare and send the supported EPP Registry Object commands. `EPPRegistry` requires an established `EPPSession` that is used to send the commands and read the responses from a server.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPRegistry(EPPSession aSession)` Constructs an `EPPRegistry` given an initialized EPP session.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addExtension(EPPCodecComponent aExtension)` Adds a command extension object.
    `void` | `addZone(EPPRegistryZoneName aZone)` Add a zone name to the list of zone names.
    `void` | `addZone(java.lang.String aZone)` Add an aLabel zone name to the list of zone names.
    `java.util.Vector<EPPCodecComponent>` | `getExtensions()` Gets the command extensions.
    `EPPResponse` | `getResponse()` Gets the response associated with the last command.
    `EPPSession` | `getSession()` Gets the session to use to send commands through.
    `java.lang.String` | `getTransId()` Gets the OPTIONAL client transaction identifier.
    `EPPRegistryZone` | `getZoneInfo()` Gets the zone information to use with `sendCreate()` or `sendUpdate()`.
    `java.util.List<EPPRegistryZoneName>` | `getZoneList()` Gets the list of zone names.
    `boolean` | `isAllZones()` Is the all zones boolean set? This is used with the `sendInfo()` method.
    `boolean` | `isSystem()` Is the system boolean set? This is used with the `sendInfo()` method.
    `EPPRegistryCheckResp` | `sendCheck()` Sends a check command to the server. The required attributes have been set with the following methods: `addZone(EPPRegistryZoneName)`, `addZone(String)`, or `setZoneList(List)` - To set the zone names to check.
    `EPPRegistryCreateResp` | `sendCreate()` Sends a create command to the server to create a zone. The required attributes have been set with the following methods: `setZone(EPPRegistryZone)` - Contains the attributes of the zone to create. The optional attributes have been set with the following: `setTransId(String)` - Sets the client transaction identifier `addExtension(EPPCodecComponent)` or `setExtensions(Vector)` - Set extensions to include with the command.
    `EPPResponse` | `sendDelete()` Sends a delete command to the server to delete a zone by name. The required attributes have been set with the following methods: `addZone(EPPRegistryZoneName)`, `addZone(String)`, or `setZoneList(List)` - To set a single zone name to delete.
    `EPPRegistryInfoResp` | `sendInfo()` Sends an info command to the server.
    `EPPResponse` | `sendUpdate()` Sends an update command to the server to update a zone. The required attributes have been set with the following methods: `setZone(EPPRegistryZone)` - Contains the attributes of the zone to update. The optional attributes have been set with the following: `setTransId(String)` - Sets the client transaction identifier `addExtension(EPPCodecComponent)` or `setExtensions(Vector)` - Set extensions to include with the command.
    `void` | `setAllZones(boolean aAllZones)` Sets the all zones boolean flag.
    `void` | `setExtensions(java.util.Vector<EPPCodecComponent> aExtensions)` Sets the command extensions.
    `void` | `setSession(EPPSession aSession)` Sets the session to use to send commands through.
    `void` | `setSystem(boolean aSystem)` Sets the system boolean flag.
    `void` | `setTransId(java.lang.String aTransId)` Sets the OPTIONAL client transaction identifier.
    `void` | `setZone(EPPRegistryZone aZone)` Sets the zone information to use with `sendCreate()` or `sendUpdate()`.
    `void` | `setZoneList(java.util.List<EPPRegistryZoneName> aZoneList)` Sets the list of zone names to use in a command.

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

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

- - ### Constructor Detail

    - #### EPPRegistry

          public EPPRegistry(EPPSession aSession)

      Constructs an `EPPRegistry` given an initialized EPP session.
      Parameters:
        `aSession` - Server session to use.

  - ### Method Detail

    - #### sendCheck

          public EPPRegistryCheckResp sendCheck()
                                         throws EPPCommandException

      Sends a check command to the server.
      The required attributes have been set with the following methods:
      - `addZone(EPPRegistryZoneName)`, `addZone(String)`, or `setZoneList(List)` - To set the zone names to check. More than one zone name can be checked in `sendCheck`.
      The optional attributes have been set with the following:
      - `setTransId(String)` - Sets the client transaction identifier
      - `addExtension(EPPCodecComponent)` or `setExtensions(Vector)` - Set extensions to include with the command.
      Returns:
        `EPPRegistryCheckResp` containing the zone check information.
      Throws:
        `EPPCommandException` - Error executing the check command. Use `getResponse()` to get the associated server error response.

    - #### sendDelete

          public EPPResponse sendDelete()
                                 throws EPPCommandException

      Sends a delete command to the server to delete a zone by name.
      The required attributes have been set with the following methods:
      - `addZone(EPPRegistryZoneName)`, `addZone(String)`, or `setZoneList(List)` - To set a single zone name to delete. More than one zone name will result in an `EPPCommandException`.
      The optional attributes have been set with the following:
      - `setTransId(String)` - Sets the client transaction identifier
      - `addExtension(EPPCodecComponent)` or `setExtensions(Vector)` - Set extensions to include with the command.
      Returns:
        `EPPResponse` containing the result of the delete command
      Throws:
        `EPPCommandException` - Error executing the delete command. Use `getResponse()` to get the associated server error response.

    - #### sendInfo

          public EPPRegistryInfoResp sendInfo()
                                       throws EPPCommandException

      Sends an info command to the server. There are three forms of the info command that include get all zone summary information, get detailed information for an individual zone, or get system information.
      The required attributes have been set with the following methods:
      - `addZone(EPPRegistryZoneName)`, `addZone(String)`, or `setZoneList(List)` - To set a single zone name to get the detailed information for. This is used to send the "get detailed information for an individual zone" form. More than one zone name will result in an `EPPCommandException`. OR
      - `setAllZones(boolean)` - Set to `true` to send the "get all zone summary information" form of info command. OR
      - `setSystem(boolean)` - Set to `true` to send the "get system information" form of info command.
      The optional attributes have been set with the following:
      - `setTransId(String)` - Sets the client transaction identifier
      - `addExtension(EPPCodecComponent)` or `setExtensions(Vector)` - Set extensions to include with the command.
      Returns:
        `EPPRegistryInfoResp` containing the requested information from the server based on the form of the info command.
      Throws:
        `EPPCommandException` - Error executing the info command. Use `getResponse()` to get the associated server error response.

    - #### sendCreate

          public EPPRegistryCreateResp sendCreate()
                                           throws EPPCommandException

      Sends a create command to the server to create a zone.
      The required attributes have been set with the following methods:
      - `setZone(EPPRegistryZone)` - Contains the attributes of the zone to create.
      The optional attributes have been set with the following:
      - `setTransId(String)` - Sets the client transaction identifier
      - `addExtension(EPPCodecComponent)` or `setExtensions(Vector)` - Set extensions to include with the command.
      Returns:
        `EPPRegistryCreateResp` containing the result of the create command
      Throws:
        `EPPCommandException` - Error executing the create command. Use `getResponse()` to get the associated server error response.

    - #### sendUpdate

          public EPPResponse sendUpdate()
                                 throws EPPCommandException

      Sends an update command to the server to update a zone.
      The required attributes have been set with the following methods:
      - `setZone(EPPRegistryZone)` - Contains the attributes of the zone to update.
      The optional attributes have been set with the following:
      - `setTransId(String)` - Sets the client transaction identifier
      - `addExtension(EPPCodecComponent)` or `setExtensions(Vector)` - Set extensions to include with the command.
      Returns:
        `EPPResponse` containing the result of the update command
      Throws:
        `EPPCommandException` - Error executing the update command. Use `getResponse()` to get the associated server error response.

    - #### getSession

          public EPPSession getSession()

      Gets the session to use to send commands through.
      Returns:
        Active EPP session to send commands through if defined; `null` otherwise.

    - #### setSession

          public void setSession(EPPSession aSession)

      Sets the session to use to send commands through.
      Parameters:
        `aSession` - Active EPP session to send commands through

    - #### getTransId

          public java.lang.String getTransId()

      Gets the OPTIONAL client transaction identifier.
      Returns:
        The client transaction identifier if set; `null` otherwise.

    - #### setTransId

          public void setTransId(java.lang.String aTransId)

      Sets the OPTIONAL client transaction identifier.
      Parameters:
        `aTransId` - Client transaction identifier

    - #### getZoneList

          public java.util.List<EPPRegistryZoneName> getZoneList()

      Gets the list of zone names.
      Returns:
        List of zone names

    - #### setZoneList

          public void setZoneList(java.util.List<EPPRegistryZoneName> aZoneList)

      Sets the list of zone names to use in a command.
      Parameters:
        `aZoneList` - List of zone names

    - #### addZone

          public void addZone(java.lang.String aZone)

      Add an aLabel zone name to the list of zone names.
      Parameters:
        `aZone` - ALabel zone name to add to the list of zone names.

    - #### addZone

          public void addZone(EPPRegistryZoneName aZone)

      Add a zone name to the list of zone names.
      Parameters:
        `aZone` - Zone name to add to the list of zone names.

    - #### isAllZones

          public boolean isAllZones()

      Is the all zones boolean set? This is used with the `sendInfo()` method.
      Returns:
        `true` if set; `false` otherwise.

    - #### setAllZones

          public void setAllZones(boolean aAllZones)

      Sets the all zones boolean flag. Setting the value to `true` clears the zone names list.
      Parameters:
        `aAllZones` - `true` to get all of the zones with the `sendInfo()` method.

    - #### isSystem

          public boolean isSystem()

      Is the system boolean set? This is used with the `sendInfo()` method.
      Returns:
        `true` if set; `false` otherwise.

    - #### getZoneInfo

          public EPPRegistryZone getZoneInfo()

      Gets the zone information to use with `sendCreate()` or `sendUpdate()`.
      Returns:
        The zone information if defined; `null` otherwise.

    - #### setZone

          public void setZone(EPPRegistryZone aZone)

      Sets the zone information to use with `sendCreate()` or `sendUpdate()`.
      Parameters:
        `aZone` - The zone information to use with `sendCreate()` or `sendUpdate()`.

    - #### getExtensions

          public java.util.Vector<EPPCodecComponent> getExtensions()

      Gets the command extensions.
      Returns:
        `Vector` of concrete `EPPCodecComponent` associated with the command if exists; `null` otherwise.

    - #### setExtensions

          public void setExtensions(java.util.Vector<EPPCodecComponent> aExtensions)

      Sets the command extensions.
      Parameters:
        `aExtensions` - Command extensions associated with the command. Setting to `null` clears the extensions.

    - #### addExtension

          public void addExtension(EPPCodecComponent aExtension)

      Adds a command extension object.
      Parameters:
        `aExtension` - Command extension associated with the command

    - #### setSystem

          public void setSystem(boolean aSystem)

      Sets the system boolean flag. Setting the value to `true` clears the zone names list.
      Parameters:
        `aSystem` - `true` to get the Registry system information with the `sendInfo()` method.

    - #### getResponse

          public EPPResponse getResponse()

      Gets the response associated with the last command. This method can be used to retrieve the server error response in the catch block of `EPPCommandException`.
      Returns:
        `EPPResponse` associated with the last command if defined; `null` otherwise.