Class EPPRegistry
- java.lang.Object
-
- com.verisign.epp.interfaces.registry.v02.EPPRegistry
-
public class EPPRegistry extends java.lang.ObjectInterface class for the EPP Registry Object that complies with v01 (urn:ietf:params:xml:ns:registry-0.1) of the XML schema. This class can be used to prepare and send the supported EPP Registry Object commands.EPPRegistryrequires an establishedEPPSessionthat is used to send the commands and read the responses from a server.
-
-
Constructor Summary
Constructors Constructor Description EPPRegistry(EPPSession aSession)Constructs anEPPRegistrygiven an initialized EPP session.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExtension(EPPCodecComponent aExtension)Adds a command extension object.voidaddZone(EPPRegistryZoneName aZone)Add a zone name to the list of zone names.voidaddZone(java.lang.String aZone)Add an aLabel zone name to the list of zone names.EPPRegistryInfoCmd.ScopegetAllScope()Gets the zone scope used with the info all option.java.util.Vector<EPPCodecComponent>getExtensions()Gets the command extensions.EPPRegistryInfoCmd.ModegetInfoMode()Gets the info mode.EPPResponsegetResponse()Gets the response associated with the last command.EPPSessiongetSession()Gets the session to use to send commands through.java.lang.StringgetTransId()Gets the OPTIONAL client transaction identifier.java.util.List<EPPRegistryZoneName>getZoneList()Gets the list of zone names.booleanhasInfoMode()Is the info mode defined?EPPRegistryCheckRespsendCheck()Sends a check command to the server.
The required attributes have been set with the following methods:
addZone(EPPRegistryZoneName),addZone(String), orsetZoneList(List)- To set the zone names to check.EPPRegistryCreateRespsendCreate()Sends a create command to the server to create a zone.
The required attributes have been set with the following methods:
setZone(EPPRegistryZone)- Contains the attributes of the zone to create.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifieraddExtension(EPPCodecComponent)orsetExtensions(Vector)- Set extensions to include with the command.EPPResponsesendDelete()Sends a delete command to the server to delete a zone by name.
The required attributes have been set with the following methods:
addZone(EPPRegistryZoneName),addZone(String), orsetZoneList(List)- To set a single zone name to delete.EPPRegistryInfoRespsendInfo()Sends an info command to the server.EPPResponsesendUpdate()Sends an update command to the server to update a zone.
The required attributes have been set with the following methods:
setZone(EPPRegistryZone)- Contains the attributes of the zone to update.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifieraddExtension(EPPCodecComponent)orsetExtensions(Vector)- Set extensions to include with the command.voidsetAllScope(EPPRegistryInfoCmd.Scope aScope)Sets the zone scope used with the info all mode.voidsetExtensions(java.util.Vector<EPPCodecComponent> aExtensions)Sets the command extensions.voidsetInfoMode(EPPRegistryInfoCmd.Mode aInfoMode)Sets the info mode.voidsetSession(EPPSession aSession)Sets the session to use to send commands through.voidsetTransId(java.lang.String aTransId)Sets the OPTIONAL client transaction identifier.voidsetZone(EPPRegistryZone aZone)Sets the zone to use withsendCreate()orsendUpdate().voidsetZoneList(java.util.List<EPPRegistryZoneName> aZoneList)Sets the list of zone names to use in a command.
-
-
-
Constructor Detail
-
EPPRegistry
public EPPRegistry(EPPSession aSession)
Constructs anEPPRegistrygiven an initialized EPP session.- Parameters:
aSession- Server session to use.
-
-
Method Detail
-
sendCheck
public EPPRegistryCheckResp sendCheck() throws EPPCommandException
Sends a check command to the server.
The required attributes have been set with the following methods:
addZone(EPPRegistryZoneName),addZone(String), orsetZoneList(List)- To set the zone names to check. More than one zone name can be checked insendCheck.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifieraddExtension(EPPCodecComponent)orsetExtensions(Vector)- Set extensions to include with the command.
- Returns:
EPPRegistryCheckRespcontaining the zone check information.- Throws:
EPPCommandException- Error executing the check command. UsegetResponse()to get the associated server error response.
-
sendDelete
public EPPResponse sendDelete() throws EPPCommandException
Sends a delete command to the server to delete a zone by name.
The required attributes have been set with the following methods:
addZone(EPPRegistryZoneName),addZone(String), orsetZoneList(List)- To set a single zone name to delete. More than one zone name will result in anEPPCommandException.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifieraddExtension(EPPCodecComponent)orsetExtensions(Vector)- Set extensions to include with the command.
- Returns:
EPPResponsecontaining the result of the delete command- Throws:
EPPCommandException- Error executing the delete command. UsegetResponse()to get the associated server error response.
-
sendInfo
public EPPRegistryInfoResp sendInfo() throws EPPCommandException
Sends an info command to the server. There are three forms of the info command that include get all zone summary information, get detailed information for an individual zone, or get system information.
The required attributes have been set with the following methods:
addZone(EPPRegistryZoneName),addZone(String), orsetZoneList(List)- To set a single zone name to get the detailed information for. This is used to send the "get detailed information for an individual zone" form. More than one zone name will result in anEPPCommandException. ORsetAllScope(EPPRegistryInfoCmd.Scope)- "get all zone summary information" form of info command. ORsetInfoMode(EPPRegistryInfoCmd.Mode)- Used to explicitly set the info mode toEPPRegistryInfoCmd.Mode.system.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifieraddExtension(EPPCodecComponent)orsetExtensions(Vector)- Set extensions to include with the command.
- Returns:
EPPRegistryInfoRespcontaining the requested information from the server based on the form of the info command.- Throws:
EPPCommandException- Error executing the info command. UsegetResponse()to get the associated server error response.
-
sendCreate
public EPPRegistryCreateResp sendCreate() throws EPPCommandException
Sends a create command to the server to create a zone.
The required attributes have been set with the following methods:
setZone(EPPRegistryZone)- Contains the attributes of the zone to create.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifieraddExtension(EPPCodecComponent)orsetExtensions(Vector)- Set extensions to include with the command.
- Returns:
EPPRegistryCreateRespcontaining the result of the create command- Throws:
EPPCommandException- Error executing the create command. UsegetResponse()to get the associated server error response.
-
sendUpdate
public EPPResponse sendUpdate() throws EPPCommandException
Sends an update command to the server to update a zone.
The required attributes have been set with the following methods:
setZone(EPPRegistryZone)- Contains the attributes of the zone to update.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifieraddExtension(EPPCodecComponent)orsetExtensions(Vector)- Set extensions to include with the command.
- Returns:
EPPResponsecontaining the result of the update command- Throws:
EPPCommandException- Error executing the update command. UsegetResponse()to get the associated server error response.
-
getSession
public EPPSession getSession()
Gets the session to use to send commands through.- Returns:
- Active EPP session to send commands through if defined;
nullotherwise.
-
setSession
public void setSession(EPPSession aSession)
Sets the session to use to send commands through.- Parameters:
aSession- Active EPP session to send commands through
-
getTransId
public java.lang.String getTransId()
Gets the OPTIONAL client transaction identifier.- Returns:
- The client transaction identifier if set;
nullotherwise.
-
setTransId
public void setTransId(java.lang.String aTransId)
Sets the OPTIONAL client transaction identifier.- Parameters:
aTransId- Client transaction identifier
-
getZoneList
public java.util.List<EPPRegistryZoneName> getZoneList()
Gets the list of zone names.- Returns:
- List of zone names
-
setZoneList
public void setZoneList(java.util.List<EPPRegistryZoneName> aZoneList)
Sets the list of zone names to use in a command. The mode is set toEPPRegistryInfoCmd.Mode.all.- Parameters:
aZoneList- List of zone names
-
addZone
public void addZone(java.lang.String aZone)
Add an aLabel zone name to the list of zone names. The mode is set toEPPRegistryInfoCmd.Mode.all.- Parameters:
aZone- ALabel zone name to add to the list of zone names.
-
addZone
public void addZone(EPPRegistryZoneName aZone)
Add a zone name to the list of zone names. The mode is set toEPPRegistryInfoCmd.Mode.name.- Parameters:
aZone- Zone name to add to the list of zone names.
-
getAllScope
public EPPRegistryInfoCmd.Scope getAllScope()
Gets the zone scope used with the info all option.- Returns:
- info all scope if defined;
nullotherwise.
-
setAllScope
public void setAllScope(EPPRegistryInfoCmd.Scope aScope)
Sets the zone scope used with the info all mode. The mode is set toEPPRegistryInfoCmd.Mode.all.- Parameters:
aScope- Scope used for the info all mode.
-
hasInfoMode
public boolean hasInfoMode()
Is the info mode defined?- Returns:
trueif the info mode is defined;falseotherwise.
-
getInfoMode
public EPPRegistryInfoCmd.Mode getInfoMode()
Gets the info mode.- Returns:
- The info mode if defined;
nullotherwise.
-
setInfoMode
public void setInfoMode(EPPRegistryInfoCmd.Mode aInfoMode)
Sets the info mode. This is needed when using theEPPRegistryInfoCmd.Mode.systemmode, where the other modes are automatically set using the other associated methods.- Parameters:
aInfoMode- Info mode to use
-
setZone
public void setZone(EPPRegistryZone aZone)
Sets the zone to use withsendCreate()orsendUpdate().- Parameters:
aZone- The zone to use withsendCreate()orsendUpdate().
-
getExtensions
public java.util.Vector<EPPCodecComponent> getExtensions()
Gets the command extensions.- Returns:
Vectorof concreteEPPCodecComponentassociated with the command if exists;nullotherwise.
-
setExtensions
public void setExtensions(java.util.Vector<EPPCodecComponent> aExtensions)
Sets the command extensions.- Parameters:
aExtensions- Command extensions associated with the command. Setting tonullclears the extensions.
-
addExtension
public void addExtension(EPPCodecComponent aExtension)
Adds a command extension object.- Parameters:
aExtension- Command extension associated with the command
-
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 ofEPPCommandException.- Returns:
EPPResponseassociated with the last command if defined;nullotherwise.
-
-