Package com.verisign.epp.codec.registry
Class EPPRegistryKey
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryKey
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
EPPRegistryDS
public class EPPRegistryKey extends java.lang.Object implements EPPCodecComponent
Defines the Key Data Interface, as defined in RFC 5910, policies. The <registry:keyDataInterface> element contains the following child elements:
- <registry:min> - the minimum number of keys associated with the
domain object. Use
getMin()andsetMin(Integer)to get and set the element. - <registry:max> - the maximum number of keys associated with the
domain object. Use
getMax()andsetMax(Integer)to get and set the element. - <registry:alg> - Zero or more <registry:alg> elements that
define the supported algorithms as described in section 2.1.3 of RFC 4034.
Use
getAlgorithms()andsetAlgorithms(List)to get and set the element. UseaddAlgorithm(String)to add an algorithmStringto an existingList.
- See Also:
EPPRegistryDNSSEC, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALGORITHMXML Element Name ofalgorithmsattribute.static java.lang.StringELM_MAXXML Element Name ofmaxattribute.static java.lang.StringELM_MINXML Element Name ofminattribute.static java.lang.StringELM_NAMEXML Element Name ofEPPRegistryKeyroot element.
-
Constructor Summary
Constructors Constructor Description EPPRegistryKey()Default constructor.EPPRegistryKey(int min, int max, java.util.List algorithms)Constructs an instance withmin,maxandListofalgorithms.EPPRegistryKey(java.lang.Integer min, java.lang.Integer max, java.util.List algorithms)Constructs an instance withmin,maxandListofalgorithms.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlgorithm(java.lang.String altorithm)Add one algorithm to existing supported algorithms.java.lang.Objectclone()CloneEPPRegistryKey.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryKeyattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryKeyinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryKeycompare.java.util.ListgetAlgorithms()Get the supported algorithms.java.lang.IntegergetMax()Get the maximum number of keys.java.lang.IntegergetMin()Get the minimum number of keys.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.StringgetRootName()Get the root element tag name.voidsetAlgorithms(java.util.List algorithms)Set the supported algorithms.voidsetMax(java.lang.Integer max)Set the maximum number of keys.voidsetMin(java.lang.Integer min)Set the minimum number of keys.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML Element Name ofEPPRegistryKeyroot element.- See Also:
- Constant Field Values
-
ELM_MIN
public static final java.lang.String ELM_MIN
XML Element Name ofminattribute.- See Also:
- Constant Field Values
-
ELM_MAX
public static final java.lang.String ELM_MAX
XML Element Name ofmaxattribute.- See Also:
- Constant Field Values
-
ALGORITHM
public static final java.lang.String ALGORITHM
XML Element Name ofalgorithmsattribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryKey
public EPPRegistryKey()
Default constructor. Must callsetMin(Integer)andsetMax(Integer)before callingencode(Document)method.
-
EPPRegistryKey
public EPPRegistryKey(java.lang.Integer min, java.lang.Integer max, java.util.List algorithms)Constructs an instance withmin,maxandListofalgorithms.- Parameters:
min- minimum number of keys associated with the domain objectmax- maximum number of keys associated with the domain objectalgorithms- supported algorithms as described in section 2.1.3 of RFC 4034
-
EPPRegistryKey
public EPPRegistryKey(int min, int max, java.util.List algorithms)Constructs an instance withmin,maxandListofalgorithms.- Parameters:
min- minimum number of keys associated with the domain objectmax- maximum number of keys associated with the domain objectalgorithms- supported algorithms as described in section 2.1.3 of RFC 4034
-
-
Method Detail
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPRegistryKeyinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryKeyinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryKeyinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPRegistryKeyattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPRegistryKeyfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryKey.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPRegistryKey - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryKeycompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPRegistryKeyinstance to compare with- Returns:
trueif this object is the same as the aObject argument;falseotherwise
-
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.
-
getMin
public java.lang.Integer getMin()
Get the minimum number of keys.- Returns:
- minimum number of keys associated with the domain object.
-
setMin
public void setMin(java.lang.Integer min)
Set the minimum number of keys.- Parameters:
min- minimum number of keys associated with the domain object.
-
getMax
public java.lang.Integer getMax()
Get the maximum number of keys.- Returns:
- maximum number of keys associated with the domain object.
-
setMax
public void setMax(java.lang.Integer max)
Set the maximum number of keys.- Parameters:
max- maximum number of keys associated with the domain object.
-
getAlgorithms
public java.util.List getAlgorithms()
Get the supported algorithms.- Returns:
Listof supported algorithms as dscsribed in section 2.1.3 of RFC 4034
-
setAlgorithms
public void setAlgorithms(java.util.List algorithms)
Set the supported algorithms.- Parameters:
algorithms-Listof supported algorithms as dscsribed in section 2.1.3 of RFC 4034
-
addAlgorithm
public void addAlgorithm(java.lang.String altorithm)
Add one algorithm to existing supported algorithms.- Parameters:
altorithm- supported algorithms as dscsribed in section 2.1.3 of RFC 4034
-
getRootName
public java.lang.String getRootName()
Get the root element tag name.- Returns:
ELM_NAME
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-