Package com.verisign.epp.interfaces
Class EPPNameWatch
- java.lang.Object
-
- com.verisign.epp.interfaces.EPPNameWatch
-
public class EPPNameWatch extends java.lang.ObjectEPPNameWatchis the primary client interface class used for nameWatch management. An instance ofEPPNameWatchis created with an initializedEPPSession, 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 ofEPPResponseor instances of response classes in thecom.verisign.epp.codec.nameWatchpackage.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFREQ_DAILYFrequency type constantsstatic java.lang.StringFREQ_MONTHLYDOCUMENT ME!static java.lang.StringFREQ_WEEKLYDOCUMENT ME!static java.lang.StringPERIOD_MONTHPeriod in Unit Monthstatic java.lang.StringPERIOD_YEARPeriod in Unit Yearstatic java.lang.StringSTATUS_CLIENT_DELETE_PROHIBITEDDOCUMENT ME!static java.lang.StringSTATUS_CLIENT_HOLDDOCUMENT ME!static java.lang.StringSTATUS_CLIENT_RENEW_PROHIBITEDDOCUMENT ME!static java.lang.StringSTATUS_CLIENT_TRANSFER_PROHIBITEDDOCUMENT ME!static java.lang.StringSTATUS_CLIENT_UPDATE_PROHIBITEDDOCUMENT ME!static java.lang.StringSTATUS_OKStatus constantsstatic java.lang.StringSTATUS_PENDING_DELETEDOCUMENT ME!static java.lang.StringSTATUS_PENDING_TRANSFERDOCUMENT ME!static java.lang.StringSTATUS_SERVER_DELETE_PROHIBITEDDOCUMENT ME!static java.lang.StringSTATUS_SERVER_HOLDDOCUMENT ME!static java.lang.StringSTATUS_SERVER_RENEW_PROHIBITEDDOCUMENT ME!static java.lang.StringSTATUS_SERVER_TRANSFER_PROHIBITEDDOCUMENT ME!static java.lang.StringSTATUS_SERVER_UPDATE_PROHIBITEDDOCUMENT ME!static java.lang.StringTRANSFER_APPROVETransfer Operation constantsstatic java.lang.StringTRANSFER_CANCELDOCUMENT ME!static java.lang.StringTRANSFER_QUERYDOCUMENT ME!static java.lang.StringTRANSFER_REJECTDOCUMENT ME!static java.lang.StringTRANSFER_REQUESTDOCUMENT ME!
-
Constructor Summary
Constructors Constructor Description EPPNameWatch(EPPSession newSession)Constructs anEPPNameWatchgiven an initialized EPP session.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddExtension(EPPCodecComponent aExtension)Adds a command extension object.voidaddStatus(EPPNameWatchStatus aStatus)Adds a status for use in callingsendUpdate.java.lang.StringgetAuthRoid()Sets the authorization roid that is used to identify the registrant or contact object if and only if the value of authInfo, set bysetAuthString(String), is associated with the registrant or contact object.java.lang.StringgetAuthString()Sets the authorization string associated with ansendCreateandsendTransfer.java.util.DategetExpirationDate()Gets the NameWatch expiration date.java.util.VectorgetExtensions()Gets the command extensions.java.lang.StringgetFreq()Gets NameWatch report frequency, which should be one of theFREQ_constant values.java.lang.StringgetName()Gets the NameWatch NameintgetPeriodLength()Gets the registration period.java.lang.StringgetPeriodUnit()Gets the registration period unit.java.lang.StringgetRegistrant()Gets the registrant.EPPResponsegetResponse()Gets the response associated with the last command.java.lang.StringgetRoid()Gets the NameWatch Roidjava.lang.StringgetRptTo()Gets NameWatch e-mail address to report to.voidremoveStatus(EPPNameWatchStatus aStatus)Removes a status for use in callingsendUpdate.EPPNameWatchCreateRespsendCreate()Sends a NameWatch Create Command to the server.EPPResponsesendDelete()Sends a NameWatch Delete Command to the server.EPPNameWatchInfoRespsendInfo()Sends a NameWatch Info Command to the server.EPPNameWatchRenewRespsendRenew()Sends a NameWatch Renew Command to the server.EPPNameWatchTransferRespsendTransfer()Sends a NameWatch Transfer Command to the server.EPPResponsesendUpdate()Sends a NameWatch Update Command to the server.voidsetAuthRoid(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 bysetAuthString(String), is associated with the registrant or contact object.voidsetAuthString(java.lang.String newAuthString)Sets the authorization string associated with ansendCreateandsendTransfer.voidsetExpirationDate(java.util.Date newExpirationDate)Sets the NameWatch expiration date.voidsetExtension(EPPCodecComponent aExtension)Deprecated.Replaced byaddExtension(EPPCodecComponent).voidsetExtensions(java.util.Vector aExtensions)Sets the command extension objects.voidsetFreq(java.lang.String aFreq)Sets the NameWatch report frequency, which should be one of theFREQ_constant values.voidsetName(java.lang.String newName)Sets the NameWatch NamevoidsetPeriodLength(int newPeriodLength)Sets the registration period.voidsetPeriodUnit(java.lang.String newPeriodUnit)Sets the registration period unit.voidsetRegistrant(java.lang.String newRegistrant)Sets the registrant.voidsetRoid(java.lang.String newRoid)Sets the NameWatch roidvoidsetRptTo(java.lang.String aRptTo)Sets NameWatch e-mail address to report to.voidsetTransferOpCode(java.lang.String newTransferOpCode)Sets the transfer operation for a call toencodeTransfer.voidsetTransId(java.lang.String newTransId)Sets the client transaction identifier.
-
-
-
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 anEPPNameWatchgiven 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 byaddExtension(EPPCodecComponent). This method will add the extension as is done inaddExtension(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:
Vectorof concreteEPPCodecComponentassociated with the command if exists;nullotherwise.
-
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 toencodeTransfer. The transfer code must be set to one of theEPPNameWatch.TRANSFER_constants.- Parameters:
newTransferOpCode- One of theEPPNameWatch.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 ansendCreateandsendTransfer.- Parameters:
newAuthString- Authorization string
-
getAuthString
public java.lang.String getAuthString()
Sets the authorization string associated with ansendCreateandsendTransfer.- Returns:
- Authorization string if defined;
nullotherwise.
-
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 bysetAuthString(String), is associated with the registrant or contact object. This can be used withsendTransferalong with setting the authInfo with thesetAuthString(String)method.- Returns:
- Roid of registrant or contact object if defined;
nullotherwise.
-
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 bysetAuthString(String), is associated with the registrant or contact object. This can be used withsendTransferalong with setting the authInfo with thesetAuthString(String)method.- Parameters:
aAuthRoid- Roid of registrant or contact object
-
getRegistrant
public java.lang.String getRegistrant()
Gets the registrant.- Returns:
- registrant if defined;
nullotherwise.
-
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;
nullotherwise.
-
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 theFREQ_constant values.- Returns:
- Report frequency if defined;
nullotherwise.
-
setFreq
public void setFreq(java.lang.String aFreq)
Sets the NameWatch report frequency, which should be one of theFREQ_constant values.- Parameters:
aFreq- One of theFREQ_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 authorizationsetRegistrant- 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 identifiersetPeriodLength- Sets the registration period (default = 1)setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)
- Returns:
EPPNameWatchCreateRespcontaining the namewatch create result. UseEPPNameWatchCreateResp.getRoidto get the ROID required for the rest of theEPPNameWatchoperations.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto 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 identifieraddStatus- 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 authorizationsetRptTo- Sets e-mail address to report to.setFreq- Sets the frequency of the report
- Returns:
EPPNameWatchCreateRespcontaining the namewatch create result. UseEPPNameWatchCreateResp.getRoidto get the ROID required for the rest of theEPPNameWatchoperations.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto 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 identifiersetPeriodLength- Sets the registration period (default = 1)setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)
- Returns:
EPPNameWatchTransferRespcontaining the namewatch transfer result.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto 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 identifiersetPeriodLength- Sets the registration period (default = 1)setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)
- Returns:
EPPNameWatchRenewRespcontaining the namewatch renew result.- Throws:
EPPCommandException- Error executing the renew command. UsegetResponseto 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:
EPPNameWatchInfoRespcontaining the namewatch information.- Throws:
EPPCommandException- Error executing the info command. UsegetResponseto 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:
EPPResponsecontaining the delete result information.- Throws:
EPPCommandException- Error executing the delete command. UsegetResponseto 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 callinggetPeriodUnit.- Returns:
- registration period if defined;
0otherwise
-
setPeriodLength
public void setPeriodLength(int newPeriodLength)
Sets the registration period. The default unit is years, but this can be overriden by callingsetPeriodUnit.- Parameters:
newPeriodLength- DOCUMENT ME!
-
getPeriodUnit
public java.lang.String getPeriodUnit()
Gets the registration period unit. If defined, this should be eitherPERIOD_MONTHorPERIOD_YEAR.- Returns:
- registration period unit if defined;
0otherwise
-
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 callingsendUpdate.- Parameters:
aStatus- Status to add to namewatch.
-
removeStatus
public void removeStatus(EPPNameWatchStatus aStatus)
Removes a status for use in callingsendUpdate.- Parameters:
aStatus- Status to add to namewatch.
-
-