Class NSHost
- java.lang.Object
-
- com.verisign.epp.interfaces.EPPHost
-
- com.verisign.epp.namestore.interfaces.NSHost
-
public class NSHost extends EPPHost
NameStore Host interface that extends that standardEPPHostby adding new methods like @link{#setSubProductID(String)}.EPPHostcould be used directly, butNSHostcan be enhanced independent of the EPP specification.
-
-
Field Summary
Fields Modifier and Type Field Description static intADDUsed to specify the addition of an attribute withaddUpdateOrgId.static intCHANGEUsed to specify the change of an attribute withaddUpdateOrgId.static intREMOVEUsed to specify the removal of an attribute withaddUpdateOrgId.-
Fields inherited from class com.verisign.epp.interfaces.EPPHost
DEFAULT_LANG, STAT_CLIENT_DELETE_PROHIBITED, STAT_CLIENT_UPDATE_PROHIBITED, STAT_LINKED, STAT_OK, STAT_PENDING_CREATE, STAT_PENDING_DELETE, STAT_PENDING_TRANSFER, STAT_PENDING_UPDATE, STAT_SERVER_DELETE_PROHIBITED, STAT_SERVER_UPDATE_PROHIBITED
-
-
Constructor Summary
Constructors Constructor Description NSHost(EPPSession aSession)Creates anNSHostwith an establishedEPPSession.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOrgId(EPPOrgExtId aOrgId)Adds an org identifier for use withsendCreate().voidaddUpdateOrgId(int aAction, EPPOrgExtId aOrgId)Updates the org identifier used withsendUpdate().protected voidresetHost()Resets the host attributes for the next command.EPPResponsesendCreate()Sends a Host Create Command to the server.
The required attributes have been set with the following methods:
addHostName- Sets the host name to create.EPPResponsesendUpdate()Sends a Host Update Command to the server.
The required attributes have been set with the following methods:
addHostName- Sets the domain name to update.voidsetSubProductID(java.lang.String aSubProductID)Sets the host sub-product id which specifies which is the target registry for the host operation.-
Methods inherited from class com.verisign.epp.interfaces.EPPHost
addExtension, addHostName, addIPV4Address, addIPV6Address, addStatus, addStatus, getExtensions, getNewName, getResponse, removeIPV4Address, removeIPV6Address, removeStatus, removeStatus, sendCheck, sendDelete, sendInfo, setExtension, setExtensions, setNewName, setTransId
-
-
-
-
Field Detail
-
ADD
public static final int ADD
Used to specify the addition of an attribute withaddUpdateOrgId.- See Also:
- Constant Field Values
-
REMOVE
public static final int REMOVE
Used to specify the removal of an attribute withaddUpdateOrgId.- See Also:
- Constant Field Values
-
CHANGE
public static final int CHANGE
Used to specify the change of an attribute withaddUpdateOrgId.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NSHost
public NSHost(EPPSession aSession)
Creates anNSHostwith an establishedEPPSession.- Parameters:
aSession- Established session
-
-
Method Detail
-
setSubProductID
public void setSubProductID(java.lang.String aSubProductID)
Sets the host sub-product id which specifies which is the target registry for the host operation. Some possible values include dotCC, dotTV, dotBZ, dotCOM, dotNET. This results in aEPPNamestoreExtNamestoreExtextension being added to the command.- Parameters:
aSubProductID- Sub-product id of host operation. Should use one of the @link{NSSubProduct} constants. Passingnullwill not add any extension.
-
addOrgId
public void addOrgId(EPPOrgExtId aOrgId)
Adds an org identifier for use withsendCreate().- Parameters:
aOrgId- Org identifier with role to add
-
addUpdateOrgId
public void addUpdateOrgId(int aAction, EPPOrgExtId aOrgId)Updates the org identifier used withsendUpdate(). There are three possible actions that can be used includingNSHost.ADD,NSHost.REMOVE, andNSHost.CHANGEfor the org identifier.- Parameters:
aAction- One of theNSHost.ADD,NSHost.REMOVE, andNSHost.CHANGEfor the org identifier.aOrgId- Org identifier to add, remove, or change
-
sendCreate
public EPPResponse sendCreate() throws EPPCommandException
Sends a Host Create Command to the server.
The required attributes have been set with the following methods:
addHostName- Sets the host name to create. Only one host name is valid.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifieraddIPV4Address- Add an IPV4 AddressaddIPV6Address- Add an IPV6 AddressaddOrgId- Add an organization identifier with a role
- Overrides:
sendCreatein classEPPHost- Returns:
EPPResponsecontaining the Host create result.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto get the associated server error response.
-
sendUpdate
public EPPResponse sendUpdate() throws EPPCommandException
Sends a Host Update Command to the server.
The required attributes have been set with the following methods:
addHostName- Sets the domain name to update. Only one domain name is valid.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifieraddIPV4Address- Adds IPV4 AddressaddIPV6Address- Adds IPV6 AddressremoveIPV4Address- Removes IPV4 AddressremoveIPV6Address- Removes IPV6 AddressaddStatus- Add statusremoveStatus- Remove statussetNewName- Renames the hostaddUpdateOrgId- Add an update to organization identifier
- Overrides:
sendUpdatein classEPPHost- Returns:
EPPResponsecontaining the Host update result.- Throws:
EPPCommandException- Error executing the update command. UsegetResponseto get the associated server error response.
-
-