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,Serializable,Cloneable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML attribute name for thecommandattribute.protected StringEPP transform command to which this period appliesstatic final StringXML Element Name ofEPPRegistryGracePeriodroot 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
ConstructorsConstructorDescriptionDefault constructor.EPPRegistryGracePeriod(String command, int number, String unit) Constructs an instance ofEPPRegistryGracePeriodwithcommand,numberandunit.EPPRegistryGracePeriod(String command, Integer number, String unit) Constructs an instance ofEPPRegistryGracePeriodwithcommand,numberandunit. -
Method Summary
Modifier and TypeMethodDescriptionvoidDecode theEPPRegistryGracePeriodattributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPRegistryGracePeriodinstance.booleanGet the EPP transform command to which this period applies.Returns the XML namespace associated with theEPPCodecComponent.voidsetCommand(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 Details
-
ELM_NAME
XML Element Name ofEPPRegistryGracePeriodroot element.- See Also:
-
ATTR_COMMAND
XML attribute name for thecommandattribute.- See Also:
-
command
EPP transform command to which this period applies
-
-
Constructor Details
-
EPPRegistryGracePeriod
public EPPRegistryGracePeriod()Default constructor. Must callEPPRegistryPeriodType.setNumber(Integer),EPPRegistryPeriodType.setUnit(String)andsetCommand(String)before callingencode(Document)method. -
EPPRegistryGracePeriod
Constructs an instance ofEPPRegistryGracePeriodwithcommand,numberandunit.- Parameters:
command- EPP command to which this period appliesnumber- number must be > 0unit- unit must be one of "d", "h" or "m"
-
EPPRegistryGracePeriod
Constructs an instance ofEPPRegistryGracePeriodwithcommand,numberandunit.- Parameters:
command- EPP command to which this period appliesnumber- number must be > 0unit- unit must be one of "d", "h" or "m"
-
-
Method Details
-
encode
Encode a DOM Element tree from the attributes of theEPPRegistryGracePeriodinstance.- Specified by:
encodein interfaceEPPCodecComponent- Overrides:
encodein classEPPRegistryPeriodType- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryGracePeriodinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryGracePeriodinstance.
-
decode
Decode theEPPRegistryGracePeriodattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Overrides:
decodein classEPPRegistryPeriodType- Parameters:
aElement- Root DOM Element to decodeEPPRegistryGracePeriodfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
equals
- Overrides:
equalsin classEPPRegistryPeriodType
-
getCommand
Get the EPP transform command to which this period applies.- Returns:
- EPP transform command to which this period applies
-
setCommand
Set the EPP transform command to which this period applies.- Parameters:
command- EPP transform command to which this period applies
-
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Returns:
- XML namespace for the
EPPCodecComponent.
-