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 algorithmString
to an existingList
.
- See Also:
EPPRegistryDNSSEC
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALGORITHM
XML Element Name ofalgorithms
attribute.static java.lang.String
ELM_MAX
XML Element Name ofmax
attribute.static java.lang.String
ELM_MIN
XML Element Name ofmin
attribute.static java.lang.String
ELM_NAME
XML Element Name ofEPPRegistryKey
root element.
-
Constructor Summary
Constructors Constructor Description EPPRegistryKey()
Default constructor.EPPRegistryKey(int min, int max, java.util.List algorithms)
Constructs an instance withmin
,max
andList
ofalgorithms
.EPPRegistryKey(java.lang.Integer min, java.lang.Integer max, java.util.List algorithms)
Constructs an instance withmin
,max
andList
ofalgorithms
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAlgorithm(java.lang.String altorithm)
Add one algorithm to existing supported algorithms.java.lang.Object
clone()
CloneEPPRegistryKey
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryKey
attributes from the aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPRegistryKey
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryKey
compare.java.util.List
getAlgorithms()
Get the supported algorithms.java.lang.Integer
getMax()
Get the maximum number of keys.java.lang.Integer
getMin()
Get the minimum number of keys.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getRootName()
Get the root element tag name.void
setAlgorithms(java.util.List algorithms)
Set the supported algorithms.void
setMax(java.lang.Integer max)
Set the maximum number of keys.void
setMin(java.lang.Integer min)
Set the minimum number of keys.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML Element Name ofEPPRegistryKey
root element.- See Also:
- Constant Field Values
-
ELM_MIN
public static final java.lang.String ELM_MIN
XML Element Name ofmin
attribute.- See Also:
- Constant Field Values
-
ELM_MAX
public static final java.lang.String ELM_MAX
XML Element Name ofmax
attribute.- See Also:
- Constant Field Values
-
ALGORITHM
public static final java.lang.String ALGORITHM
XML Element Name ofalgorithms
attribute.- 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
,max
andList
ofalgorithms
.- 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
,max
andList
ofalgorithms
.- 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 EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPRegistryKey
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryKey
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryKey
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryKey
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryKey
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryKey
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in 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 deepEPPRegistryKey
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRegistryKey
instance to compare with- Returns:
true
if this object is the same as the aObject argument;false
otherwise
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
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:
List
of 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
-List
of 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:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-