Package com.verisign.epp.codec.registry
Class EPPRegistryDomainName
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryDomainName
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPRegistryDomainName extends java.lang.Object implements EPPCodecComponent
This class is encoded to the <registry:domainName> element inside the <registry:domain> element. It represents policies for a domain name label for a specific level, defined with the "level" attribute, with a minimum value of "2" for the second level domain name label level. The <registry:domainName> element contains the following child elements
- <registry:minLength> - An OPTIONAL minimum length of the domain
name label. Use
getMinLength()andsetMinLength(Integer)to get and set the element. - <registry:maxLength> - An OPTIONAL maximum length of the domain
name label. Use
getMaxLength()andsetMaxLength(Integer)to get and set the element. - <registry:alphaNumStart> - An OPTIONAL flag indicating whether the
label must start with an alphanumeric character with a default of "false".
Use
getAlphaNumStart()andsetAlphaNumStart(Boolean)to get and set the element. - <registry:alphaNumEnd> - An OPTIONAL flag indicating whether the
label must end with an alphanumeric character with a default value of
"false". Use
getAlphaNumEnd()andsetAlphaNumEnd(Boolean)to get and set the element. - <registry:onlyDnsChars> - An OPTIONAL flag indicating whether the
label MUST only contain valid DNS characters (alphanumeric and '-') with a
default value of "true". Use
getOnlyDnsChars()andsetOnlyDnsChars(Boolean)to get and set the element. - <registry:regex> - Zero or more <registry:regex> elements
that contain a <registry:expression> child element that defines the
regular expression to apply to domain name label along with an OPTIONAL
<registry:explanation> child element that describes the regular
expression with an OPTIONAL "lang" attribute that defines the language of the
explanation with a default value of "en". Use
getRegex()andsetRegex(List)to get and set the element. - <registry:reservedNames> - An OPTIONAL element that defines the set
of reserved domain names starting from that label level. The reserved names
can refer to values with more than one level which is relative to the level
of the parent <registry:domainName> element. Use
getReservedNames()andsetReservedNames(EPPRegistryReservedNames)to get and set the element.
- See Also:
EPPRegistryDomain,EPPRegistryReservedNames, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EPPRegistryDomainName()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRegex(EPPRegistryRegex re)Append one instance ofEPPRegistryRegexto the existingList.java.lang.Objectclone()CloneEPPRegistryDomainName.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryDomainNameattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryDomainNameinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryDomainNamecompare.java.lang.BooleangetAlphaNumEnd()Get whether or not to allow domain name end with an alphanumeric character.java.lang.BooleangetAlphaNumStart()Get whether or not to allow domain name start with an alphanumeric character.java.lang.IntegergetLevel()Get the level of domain name.java.lang.IntegergetMaxLength()Get maximum number of characters in a domain name.java.lang.IntegergetMinLength()Get minimum number of characters in a domain name.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.BooleangetOnlyDnsChars()Get whether to limit only DNS characters in the domain name.java.util.ListgetRegex()Get theListofEPPRegistryRegexregular expressions that domain name must follow.EPPRegistryReservedNamesgetReservedNames()Get the instance ofEPPRegistryReservedNamesthat defines a set of reserved domain names.voidsetAlphaNumEnd(java.lang.Boolean alphaNumEnd)Set whether or not to allow domain name end with an alphanumeric character.voidsetAlphaNumStart(java.lang.Boolean alphaNumStart)Set whether or not to allow domain name start with an alphanumeric character.voidsetLevel(java.lang.Integer level)Set the level of domain name.voidsetMaxLength(java.lang.Integer maxLength)Set maximum number of characters in a domain name.voidsetMinLength(java.lang.Integer minLength)Set minimum number of characters in a domain name.voidsetOnlyDnsChars(java.lang.Boolean onlyDnsChars)Set whether to limit only DNS characters in the domain name.voidsetRegex(java.util.List regex)Set theListofEPPRegistryRegexregular expressions that domain name must follow.voidsetReservedNames(EPPRegistryReservedNames reservedNames)Set the instance ofEPPRegistryReservedNamesthat defines a set of reserved domain names.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Method Detail
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPRegistryDomainNameinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryDomainNameinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryDomainNameinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPRegistryDomainNameattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPRegistryDomainNamefrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryDomainNamecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPRegistryDomainNameinstance to compare with- Returns:
trueif this object is the same as the aObject argument;falseotherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryDomainName.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPRegistryDomainName - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getLevel
public java.lang.Integer getLevel()
Get the level of domain name.- Returns:
- level of domain name. Must be >= 2
-
setLevel
public void setLevel(java.lang.Integer level)
Set the level of domain name.- Parameters:
level- level of domain name. Must be >= 2
-
getMinLength
public java.lang.Integer getMinLength()
Get minimum number of characters in a domain name.- Returns:
- minimum number of characters in a domain name
-
setMinLength
public void setMinLength(java.lang.Integer minLength)
Set minimum number of characters in a domain name.- Parameters:
minLength- minimum number of characters in a domain name
-
getMaxLength
public java.lang.Integer getMaxLength()
Get maximum number of characters in a domain name.- Returns:
- maximum number of characters in a domain name
-
setMaxLength
public void setMaxLength(java.lang.Integer maxLength)
Set maximum number of characters in a domain name.- Parameters:
maxLength- maximum number of characters in a domain name
-
getAlphaNumStart
public java.lang.Boolean getAlphaNumStart()
Get whether or not to allow domain name start with an alphanumeric character.- Returns:
trueallow domain name start with an alphanumeric character.falsedo not allow domain name start with an alphanumeric character
-
setAlphaNumStart
public void setAlphaNumStart(java.lang.Boolean alphaNumStart)
Set whether or not to allow domain name start with an alphanumeric character.- Parameters:
alphaNumStart-trueallow domain name start with an alphanumeric character.falsedo not allow domain name start with an alphanumeric character
-
getAlphaNumEnd
public java.lang.Boolean getAlphaNumEnd()
Get whether or not to allow domain name end with an alphanumeric character.- Returns:
trueallow domain name end with an alphanumeric character.falsedo not allow domain name end with an alphanumeric character
-
setAlphaNumEnd
public void setAlphaNumEnd(java.lang.Boolean alphaNumEnd)
Set whether or not to allow domain name end with an alphanumeric character.- Parameters:
alphaNumEnd-trueallow domain name end with an alphanumeric character.falsedo not allow domain name end with an alphanumeric character
-
getOnlyDnsChars
public java.lang.Boolean getOnlyDnsChars()
Get whether to limit only DNS characters in the domain name.- Returns:
trueallow only DNS characters (alphanumeric and '-') in the domain name.falseallow non-DNS characters in the domain name
-
setOnlyDnsChars
public void setOnlyDnsChars(java.lang.Boolean onlyDnsChars)
Set whether to limit only DNS characters in the domain name.- Parameters:
onlyDnsChars-trueallow only DNS characters (alphanumeric and '-') in the domain name.falseallow non-DNS characters in the domain name
-
getRegex
public java.util.List getRegex()
Get theListofEPPRegistryRegexregular expressions that domain name must follow.- Returns:
ListofEPPRegistryRegexregular expressions
-
addRegex
public void addRegex(EPPRegistryRegex re)
Append one instance ofEPPRegistryRegexto the existingList.- Parameters:
re- instance ofEPPRegistryRegex
-
setRegex
public void setRegex(java.util.List regex)
Set theListofEPPRegistryRegexregular expressions that domain name must follow.- Parameters:
regex-ListofEPPRegistryRegexregular expressions
-
getReservedNames
public EPPRegistryReservedNames getReservedNames()
Get the instance ofEPPRegistryReservedNamesthat defines a set of reserved domain names.- Returns:
- instance of
EPPRegistryReservedNames
-
setReservedNames
public void setReservedNames(EPPRegistryReservedNames reservedNames)
Set the instance ofEPPRegistryReservedNamesthat defines a set of reserved domain names.- Parameters:
reservedNames- instance ofEPPRegistryReservedNames
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-