Class EPPRegistry

java.lang.Object
com.verisign.epp.interfaces.registry.v02.EPPRegistry

public class EPPRegistry extends 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 Details

    • EPPRegistry

      public EPPRegistry(EPPSession aSession)
      Constructs an EPPRegistry given an initialized EPP session.
      Parameters:
      aSession - Server session to use.
  • Method Details

    • sendCheck

      public EPPRegistryCheckResp sendCheck() throws EPPCommandException
      Sends a check command to the server.

      The required attributes have been set with the following methods:


      The optional attributes have been set with the following:

      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:


      The optional attributes have been set with the following:

      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:


      The optional attributes have been set with the following:

      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:


      The optional attributes have been set with the following:

      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:


      The optional attributes have been set with the following:

      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 String getTransId()
      Gets the OPTIONAL client transaction identifier.
      Returns:
      The client transaction identifier if set; null otherwise.
    • setTransId

      public void setTransId(String aTransId)
      Sets the OPTIONAL client transaction identifier.
      Parameters:
      aTransId - Client transaction identifier
    • getZoneList

      public List<EPPRegistryZoneName> getZoneList()
      Gets the list of zone names.
      Returns:
      List of zone names
    • setZoneList

      public void setZoneList(List<EPPRegistryZoneName> aZoneList)
      Sets the list of zone names to use in a command. The mode is set to EPPRegistryInfoCmd.Mode.all.
      Parameters:
      aZoneList - List of zone names
    • addZone

      public void addZone(String aZone)
      Add an aLabel zone name to the list of zone names. The mode is set to EPPRegistryInfoCmd.Mode.all.
      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. The mode is set to EPPRegistryInfoCmd.Mode.name.
      Parameters:
      aZone - Zone name to add to the list of zone names.
    • getAllScope

      public EPPRegistryInfoCmd.Scope getAllScope()
      Gets the zone scope used with the info all option.
      Returns:
      info all scope if defined; null otherwise.
    • setAllScope

      public void setAllScope(EPPRegistryInfoCmd.Scope aScope)
      Sets the zone scope used with the info all mode. The mode is set to EPPRegistryInfoCmd.Mode.all.
      Parameters:
      aScope - Scope used for the info all mode.
    • hasInfoMode

      public boolean hasInfoMode()
      Is the info mode defined?
      Returns:
      true if the info mode is defined; false otherwise.
    • getInfoMode

      public EPPRegistryInfoCmd.Mode getInfoMode()
      Gets the info mode.
      Returns:
      The info mode if defined; null otherwise.
    • setInfoMode

      public void setInfoMode(EPPRegistryInfoCmd.Mode aInfoMode)
      Sets the info mode. This is needed when using the EPPRegistryInfoCmd.Mode.system mode, where the other modes are automatically set using the other associated methods.
      Parameters:
      aInfoMode - Info mode to use
    • setZone

      public void setZone(EPPRegistryZone aZone)
      Sets the zone to use with sendCreate() or sendUpdate().
      Parameters:
      aZone - The zone to use with sendCreate() or sendUpdate().
    • getExtensions

      public Vector<EPPCodecComponent> getExtensions()
      Gets the command extensions.
      Returns:
      Vector of concrete EPPCodecComponent associated with the command if exists; null otherwise.
    • setExtensions

      public void setExtensions(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
    • 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.