Package com.verisign.epp.codec.registry
Class EPPRegistryGracePeriod
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryPeriodType
-
- com.verisign.epp.codec.registry.EPPRegistryGracePeriod
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryGracePeriod extends EPPRegistryPeriodType
Defines the grace periods by operation type. The required "command" attribute defines the operation type with the sample values of "create", "renew", "transfer", and "autoRenew". The <registry:gracePeriod> element requires the "unit" attribute with the possible values of "d" for day, "h" for hour, and "m" for minute.- See Also:
EPPRegistryDomain
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_COMMAND
XML attribute name for thecommand
attribute.protected java.lang.String
command
EPP transform command to which this period appliesstatic java.lang.String
ELM_NAME
XML Element Name ofEPPRegistryGracePeriod
root element.-
Fields inherited from class com.verisign.epp.codec.registry.EPPRegistryPeriodType
number, PERIOD_UNIT_DAY, PERIOD_UNIT_HOUR, PERIOD_UNIT_MONTH, PERIOD_UNIT_YEAR, rootName, unit, VALID_UNITS
-
-
Constructor Summary
Constructors Constructor Description EPPRegistryGracePeriod()
Default constructor.EPPRegistryGracePeriod(java.lang.String command, int number, java.lang.String unit)
Constructs an instance ofEPPRegistryGracePeriod
withcommand
,number
andunit
.EPPRegistryGracePeriod(java.lang.String command, java.lang.Integer number, java.lang.String unit)
Constructs an instance ofEPPRegistryGracePeriod
withcommand
,number
andunit
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryGracePeriod
attributes from the aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPRegistryGracePeriod
instance.boolean
equals(java.lang.Object aObject)
java.lang.String
getCommand()
Get the EPP transform command to which this period applies.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.void
setCommand(java.lang.String command)
Set the EPP transform command to which this period applies.-
Methods inherited from class com.verisign.epp.codec.registry.EPPRegistryPeriodType
clone, getNumber, getRootName, getUnit, setNumber, setUnit, toString
-
-
-
-
Field Detail
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML Element Name ofEPPRegistryGracePeriod
root element.- See Also:
- Constant Field Values
-
ATTR_COMMAND
public static final java.lang.String ATTR_COMMAND
XML attribute name for thecommand
attribute.- See Also:
- Constant Field Values
-
command
protected java.lang.String command
EPP transform command to which this period applies
-
-
Constructor Detail
-
EPPRegistryGracePeriod
public EPPRegistryGracePeriod()
Default constructor. Must callEPPRegistryPeriodType.setNumber(Integer)
,EPPRegistryPeriodType.setUnit(String)
andsetCommand(String)
before callingencode(Document)
method.
-
EPPRegistryGracePeriod
public EPPRegistryGracePeriod(java.lang.String command, java.lang.Integer number, java.lang.String unit)
Constructs an instance ofEPPRegistryGracePeriod
withcommand
,number
andunit
.- Parameters:
command
- EPP command to which this period appliesnumber
- number must be > 0unit
- unit must be one of "d", "h" or "m"
-
EPPRegistryGracePeriod
public EPPRegistryGracePeriod(java.lang.String command, int number, java.lang.String unit)
Constructs an instance ofEPPRegistryGracePeriod
withcommand
,number
andunit
.- Parameters:
command
- EPP command to which this period appliesnumber
- number must be > 0unit
- unit must be one of "d", "h" or "m"
-
-
Method Detail
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPRegistryGracePeriod
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Overrides:
encode
in classEPPRegistryPeriodType
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryGracePeriod
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryGracePeriod
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryGracePeriod
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Overrides:
decode
in classEPPRegistryPeriodType
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryGracePeriod
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
equals
public boolean equals(java.lang.Object aObject)
- Overrides:
equals
in classEPPRegistryPeriodType
-
getCommand
public java.lang.String getCommand()
Get the EPP transform command to which this period applies.- Returns:
- EPP transform command to which this period applies
-
setCommand
public void setCommand(java.lang.String command)
Set the EPP transform command to which this period applies.- Parameters:
command
- EPP transform command to which this period applies
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-