Class EPPRegistryKey
- java.lang.Object
-
- com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
-
- com.verisign.epp.codec.registry.v02.EPPRegistryKey
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryKey extends EPPRegistryAbstractMinMax
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
EPPRegistryAbstractMinMax.getMin()
andEPPRegistryAbstractMinMax.setMin(Integer)
to get and set the element. - <registry:max> - the maximum number of keys associated with the
domain object. Use
EPPRegistryAbstractMinMax.getMax()
andEPPRegistryAbstractMinMax.setMax(Integer)
to get and set the element. - <registry:flags> - Zero or more <registry:flags> elements
that define the supported flags field values, as described in section 2.1.1
of RFC 4034. Use
getFlags()
andsetFlags(List)
to get and set the element. UseaddFlags(Integer)
to add an flags fieldInteger
to an existingList
. - <registry:protocol> - Zero or more <registry:protocol>
elements that define the supported protocols as described in section 2.1.2 of
RFC 4034. Use
getProtocols()
andsetProtocols(List)
to get and set the element. UseaddProtocol(Integer)
to add an algorithmInteger
to an existingList
. - <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(Integer)
to add an algorithmInteger
to an existingList
.
- See Also:
EPPRegistryDNSSEC
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_ALGORITHM
XML Element Name ofalgorithms
attribute.static java.lang.String
ELM_FLAGS
XML Element Name offlags
attribute.static java.lang.String
ELM_LOCALNAME
XML local name forEPPRegistryKey
.static java.lang.String
ELM_NAME
XML root tag forEPPRegistryKey
.static java.lang.String
ELM_PROTOCOL
XML Element Name ofprotocol
attribute.-
Fields inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
ELM_MAX, ELM_MAX_LENGTH, ELM_MIN, ELM_MIN_LENGTH
-
-
Constructor Summary
Constructors Constructor Description EPPRegistryKey()
Default constructor.EPPRegistryKey(int aMin, int aMax, java.util.List<java.lang.Integer> aFlags, java.util.List<java.lang.Integer> aProtocols, java.util.List<java.lang.Integer> aAlgorithms)
Constructs an instance withmin
,max
andList
ofalgorithms
.EPPRegistryKey(java.lang.Integer aMin, java.lang.Integer aMax)
Constructs an instance withmin
andmax
.EPPRegistryKey(java.lang.Integer aMin, java.lang.Integer aMax, java.util.List<java.lang.Integer> aFlags, java.util.List<java.lang.Integer> aProtocols, java.util.List<java.lang.Integer> aAlgorithms)
Constructs an instance withmin
,max
andList
ofalgorithms
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAlgorithm(java.lang.Integer aAlgorithm)
Adds one algorithm to existing supported algorithms.void
addFlags(java.lang.Integer aFlags)
Adds one flags field to existing supported flags.void
addProtocol(java.lang.Integer aProtocol)
Adds one protocol to existing the supported protocols.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<java.lang.Integer>
getAlgorithms()
Gets the supported algorithms.protected java.lang.String
getElmMax()
Gets the maximum element local name.protected java.lang.String
getElmMin()
Gets the minimum element local name.java.util.List<java.lang.Integer>
getFlags()
Gets the supported flags.protected org.slf4j.Logger
getLogger()
Gets theLogger
to use.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.util.List<java.lang.Integer>
getProtocols()
Gets the supported protocols.protected java.lang.String
getRootName()
Gets the root element local name.boolean
hasAlgorithms()
Is the algorithms defined?boolean
hasFlags()
Is the flags defined?boolean
hasProtocols()
Is the protocols defined?void
setAlgorithms(java.util.List<java.lang.Integer> aAlgorithms)
Sets the supported algorithms.void
setFlags(java.util.List<java.lang.Integer> aFlags)
Sets the supported flags.void
setProtocols(java.util.List<java.lang.Integer> aProtocol)
Sets the supported protocols.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.-
Methods inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
getMax, getMin, setMax, setMin, validateState
-
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPRegistryKey
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPRegistryKey
.- See Also:
- Constant Field Values
-
ELM_FLAGS
public static final java.lang.String ELM_FLAGS
XML Element Name offlags
attribute.- See Also:
- Constant Field Values
-
ELM_PROTOCOL
public static final java.lang.String ELM_PROTOCOL
XML Element Name ofprotocol
attribute.- See Also:
- Constant Field Values
-
ELM_ALGORITHM
public static final java.lang.String ELM_ALGORITHM
XML Element Name ofalgorithms
attribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryKey
public EPPRegistryKey()
Default constructor. Must callEPPRegistryAbstractMinMax.setMin(Integer)
andEPPRegistryAbstractMinMax.setMax(Integer)
before callingencode(Document)
method.
-
EPPRegistryKey
public EPPRegistryKey(java.lang.Integer aMin, java.lang.Integer aMax)
Constructs an instance withmin
andmax
.- Parameters:
aMin
- minimum number of keys associated with the domain objectaMax
- maximum number of keys associated with the domain object
-
EPPRegistryKey
public EPPRegistryKey(java.lang.Integer aMin, java.lang.Integer aMax, java.util.List<java.lang.Integer> aFlags, java.util.List<java.lang.Integer> aProtocols, java.util.List<java.lang.Integer> aAlgorithms)
Constructs an instance withmin
,max
andList
ofalgorithms
.- Parameters:
aMin
- minimum number of keys associated with the domain objectaMax
- maximum number of keys associated with the domain objectaFlags
- supported flags as described in section 2.1.1 of RFC 4034aProtocols
- supported protocols as described in section 2.1.2 of RFC 4034aAlgorithms
- supported algorithms as described in section 2.1.3 of RFC 4034
-
EPPRegistryKey
public EPPRegistryKey(int aMin, int aMax, java.util.List<java.lang.Integer> aFlags, java.util.List<java.lang.Integer> aProtocols, java.util.List<java.lang.Integer> aAlgorithms)
Constructs an instance withmin
,max
andList
ofalgorithms
.- Parameters:
aMin
- minimum number of keys associated with the domain objectaMax
- maximum number of keys associated with the domain objectaFlags
- supported flags as described in section 2.1.1 of RFC 4034aProtocols
- supported protocols as described in section 2.1.2 of RFC 4034aAlgorithms
- 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
- Overrides:
encode
in classEPPRegistryAbstractMinMax
- 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
- Overrides:
decode
in classEPPRegistryAbstractMinMax
- 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 classEPPRegistryAbstractMinMax
- 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 classEPPRegistryAbstractMinMax
- 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 classEPPRegistryAbstractMinMax
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
hasFlags
public boolean hasFlags()
Is the flags defined?- Returns:
true
if the flags is defined;false
otherwise.
-
getFlags
public java.util.List<java.lang.Integer> getFlags()
Gets the supported flags.- Returns:
List
of supported flags as described in section 2.1.1 of RFC 4034
-
setFlags
public void setFlags(java.util.List<java.lang.Integer> aFlags)
Sets the supported flags.- Parameters:
aFlags
-List
of supported flags as described in section 2.1.1 of RFC 4034
-
addFlags
public void addFlags(java.lang.Integer aFlags)
Adds one flags field to existing supported flags.- Parameters:
aFlags
- supported flags field as described in section 2.1.1 of RFC 4034
-
hasProtocols
public boolean hasProtocols()
Is the protocols defined?- Returns:
true
if the protocols is defined;false
otherwise.
-
getProtocols
public java.util.List<java.lang.Integer> getProtocols()
Gets the supported protocols.- Returns:
List
of supported protocols as described in section 2.1.2 of RFC 4034
-
setProtocols
public void setProtocols(java.util.List<java.lang.Integer> aProtocol)
Sets the supported protocols.- Parameters:
aProtocol
-List
of supported protocols as described in section 2.1.2 of RFC 4034
-
addProtocol
public void addProtocol(java.lang.Integer aProtocol)
Adds one protocol to existing the supported protocols.- Parameters:
aProtocol
- supported protocol as described in section 2.1.2 of RFC 4034
-
hasAlgorithms
public boolean hasAlgorithms()
Is the algorithms defined?- Returns:
true
if the algorithms is defined;false
otherwise.
-
getAlgorithms
public java.util.List<java.lang.Integer> getAlgorithms()
Gets the supported algorithms.- Returns:
List
of supported algorithms as described in section 2.1.3 of RFC 4034
-
setAlgorithms
public void setAlgorithms(java.util.List<java.lang.Integer> aAlgorithms)
Sets the supported algorithms.- Parameters:
aAlgorithms
-List
of supported algorithms as described in section 2.1.3 of RFC 4034
-
addAlgorithm
public void addAlgorithm(java.lang.Integer aAlgorithm)
Adds one algorithm to existing supported algorithms.- Parameters:
aAlgorithm
- supported algorithm as described in section 2.1.3 of RFC 4034
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Overrides:
getNamespace
in classEPPRegistryAbstractMinMax
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
getRootName
protected java.lang.String getRootName()
Gets the root element local name.- Specified by:
getRootName
in classEPPRegistryAbstractMinMax
- Returns:
- Root element local name.
-
getElmMin
protected java.lang.String getElmMin()
Gets the minimum element local name.- Specified by:
getElmMin
in classEPPRegistryAbstractMinMax
- Returns:
- Minimum element local name.
-
getElmMax
protected java.lang.String getElmMax()
Gets the maximum element local name.- Specified by:
getElmMax
in classEPPRegistryAbstractMinMax
- Returns:
- Maximum element local name.
-
getLogger
protected org.slf4j.Logger getLogger()
Gets theLogger
to use.- Specified by:
getLogger
in classEPPRegistryAbstractMinMax
- Returns:
Logger
instance to use for logging.
-
-