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 standardEPPHost
by adding new methods like @link{#setSubProductID(String)}.EPPHost
could be used directly, butNSHost
can be enhanced independent of the EPP specification.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADD
Used to specify the addition of an attribute withaddUpdateOrgId
.static int
CHANGE
Used to specify the change of an attribute withaddUpdateOrgId
.static int
REMOVE
Used 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 anNSHost
with an establishedEPPSession
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrgId(EPPOrgExtId aOrgId)
Adds an org identifier for use withsendCreate()
.void
addUpdateOrgId(int aAction, EPPOrgExtId aOrgId)
Updates the org identifier used withsendUpdate()
.protected void
resetHost()
Resets the host attributes for the next command.EPPResponse
sendCreate()
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.EPPResponse
sendUpdate()
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.void
setSubProductID(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 anNSHost
with 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 aEPPNamestoreExtNamestoreExt
extension being added to the command.- Parameters:
aSubProductID
- Sub-product id of host operation. Should use one of the @link{NSSubProduct} constants. Passingnull
will 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.CHANGE
for the org identifier.- Parameters:
aAction
- One of theNSHost.ADD
,NSHost.REMOVE
, andNSHost.CHANGE
for 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:
sendCreate
in classEPPHost
- Returns:
EPPResponse
containing the Host create result.- Throws:
EPPCommandException
- Error executing the create command. UsegetResponse
to 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:
sendUpdate
in classEPPHost
- Returns:
EPPResponse
containing the Host update result.- Throws:
EPPCommandException
- Error executing the update command. UsegetResponse
to get the associated server error response.
-
-