Class EPPSecDNSExtDsData
- java.lang.Object
-
- com.verisign.epp.codec.secdnsext.v11.EPPSecDNSExtDsData
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPSecDNSExtDsData extends java.lang.Object implements EPPCodecComponent
The EPPSecDNSExtDsData is the EPPCodecComponent that knows how to encode and decode secDNS dsData elements from/to XML and object instance.Title: EPP 1.0 secDNS
Description: secDNS Extension to the EPP SDK
Copyright: Copyright (c) 2010
Company: VeriSign
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
GOST3411_DIGEST_TYPE
GOST R 34.11-94static int
MAX_ALG
Maximum alg valuestatic int
MAX_DIGEST_TYPE
Maximum digestType valuestatic int
MAX_KEY_TAG
Maximum keyTag valuestatic int
MIN_ALG
Minimum alg valuestatic int
MIN_DIGEST_TYPE
Minimum digestType valuestatic int
MIN_KEY_TAG
Minimum keyTag valuestatic int
SHA1_DIGEST_TYPE
http://www.ietf.org/rfc/rfc4034.txt
A.2.static int
SHA256_DIGEST_TYPE
SHA-256 Digest Typestatic int
SHA384_DIGEST_TYPE
SHA-384 Digest Typestatic int
UNSPEC_ALG
Unspecified alg valuestatic int
UNSPEC_DIGEST_TYPE
Unspecified digestType valuestatic int
UNSPEC_KEY_TAG
Unspecified keyTag value
-
Constructor Summary
Constructors Constructor Description EPPSecDNSExtDsData()
Create a new empty instance of EPPSecDNSExtDsDataEPPSecDNSExtDsData(int keyTag)
Create a new instance of EPPSecDNSExtDsData with the given values.EPPSecDNSExtDsData(int keyTag, int alg, int digestType, java.lang.String digest)
Create a new instance of EPPSecDNSExtDsData with the given values.EPPSecDNSExtDsData(int keyTag, int alg, int digestType, java.lang.String digest, EPPSecDNSExtKeyData keyData)
Create a new instance of EPPSecDNSExtDsData with the given values.EPPSecDNSExtDsData(EPPSecDNSExtDsData dsData)
Create a new instance (copy) of EPPSecDNSExtDsDataEPPSecDNSExtDsData(java.lang.Integer keyTag)
Create a new instance of EPPSecDNSExtDsData with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPSecDNSExtDsData
.void
decode(org.w3c.dom.Element aElement)
Populate the data of this instance with the data stored in the given Element of the DOM treeorg.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Append all data from this secDNS:dsData to the given DOM Documentboolean
equals(java.lang.Object aObject)
implements a deepEPPSecDNSExtDsData
compare.int
getAlg()
Get secDNS:alg valuejava.lang.String
getDigest()
Get secDNS:digest valueint
getDigestType()
Get secDNS:digestType valueEPPSecDNSExtKeyData
getKeyData()
Get secDNS:keyData valueint
getKeyTag()
Get secDNS:keyTag valuejava.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.boolean
hasKeyData()
Does secDNS:dsData include optional secDNS:keyData?void
setAlg(int alg)
Set secDNS:alg valuevoid
setDigest(java.lang.String digest)
Set secDNS:digest value This method will remove all whitespace and force UPPER case in an effort to produce the canonical representation for hexBinary as defined by http://www.w3.org/TR/xmlschema-2/#hexBinaryvoid
setDigestType(int digestType)
Set secDNS:digestType valuevoid
setKeyData(EPPSecDNSExtKeyData keyData)
Set secDNS:keyData valuevoid
setKeyTag(int keyTag)
Set secDNS:keyTag valuevoid
setKeyTag(java.lang.Integer keyTag)
Set secDNS:keyTag valuejava.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
UNSPEC_KEY_TAG
public static final int UNSPEC_KEY_TAG
Unspecified keyTag value- See Also:
- Constant Field Values
-
MIN_KEY_TAG
public static final int MIN_KEY_TAG
Minimum keyTag value- See Also:
- Constant Field Values
-
MAX_KEY_TAG
public static final int MAX_KEY_TAG
Maximum keyTag value- See Also:
- Constant Field Values
-
UNSPEC_ALG
public static final int UNSPEC_ALG
Unspecified alg value- See Also:
- Constant Field Values
-
MIN_ALG
public static final int MIN_ALG
Minimum alg value- See Also:
- Constant Field Values
-
MAX_ALG
public static final int MAX_ALG
Maximum alg value- See Also:
- Constant Field Values
-
UNSPEC_DIGEST_TYPE
public static final int UNSPEC_DIGEST_TYPE
Unspecified digestType value- See Also:
- Constant Field Values
-
MIN_DIGEST_TYPE
public static final int MIN_DIGEST_TYPE
Minimum digestType value- See Also:
- Constant Field Values
-
MAX_DIGEST_TYPE
public static final int MAX_DIGEST_TYPE
Maximum digestType value- See Also:
- Constant Field Values
-
SHA1_DIGEST_TYPE
public static final int SHA1_DIGEST_TYPE
http://www.ietf.org/rfc/rfc4034.txt
A.2. DNSSEC Digest Types
A "Digest Type" field in the DS resource record types identifies the cryptographic digest algorithm used by the resource record. The following table lists the currently defined digest algorithm types.
DNSSEC Digest Types VALUE Algorithm STATUS 0 Reserved - 1 SHA-1 MANDATORY 2 SHA-256 - 3 SHA-512 - 2-255 Unassigned - - See Also:
- Constant Field Values
-
SHA256_DIGEST_TYPE
public static final int SHA256_DIGEST_TYPE
SHA-256 Digest Type- See Also:
- Constant Field Values
-
GOST3411_DIGEST_TYPE
public static final int GOST3411_DIGEST_TYPE
GOST R 34.11-94- See Also:
- Constant Field Values
-
SHA384_DIGEST_TYPE
public static final int SHA384_DIGEST_TYPE
SHA-384 Digest Type- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPSecDNSExtDsData
public EPPSecDNSExtDsData()
Create a new empty instance of EPPSecDNSExtDsData
-
EPPSecDNSExtDsData
public EPPSecDNSExtDsData(EPPSecDNSExtDsData dsData)
Create a new instance (copy) of EPPSecDNSExtDsData- Parameters:
dsData
-EPPSecDNSExtDsData
instance
-
EPPSecDNSExtDsData
public EPPSecDNSExtDsData(int keyTag, int alg, int digestType, java.lang.String digest, EPPSecDNSExtKeyData keyData)
Create a new instance of EPPSecDNSExtDsData with the given values. This constructor includes all secDNS:dsData elements.- Parameters:
keyTag
- the keyTag value to use for this instance.alg
- the algorithm value to use for this instance.digestType
- the digestType value to use for this instance.digest
- the digest value to use for this instance.keyData
- the keyData value to use for this instance.
-
EPPSecDNSExtDsData
public EPPSecDNSExtDsData(int keyTag, int alg, int digestType, java.lang.String digest)
Create a new instance of EPPSecDNSExtDsData with the given values. This constructor includes only the required secDNS:dsData elements.- Parameters:
keyTag
- the keyTag value to use for this instance.alg
- the algorithm value to use for this instance.digestType
- the digestType value to use for this instance.digest
- the digest value to use for this instance.
-
EPPSecDNSExtDsData
public EPPSecDNSExtDsData(int keyTag)
Create a new instance of EPPSecDNSExtDsData with the given values. This convenience constructor includes only the secDNS:keyTag element required for the secDNS:update/secDNS:rem extension.- Parameters:
keyTag
- anint
value representing the secDNS:keyTag to use for this instance.
-
EPPSecDNSExtDsData
public EPPSecDNSExtDsData(java.lang.Integer keyTag)
Create a new instance of EPPSecDNSExtDsData with the given values. This convenience constructor includes only the secDNS:keyTag element required for the secDNS:update/secDNS:rem extension.- Parameters:
keyTag
- anInteger
instance representing the secDNS:keyTag to use for this instance.
-
-
Method Detail
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Append all data from this secDNS:dsData to the given DOM Document- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- The DOM Document to append data to- Returns:
- Encoded DOM
Element
- Throws:
EPPEncodeException
- Thrown when errors occur during the encode attempt or if the instance is invalid.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Populate the data of this instance with the data stored in the given Element of the DOM tree- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- The root element of the fragment of XML- Throws:
EPPDecodeException
- Thrown if any errors occur during decoding.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPSecDNSExtDsData
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPSecDNSExtDsData
instance to compare with- Returns:
- true if equal false otherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPSecDNSExtDsData
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPSecDNSExtDsData
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
getKeyTag
public int getKeyTag()
Get secDNS:keyTag value- Returns:
- an
int
value representing secDNS:keyTag - See Also:
UNSPEC_KEY_TAG
-
setKeyTag
public void setKeyTag(int keyTag)
Set secDNS:keyTag value- Parameters:
keyTag
- anint
value representing secDNS:keyTag
-
setKeyTag
public void setKeyTag(java.lang.Integer keyTag)
Set secDNS:keyTag value- Parameters:
keyTag
- anInteger
instance representing secDNS:keyTag
-
getAlg
public int getAlg()
Get secDNS:alg value- Returns:
- an
int
value representing secDNS:alg - See Also:
UNSPEC_ALG
-
setAlg
public void setAlg(int alg)
Set secDNS:alg value- Parameters:
alg
- anint
value representing secDNS:alg
-
getDigestType
public int getDigestType()
Get secDNS:digestType value- Returns:
- an
int
value representing secDNS:digestType - See Also:
UNSPEC_DIGEST_TYPE
-
setDigestType
public void setDigestType(int digestType)
Set secDNS:digestType value- Parameters:
digestType
- anint
value representing secDNS:digestType
-
getDigest
public java.lang.String getDigest()
Get secDNS:digest value- Returns:
- the canonical representation of the hexBinary secDNS:digest
- See Also:
setDigest(String digest)
-
setDigest
public void setDigest(java.lang.String digest)
Set secDNS:digest value This method will remove all whitespace and force UPPER case in an effort to produce the canonical representation for hexBinary as defined by http://www.w3.org/TR/xmlschema-2/#hexBinary- Parameters:
digest
- anString
value representing the hexBinary secDNS:digest- See Also:
EPPUtil.removeWhitespace(String inString)
-
getKeyData
public EPPSecDNSExtKeyData getKeyData()
Get secDNS:keyData value- Returns:
- an
EPPSecDNSExtKeyData
representing secDNS:keyData
-
setKeyData
public void setKeyData(EPPSecDNSExtKeyData keyData)
Set secDNS:keyData value- Parameters:
keyData
- anEPPSecDNSExtKeyData
value representing secDNS:keyData
-
hasKeyData
public boolean hasKeyData()
Does secDNS:dsData include optional secDNS:keyData?- Returns:
- true if secDNS:keyData exists (non-null), otherwise false
-
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.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-