Class EPPSecDNSExtKeyData
- java.lang.Object
-
- com.verisign.epp.codec.secdnsext.v10.EPPSecDNSExtKeyData
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPSecDNSExtKeyData extends java.lang.Object implements EPPCodecComponent
The EPPSecDNSExtKeyData is the EPPCodecComponent that knows how to encode and decode secDNS keyData elements from/to XML and object instance.Title: EPP 1.0 secDNS
Description: secDNS Extension to the EPP SDK
Copyright: Copyright (c) 2006
Company: VeriSign
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PROTOCOL
The default protocol vale.static int
FLAGS_ZONE_KEY
Bit 7 of the Flags field is the Zone Key flag.static int
FLAGS_ZONE_KEY_SEP
Bit 15 of the Flags field is the Secure Entry Point flag.static int
MAX_ALG
Maximum alg valuestatic int
MAX_FLAGS
Maximum flags valuestatic int
MAX_PROTOCOL
Maximum protocol valuestatic int
MIN_ALG
Minimum alg valuestatic int
MIN_FLAGS
Minimum flags valuestatic int
MIN_PROTOCOL
Minimum protocol valuestatic int
UNSPEC_ALG
Unspecified alg valuestatic int
UNSPEC_FLAGS
Unspecified flags valuestatic int
UNSPEC_PROTOCOL
Unspecified protocol value
-
Constructor Summary
Constructors Constructor Description EPPSecDNSExtKeyData()
Create a new instance of EPPSecDNSExtKeyDataEPPSecDNSExtKeyData(int flags, int protocol, int alg, java.lang.String pubKey)
Create a new instance of EPPSecDNSExtKeyData with the given values.EPPSecDNSExtKeyData(EPPSecDNSExtKeyData keyData)
Create a new instance (copy) of EPPSecDNSExtKeyData
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPSecDNSExtKeyData
.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:keyData to the given DOM Documentboolean
equals(java.lang.Object aObject)
implements a deepEPPSecDNSExtKeyData
compare.int
getAlg()
Get secDNS:alg valueint
getFlags()
Get secDNS:flags valuejava.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.int
getProtocol()
Get secDNS:protocol valuejava.lang.String
getPubKey()
Get secDNS:pubKey valuevoid
setAlg(int alg)
Set secDNS:alg valuevoid
setFlags(int flags)
Set secDNS:flags valuevoid
setProtocol(int protocol)
Set secDNS:protocol valuevoid
setPubKey(java.lang.String pubKey)
Set secDNS:pubKey value This method will remove all whitespace in an effort to produce the canonical representation for base64Binary as defined by http://www.w3.org/TR/xmlschema-2/#base64Binaryjava.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
DEFAULT_PROTOCOL
public static final int DEFAULT_PROTOCOL
The default protocol vale. http://www.ietf.org/rfc/rfc4034.txt 2.1.2. The Protocol Field The Protocol Field MUST have value 3, and the DNSKEY RR MUST be treated as invalid during signature verification if it is found to be some value other than 3.- See Also:
- Constant Field Values
-
FLAGS_ZONE_KEY
public static final int FLAGS_ZONE_KEY
Bit 7 of the Flags field is the Zone Key flag. If bit 7 has value 1, then the DNSKEY record holds a DNS zone key.- See Also:
- Constant Field Values
-
FLAGS_ZONE_KEY_SEP
public static final int FLAGS_ZONE_KEY_SEP
Bit 15 of the Flags field is the Secure Entry Point flag. If bit 15 has value 1, then the DNSKEY record holds a key intended for use as a secure entry point (SEP).- See Also:
- Constant Field Values
-
UNSPEC_FLAGS
public static final int UNSPEC_FLAGS
Unspecified flags value- See Also:
- Constant Field Values
-
MIN_FLAGS
public static final int MIN_FLAGS
Minimum flags value- See Also:
- Constant Field Values
-
MAX_FLAGS
public static final int MAX_FLAGS
Maximum flags value- See Also:
- Constant Field Values
-
UNSPEC_PROTOCOL
public static final int UNSPEC_PROTOCOL
Unspecified protocol value- See Also:
- Constant Field Values
-
MIN_PROTOCOL
public static final int MIN_PROTOCOL
Minimum protocol value- See Also:
- Constant Field Values
-
MAX_PROTOCOL
public static final int MAX_PROTOCOL
Maximum protocol 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
-
-
Constructor Detail
-
EPPSecDNSExtKeyData
public EPPSecDNSExtKeyData()
Create a new instance of EPPSecDNSExtKeyData
-
EPPSecDNSExtKeyData
public EPPSecDNSExtKeyData(EPPSecDNSExtKeyData keyData)
Create a new instance (copy) of EPPSecDNSExtKeyData- Parameters:
keyData
-EPPSecDNSExtKeyData
instance
-
EPPSecDNSExtKeyData
public EPPSecDNSExtKeyData(int flags, int protocol, int alg, java.lang.String pubKey)
Create a new instance of EPPSecDNSExtKeyData with the given values.- Parameters:
flags
- the flags value to use for this instance.protocol
- the protocol value to use for this instance.alg
- the algorithm value to use for this instance.pubKey
- the public key value 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:keyData 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 deepEPPSecDNSExtKeyData
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPSecDNSExtKeyData
instance to compare with- Returns:
- true if equal false otherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPSecDNSExtKeyData
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPSecDNSExtKeyData
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
getFlags
public int getFlags()
Get secDNS:flags value- Returns:
- an
int
value representing secDNS:flags - See Also:
UNSPEC_FLAGS
-
setFlags
public void setFlags(int flags)
Set secDNS:flags value- Parameters:
flags
- anint
value representing secDNS:flags- See Also:
FLAGS_ZONE_KEY_SEP
,FLAGS_ZONE_KEY
-
getProtocol
public int getProtocol()
Get secDNS:protocol value- Returns:
- an
int
value representing secDNS:protocol - See Also:
DEFAULT_PROTOCOL
,UNSPEC_PROTOCOL
-
setProtocol
public void setProtocol(int protocol)
Set secDNS:protocol value- Parameters:
protocol
- anint
value representing secDNS:protocol
-
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
-
getPubKey
public java.lang.String getPubKey()
Get secDNS:pubKey value- Returns:
- the canonical representation of the base64Binary secDNS:pubKey
- See Also:
EPPSecDNSExtKeyData.setPubKey(String pubKey)
-
setPubKey
public void setPubKey(java.lang.String pubKey)
Set secDNS:pubKey value This method will remove all whitespace in an effort to produce the canonical representation for base64Binary as defined by http://www.w3.org/TR/xmlschema-2/#base64Binary- Parameters:
pubKey
- anString
value representing the base64Binary secDNS:pubKey- See Also:
EPPUtil.removeWhitespace(String inString)
-
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
.
-
-