Class EPPDefReg

java.lang.Object
com.verisign.epp.interfaces.EPPDefReg

public class EPPDefReg extends Object
EPPDefReg is the primary client interface class used for defReg management. An instance of EPPDefReg is created with an initialized EPPSession, and can be used for more than one request within a single thread. A set of setter methods are provided to set the attributes before a call to one of the send action methods. The responses returned from the send action methods are either instances of EPPResponse or instances of response classes in the com.verisign.epp.codec.defReg package.

See Also:
  • Field Details

  • Constructor Details

    • EPPDefReg

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

    • addExtension

      public void addExtension(EPPCodecComponent aExtension)
      Adds a command extension object.
      Parameters:
      aExtension - command extension object associated with the command
    • setExtension

      @Deprecated public void setExtension(EPPCodecComponent aExtension)
      Deprecated.
      Replaced by addExtension(EPPCodecComponent). This method will add the extension as is done in addExtension(EPPCodecComponent).
      Sets a command extension object.
      Parameters:
      aExtension - command extension object associated with the command
    • setExtensions

      public void setExtensions(Vector aExtensions)
      Sets the command extension objects.
      Parameters:
      aExtensions - command extension objects associated with the command
    • getExtensions

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

      public void addDefRegName(String newLevel, String newName)
      Adds a defReg name for use with a send method. Adding more than one defReg names is only supported by sendCheck.
      Parameters:
      newLevel - Either LEVEL_STANDARD or LEVEL_PREMIUM
      newName - Defensive Registration Name
    • setRoid

      public void setRoid(String aRoid)
      Sets the DefReg Roid.
      Parameters:
      aRoid - DefReg expiration date
    • getRoid

      public String getRoid()
      Gets the DefReg Roid.
      Returns:
      DefReg Roid
    • getTm

      public String getTm()
      Get the trademark informnation.
      Returns:
      DefReg tradeMark
    • setTm

      public void setTm(String aTm)
      Set the trademark informnation.
      Parameters:
      aTm - DefReg registrant
    • getTmCountry

      public String getTmCountry()
      Get the trademark country informnation.
      Returns:
      DefReg trademark country
    • setTmCountry

      public void setTmCountry(String aTmCountry)
      Set the trademark country informnation.
      Parameters:
      aTmCountry - DefReg trademark country
    • getTmDate

      public Date getTmDate()
      Get the trademark date informnation.
      Returns:
      DefReg trademark date
    • setTmDate

      public void setTmDate(Date aTmDate)
      Set the trademark date informnation.
      Parameters:
      aTmDate - DefReg trademark date
    • getAdminContact

      public String getAdminContact()
      Get the AdminContact informnation.
      Returns:
      DefReg AdminContact
    • setRegistrant

      public void setRegistrant(String aRegistrant)
      Sets the DefReg Registrant.
      Parameters:
      aRegistrant - DefReg Registrant.
    • setAdminContact

      public void setAdminContact(String aAdminContact)
      Sets the DefReg Admin Contact.
      Parameters:
      aAdminContact - DefReg Admin Contact.
    • getRegistrant

      public String getRegistrant()
      Gets the DefReg Registrant.
      Returns:
      DefReg Registrant
    • setExpirationDate

      public void setExpirationDate(Date newExpirationDate)
      Sets the DefReg expiration date.
      Parameters:
      newExpirationDate - DefReg expiration date
    • getExpirationDate

      public Date getExpirationDate()
      Gets the DefReg expiration date.
      Returns:
      DefReg expiration date
    • setTransferOpCode

      public void setTransferOpCode(String newTransferOpCode)
      Sets the transfer operation for a call to encodeTransfer. The transfer code must be set to one of the EPPDefReg.TRANSFER_ constants.
      Parameters:
      newTransferOpCode - One of the EPPDefReg.TRANSFER_ constants
    • setTransId

      public void setTransId(String newTransId)
      Sets the client transaction identifier.
      Parameters:
      newTransId - Client transaction identifier
    • setAuthString

      public void setAuthString(String newAuthString)
      Sets the authorization string associated with an sendCreate and sendTransfer.
      Parameters:
      newAuthString - Authorization string
    • getAuthString

      public String getAuthString()
      Sets the authorization string associated with an sendCreate and sendTransfer.
      Returns:
      Authorization string if defined; null otherwise.
    • getAuthRoid

      public String getAuthRoid()
      Sets the authorization roid that is used to identify the registrant or contact object if and only if the value of authInfo, set by setAuthString(String), is associated with the registrant or contact object. This can be used with sendTransfer along with setting the authInfo with the setAuthString(String) method.
      Returns:
      Roid of registrant or contact object if defined; null otherwise.
    • setAuthRoid

      public void setAuthRoid(String aAuthRoid)
      Gets the authorization roid that is used to identify the registrant or contact object if and only if the value of authInfo, set by setAuthString(String), is associated with the registrant or contact object. This can be used with sendTransfer along with setting the authInfo with the setAuthString(String) method.
      Parameters:
      aAuthRoid - Roid of registrant or contact object
    • sendCreate

      public EPPDefRegCreateResp sendCreate() throws EPPCommandException
      Sends a Defensive Registration Create Command to the server.

      The required attributes have been set with the following methods:

      • addDefRegName- Sets the defensive registration name to create. Only one defensive registration name is valid.
      • setAuthString- Sets the defensive registration authorization string.


      The optional attributes have been set with the following:

      • setTransId- Sets the client transaction identifier
      • setPeriodLength- Sets the registration period (default = 1)
      • setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)
      • setRegistrant- Sets the Registrant for the defensive registration. This is required for thick registries.
      • setAdminContact- Sets the adminitrator contact
      • setTm- Sets the trademark
      • setTmCountry- Sets the trademark country
      • setTmDate- Sets the trademark date
      Returns:
      EPPDefRegCreateResp containing the defensive registration create result. Use EPPDefRegCreateResp.getRoid to get the ROID required for the rest of the EPPDefReg operations.
      Throws:
      EPPCommandException - Error executing the create command. Use getResponse to get the associated server error response.
    • sendUpdate

      public EPPResponse sendUpdate() throws EPPCommandException
      Sends a Defensive Registration Update Command to the server.

      The required attributes have been set with the following methods:

      • setRoid- Sets the defensive registration ROID.


      The optional attributes have been set with the following:

      • setTransId- Sets the client transaction identifier
      • addStatus- Adds a status to the defensive registration. More than one status can be added.
      • removeStatus- Removes a status from the defensive registration. More than one status can be removed.
      • setRegistrant- Sets the Registrant for the defensive registration.
      • setAuthString- Sets the defensive registration name authorization
      • setRegistrant- Sets the Registrant for the defensive registration.
      • setAdminContact- Sets the adminitrator contact
      • setTm- Sets the trademark
      • setTmCountry- Sets the trademark country
      • setTmDate- Sets the trademark date string.
      At least one update attribute needs to be set.
      Returns:
      EPPResponse containing the defensive registration update result.
      Throws:
      EPPCommandException - Error executing the update command. Use getResponse to get the associated server error response.
    • sendTransfer

      public EPPDefRegTransferResp sendTransfer() throws EPPCommandException
      Sends a Defensive Registration Transfer Command to the server.

      The required attributes have been set with the following methods:

      • setRoid- Sets the defensive registration ROID.
      • setTransferOpCode- Sets the defensive registration transfer operation.
      • setAuthString- Sets the defensive registration authorization string.

        The optional attributes have been set with the following:

      • setTransId- Sets the client transaction identifier
      • setPeriodLength- Sets the registration period (default = 1)
      • setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)
      Returns:
      EPPDefRegTransferResp containing the defensive registration transfer result.
      Throws:
      EPPCommandException - Error executing the create command. Use getResponse to get the associated server error response.
    • sendRenew

      public EPPDefRegRenewResp sendRenew() throws EPPCommandException
      Sends a Defensive Registration Renew Command to the server.

      The required attributes have been set with the following methods:

      • setRoid- Sets the defensive registration ROID.
      • setExpirationDate- Sets current expiration date.


      The optional attributes have been set with the following:

      • setTransId- Sets the client transaction identifier
      • setPeriodLength- Sets the registration period (default = 1)
      • setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)
      Returns:
      EPPDefRegRenewResp containing the defensive registration renew result.
      Throws:
      EPPCommandException - Error executing the renew command. Use getResponse to get the associated server error response.
    • sendInfo

      public EPPDefRegInfoResp sendInfo() throws EPPCommandException
      Sends a Defensive Registration Info Command to the server.

      The required attributes have been set with the following methods:

      • setRoid- Sets the defensive registration ROID.


      The optional attributes have been set with the following:

      • setTransId- Sets the client transaction identifier
      Returns:
      EPPDefRegInfoResp containing the defensive registration information.
      Throws:
      EPPCommandException - Error executing the info command. Use getResponse to get the associated server error response.
    • sendCheck

      public EPPDefRegCheckResp sendCheck() throws EPPCommandException
      Sends a Defensive Registration Check Command to the server.

      The required attributes have been set with the following methods:

      • addDefRegName- Adds a defensive registration name to check. More than one defensive registration name can be checked in sendCheck


      The optional attributes have been set with the following:

      • setTransId- Sets the client transaction identifier
      Returns:
      EPPDefRegCheckResp containing the DefReg 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 Defensive Registration Delete Command to the server.

      The required attributes have been set with the following methods:

      • setRoid- Sets the defensive registration ROID.


      The optional attributes have been set with the following:

      • setTransId- Sets the client transaction identifier
      Returns:
      EPPResponse containing the delete result information.
      Throws:
      EPPCommandException - Error executing the delete command. Use getResponse to get the associated server error response.
    • addStatus

      public void addStatus(EPPDefRegStatus aStatus)
      Adds a status for use in calling sendUpdate.
      Parameters:
      aStatus - Status to add to defensive registration.
    • removeStatus

      public void removeStatus(EPPDefRegStatus aStatus)
      Removes a status for use in calling sendUpdate.
      Parameters:
      aStatus - Status to add to defensive registration.
    • 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:
      Response associated with the last command
    • setPeriodLength

      public void setPeriodLength(int newPeriodLength)
      This is a Setter Method for PriodLength private Attribute This Attribute maintains Validity Period : duration which defReg is registered for.
      Parameters:
      newPeriodLength - DOCUMENT ME!
    • setPeriodUnit

      public void setPeriodUnit(String newPeriodUnit)
      This is a Setter Method for PeriodUnit private Attribute This Attribute maintains Validity Unit :time unit where Period Length is mussured by. ie. year / month
      Parameters:
      newPeriodUnit - DOCUMENT ME!
    • getPeriodLength

      public int getPeriodLength()
      This is a Getter Method for PriodLength private Attribute This Attribute maintains Validity Period : duration which defReg is registered for.
      Returns:
      DOCUMENT ME!
    • getPeriodUnit

      public String getPeriodUnit()
      This is a Getter Method for PeriodUnit private Attribute This Attribute maintains Validity Unit :time unit where Period Length is mussured by. ie. year / month
      Returns:
      DOCUMENT ME!