Class EPPNameWatch


  • public class EPPNameWatch
    extends java.lang.Object
    EPPNameWatch is the primary client interface class used for nameWatch management. An instance of EPPNameWatch 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.nameWatch package.

    See Also:
    EPPResponse, EPPNameWatchCreateResp, EPPNameWatchInfoResp, EPPNameWatchTransferResp
    • Field Detail

      • STATUS_OK

        public static final java.lang.String STATUS_OK
        Status constants
        See Also:
        Constant Field Values
      • STATUS_SERVER_HOLD

        public static final java.lang.String STATUS_SERVER_HOLD
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_SERVER_RENEW_PROHIBITED

        public static final java.lang.String STATUS_SERVER_RENEW_PROHIBITED
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_SERVER_TRANSFER_PROHIBITED

        public static final java.lang.String STATUS_SERVER_TRANSFER_PROHIBITED
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_SERVER_UPDATE_PROHIBITED

        public static final java.lang.String STATUS_SERVER_UPDATE_PROHIBITED
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_SERVER_DELETE_PROHIBITED

        public static final java.lang.String STATUS_SERVER_DELETE_PROHIBITED
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_CLIENT_HOLD

        public static final java.lang.String STATUS_CLIENT_HOLD
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_CLIENT_RENEW_PROHIBITED

        public static final java.lang.String STATUS_CLIENT_RENEW_PROHIBITED
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_CLIENT_TRANSFER_PROHIBITED

        public static final java.lang.String STATUS_CLIENT_TRANSFER_PROHIBITED
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_CLIENT_UPDATE_PROHIBITED

        public static final java.lang.String STATUS_CLIENT_UPDATE_PROHIBITED
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_CLIENT_DELETE_PROHIBITED

        public static final java.lang.String STATUS_CLIENT_DELETE_PROHIBITED
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_PENDING_DELETE

        public static final java.lang.String STATUS_PENDING_DELETE
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • STATUS_PENDING_TRANSFER

        public static final java.lang.String STATUS_PENDING_TRANSFER
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • TRANSFER_APPROVE

        public static final java.lang.String TRANSFER_APPROVE
        Transfer Operation constants
        See Also:
        Constant Field Values
      • TRANSFER_CANCEL

        public static final java.lang.String TRANSFER_CANCEL
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • TRANSFER_QUERY

        public static final java.lang.String TRANSFER_QUERY
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • TRANSFER_REJECT

        public static final java.lang.String TRANSFER_REJECT
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • TRANSFER_REQUEST

        public static final java.lang.String TRANSFER_REQUEST
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • FREQ_DAILY

        public static final java.lang.String FREQ_DAILY
        Frequency type constants
        See Also:
        Constant Field Values
      • FREQ_WEEKLY

        public static final java.lang.String FREQ_WEEKLY
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • FREQ_MONTHLY

        public static final java.lang.String FREQ_MONTHLY
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PERIOD_MONTH

        public static final java.lang.String PERIOD_MONTH
        Period in Unit Month
        See Also:
        Constant Field Values
      • PERIOD_YEAR

        public static final java.lang.String PERIOD_YEAR
        Period in Unit Year
        See Also:
        Constant Field Values
    • Constructor Detail

      • EPPNameWatch

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

      • 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(EPPCodecComponet).
        Sets a command extension object.
        Parameters:
        aExtension - command extension object associated with the command
      • setExtensions

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

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

        public void setRoid​(java.lang.String newRoid)
        Sets the NameWatch roid
        Parameters:
        newRoid - NameWatch roid
      • getRoid

        public java.lang.String getRoid()
        Gets the NameWatch Roid
        Returns:
        NameWatch Roid
      • setExpirationDate

        public void setExpirationDate​(java.util.Date newExpirationDate)
        Sets the NameWatch expiration date.
        Parameters:
        newExpirationDate - NameWatch expiration date
      • getExpirationDate

        public java.util.Date getExpirationDate()
        Gets the NameWatch expiration date.
        Returns:
        NameWatch expiration date
      • getName

        public java.lang.String getName()
        Gets the NameWatch Name
        Returns:
        NameWatch Name
      • setName

        public void setName​(java.lang.String newName)
        Sets the NameWatch Name
        Parameters:
        newName - NameWatch Name
      • setTransferOpCode

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

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

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

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

        public java.lang.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​(java.lang.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
      • getRegistrant

        public java.lang.String getRegistrant()
        Gets the registrant.
        Returns:
        registrant if defined; null otherwise.
      • setRegistrant

        public void setRegistrant​(java.lang.String newRegistrant)
        Sets the registrant.
        Parameters:
        newRegistrant - NameWatch registrant
      • getRptTo

        public java.lang.String getRptTo()
        Gets NameWatch e-mail address to report to.
        Returns:
        E-mail address if defined; null otherwise.
      • setRptTo

        public void setRptTo​(java.lang.String aRptTo)
        Sets NameWatch e-mail address to report to.
        Parameters:
        aRptTo - addressString.
      • getFreq

        public java.lang.String getFreq()
        Gets NameWatch report frequency, which should be one of the FREQ_ constant values.
        Returns:
        Report frequency if defined; null otherwise.
      • setFreq

        public void setFreq​(java.lang.String aFreq)
        Sets the NameWatch report frequency, which should be one of the FREQ_ constant values.
        Parameters:
        aFreq - One of the FREQ_ constant values.
      • sendCreate

        public EPPNameWatchCreateResp sendCreate()
                                          throws EPPCommandException
        Sends a NameWatch Create Command to the server.

        The required attributes have been set with the following methods:

        • setName- Sets the namewatch name to create.
        • setAuthString- Sets the namewatch authorization
        • setRegistrant- Sets the Registrant for the namewatch. string.
        • setRptTo- Sets e-mail address to report to.
        • setFreq- Sets the frequency of the report


        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:
        EPPNameWatchCreateResp containing the namewatch create result. Use EPPNameWatchCreateResp.getRoid to get the ROID required for the rest of the EPPNameWatch 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 NameWatch Update Command to the server.

        The required attributes have been set with the following methods:

        • setRoid- Sets the namewatch ROID. string.


        The optional attributes have been set with the following:

        • setTransId- Sets the client transaction identifier
        • addStatus- Adds a status to the namewatch. More than one status can be added.
        • removeStatus- Removes a status from the namewatch. More than one status can be removed.
        • setRegistrant- Sets the Registrant for the namewatch.
        • setAuthString- Sets the namewatch authorization
        • setRptTo- Sets e-mail address to report to.
        • setFreq- Sets the frequency of the report
        Returns:
        EPPNameWatchCreateResp containing the namewatch create result. Use EPPNameWatchCreateResp.getRoid to get the ROID required for the rest of the EPPNameWatch operations.
        Throws:
        EPPCommandException - Error executing the create command. Use getResponse to get the associated server error response.
      • sendTransfer

        public EPPNameWatchTransferResp sendTransfer()
                                              throws EPPCommandException
        Sends a NameWatch Transfer Command to the server.

        The required attributes have been set with the following methods:

        • setRoid- Sets the namewatch ROID.
        • setTransferOpCode- Sets the namewatch transfer operation.
        • setAuthString- Sets the namewatch 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:
        EPPNameWatchTransferResp containing the namewatch transfer result.
        Throws:
        EPPCommandException - Error executing the create command. Use getResponse to get the associated server error response.
      • sendRenew

        public EPPNameWatchRenewResp sendRenew()
                                        throws EPPCommandException
        Sends a NameWatch Renew Command to the server.

        The required attributes have been set with the following methods:

        • setRoid- Sets the namewatch 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:
        EPPNameWatchRenewResp containing the namewatch renew result.
        Throws:
        EPPCommandException - Error executing the renew command. Use getResponse to get the associated server error response.
      • sendInfo

        public EPPNameWatchInfoResp sendInfo()
                                      throws EPPCommandException
        Sends a NameWatch Info Command to the server.

        The required attributes have been set with the following methods:

        • setRoid- Sets the namewatch ROID.


        The optional attributes have been set with the following:

        • setTransId- Sets the client transaction identifier
        Returns:
        EPPNameWatchInfoResp containing the namewatch information.
        Throws:
        EPPCommandException - Error executing the info command. Use getResponse to get the associated server error response.
      • sendDelete

        public EPPResponse sendDelete()
                               throws EPPCommandException
        Sends a NameWatch Delete Command to the server.

        The required attributes have been set with the following methods:

        • setRoid- Sets the namewatch 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.
      • 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
      • getPeriodLength

        public int getPeriodLength()
        Gets the registration period. The unit can be retrieved by calling getPeriodUnit.
        Returns:
        registration period if defined; 0 otherwise
      • setPeriodLength

        public void setPeriodLength​(int newPeriodLength)
        Sets the registration period. The default unit is years, but this can be overriden by calling setPeriodUnit.
        Parameters:
        newPeriodLength - DOCUMENT ME!
      • getPeriodUnit

        public java.lang.String getPeriodUnit()
        Gets the registration period unit. If defined, this should be either PERIOD_MONTH or PERIOD_YEAR.
        Returns:
        registration period unit if defined; 0 otherwise
      • setPeriodUnit

        public void setPeriodUnit​(java.lang.String newPeriodUnit)
        Sets the registration period unit.
        Parameters:
        newPeriodUnit - DOCUMENT ME!
      • addStatus

        public void addStatus​(EPPNameWatchStatus aStatus)
        Adds a status for use in calling sendUpdate.
        Parameters:
        aStatus - Status to add to namewatch.
      • removeStatus

        public void removeStatus​(EPPNameWatchStatus aStatus)
        Removes a status for use in calling sendUpdate.
        Parameters:
        aStatus - Status to add to namewatch.