Class EPPRegistryDomainPeriod
java.lang.Object
com.verisign.epp.codec.registry.v02.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 local name forEPPRegistryDomainPeriod.static final StringXML root tag forEPPRegistryDomainPeriod.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 aCommand, int aMin, EPPRegistryPeriodType.Unit aMinUnit, int aMax, EPPRegistryPeriodType.Unit aMaxUnit, int aDefaultLength, EPPRegistryPeriodType.Unit aDefaultLengthUnit) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.EPPRegistryDomainPeriod(String aCommand, Boolean aServerDecided) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.EPPRegistryDomainPeriod(String aCommand, Integer aMin, EPPRegistryPeriodType.Unit aMinUnit, Integer aMax, EPPRegistryPeriodType.Unit aMaxUnit, Integer aDefaultLength, EPPRegistryPeriodType.Unit aDefaultLengthUnit) 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.Gets the command type.Gets the length for an EPP domain transform command.Returns the XML namespace associated with theEPPCodecComponent.Gets whether to have server decided expiration date.voidsetCommand(String command) Sets the command type.voidsetLength(EPPRegistryMinMaxPeriod length) Sets the length for an EPP domain transform command.voidsetServerDecided(Boolean serverDecided) Sets whether to have server decided expiration date.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
ELM_LOCALNAME
XML local name forEPPRegistryDomainPeriod.- See Also:
-
ELM_NAME
XML root tag forEPPRegistryDomainPeriod.- 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 aCommand, Integer aMin, EPPRegistryPeriodType.Unit aMinUnit, Integer aMax, EPPRegistryPeriodType.Unit aMaxUnit, Integer aDefaultLength, EPPRegistryPeriodType.Unit aDefaultLengthUnit) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.serverDecidedis set toBoolean.FALSE:- Parameters:
aCommand- command typeaMin- minimum length numberaMinUnit- minimum length unitaMax- maximum length numberaMaxUnit- maximum length unitaDefaultLength- default length numberaDefaultLengthUnit- length unit
-
EPPRegistryDomainPeriod
public EPPRegistryDomainPeriod(String aCommand, int aMin, EPPRegistryPeriodType.Unit aMinUnit, int aMax, EPPRegistryPeriodType.Unit aMaxUnit, int aDefaultLength, EPPRegistryPeriodType.Unit aDefaultLengthUnit) Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.serverDecidedis set toBoolean.FALSE:- Parameters:
aCommand- command typeaMin- minimum length numberaMinUnit- minimum length unitaMax- maximum length numberaMaxUnit- maximum length unitaDefaultLength- default length numberaDefaultLengthUnit- length unit
-
EPPRegistryDomainPeriod
Construct an instance ofEPPRegistryDomainPeriodwith the following inputs.lengthis set tonull:- Parameters:
aCommand- command typeaServerDecided- 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
Gets the length for an EPP domain transform command.- Returns:
- instance of
EPPRegistryMinMaxPeriodthat defines min/max/default period for a given command
-
setLength
Sets the length for an EPP domain transform command.- Parameters:
length- instance ofEPPRegistryMinMaxPeriodthat defines min/max/default period for a given command
-
getServerDecided
Gets 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
Sets 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
Gets the command type.- Returns:
- command type in
String. Valid values are "create", "renew" and "transfer".
-
setCommand
Sets 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.
-