Package com.verisign.epp.codec.registry
Class EPPRegistryDomainPeriod
java.lang.Object
com.verisign.epp.codec.registry.EPPRegistryDomainPeriod
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
Defines the supported registration periods and default periods by command
type. The required "command" attribute defines the command type with sample
values of "create", "renew", and "transfer". The <registry:period>
element contains ONE of the following elements:
-
<registry:length> - The default, minimum, and maximum period length for
the command type. Use
getLength()andsetLength(EPPRegistryMinMaxPeriod)to get and set this element. -
<registry:serverDecided> - The registration period is decided by the
server based on the relationship to a related object that MUST have the same
expiration date. Use
getServerDecided()andsetServerDecided(Boolean)to get and set this element.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML attribute name for thecommandattribute.static final StringXML Element Name ofEPPRegistryDomainPeriodroot element.static final StringXML Element Name ofserverDecidedattribute.static final intMaximum period in years as defined in RFC5731static final intMaximum period in years as defined in RFC5731 -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EPPRegistryDomainPeriod(String command, int min, String minUnit, int max, String maxUnit, int defaultLength, String defaultLengthUnit) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.EPPRegistryDomainPeriod(String command, Boolean serverDecided) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.EPPRegistryDomainPeriod(String command, Integer min, String minUnit, Integer max, String maxUnit, Integer defaultLength, String defaultLengthUnit) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPRegistryDomainPeriod.voidDecode theEPPRegistryDomainPeriodattributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPRegistryDomainPeriodinstance.booleanimplements a deepEPPRegistryDomainPeriodcompare.Get the command type.Get the length for an EPP domain transform command.Returns the XML namespace associated with theEPPCodecComponent.Get whether to have server decided expiration date.voidsetCommand(String command) Set the command type.voidsetLength(EPPRegistryMinMaxPeriod length) Set the length for an EPP domain transform command.voidsetServerDecided(Boolean serverDecided) Set whether to have server decided expiration date.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
ELM_NAME
XML Element Name ofEPPRegistryDomainPeriodroot element.- See Also:
-
ELM_SERVER_DECIDED
XML Element Name ofserverDecidedattribute.- See Also:
-
ATTR_COMMAND
XML attribute name for thecommandattribute.- See Also:
-
MAX_PERIOD
public static final int MAX_PERIODMaximum period in years as defined in RFC5731- See Also:
-
MIN_PERIOD
public static final int MIN_PERIODMaximum period in years as defined in RFC5731- See Also:
-
-
Constructor Details
-
EPPRegistryDomainPeriod
public EPPRegistryDomainPeriod()Default constructor. Attributes are set default values:command-nulllength-nullserverDecided-Boolean.FALSE
-
EPPRegistryDomainPeriod
public EPPRegistryDomainPeriod(String command, Integer min, String minUnit, Integer max, String maxUnit, Integer defaultLength, String defaultLengthUnit) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.serverDecidedis set toBoolean.FALSE:- Parameters:
command- command typemin- minimum length numberminUnit- minimum length unitmax- maximum length numbermaxUnit- maximum length unitdefaultLength- default length numberdefaultLengthUnit- length unit
-
EPPRegistryDomainPeriod
public EPPRegistryDomainPeriod(String command, int min, String minUnit, int max, String maxUnit, int defaultLength, String defaultLengthUnit) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.serverDecidedis set toBoolean.FALSE:- Parameters:
command- command typemin- minimum length numberminUnit- minimum length unitmax- maximum length numbermaxUnit- maximum length unitdefaultLength- default length numberdefaultLengthUnit- length unit
-
EPPRegistryDomainPeriod
Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.lengthis set tonull:- Parameters:
command- command typeserverDecided- whether no not to have server decided expiration date
-
-
Method Details
-
encode
Encode a DOM Element tree from the attributes of theEPPRegistryDomainPeriodinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryDomainPeriodinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryDomainPeriodinstance.
-
decode
Decode theEPPRegistryDomainPeriodattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPRegistryDomainPeriodfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
clone
CloneEPPRegistryDomainPeriod.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPRegistryDomainPeriod - Throws:
CloneNotSupportedException- standard Object.clone exception
-
equals
implements a deepEPPRegistryDomainPeriodcompare. -
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getLength
Get the length for an EPP domain transform command.- Returns:
- instance of
EPPRegistryMinMaxPeriodthat defines min/max/default period for a given command
-
setLength
Set the length for an EPP domain transform command.- Parameters:
length- instance ofEPPRegistryMinMaxPeriodthat defines min/max/default period for a given command
-
getServerDecided
Get whether to have server decided expiration date.- Returns:
true- the registration period is decided by the server based on the relationship to a related object that MUST have the same expiration date.false- the registration period is specified in thelengthattribute.
-
setServerDecided
Set whether to have server decided expiration date.- Parameters:
serverDecided-true- the registration period is decided by the server based on the relationship to a related object that MUST have the same expiration date.false- the registration period is specified in thelengthattribute.
-
getCommand
Get the command type.- Returns:
- command type in
String. Valid values are "create", "renew" and "transfer".
-
setCommand
Set the command type.- Parameters:
command- command type inString. Valid values are "create", "renew" and "transfer".
-
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-