com.verisign.epp.codec.verificationcode
Class EPPEncodedSignedCodeValue

java.lang.Object
  extended by com.verisign.epp.codec.verificationcode.EPPSignedCode
      extended by com.verisign.epp.codec.verificationcode.EPPEncodedSignedCodeValue
All Implemented Interfaces:
EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

public class EPPEncodedSignedCodeValue
extends EPPSignedCode

Class for the encoded signed code, which contains the code and the XMLSignature itself. This class extends EPPSignedCode.

See Also:
Serialized Form

Field Summary
static java.lang.String ELM_LOCALNAME
          Constant for the code local name for encoded signedCode element
static java.lang.String ELM_NAME
          Constant for the code tag for signedCode element
 
Fields inherited from class com.verisign.epp.codec.verificationcode.EPPSignedCode
ELM_SIGNED_CODE, ELM_SIGNED_CODE_LOCALNAME
 
Constructor Summary
EPPEncodedSignedCodeValue()
          Create an EPPEncodedSignedCodeValue instance.
EPPEncodedSignedCodeValue(byte[] aEncodedSignedCodeArray)
          Creates an EPPEncodedSignedCodeValue that is initialized by decoding the input byte[].
EPPEncodedSignedCodeValue(EPPSignedCode aSignedCode)
          Construct Encoded SignedCode object from SignedCode object.
EPPEncodedSignedCodeValue(EPPVerificationCode aCode)
          Create an EPPEncodedSignedCodeValue with the code of the signed code.
EPPEncodedSignedCodeValue(java.io.InputStream aScode)
          Creates an EPPEncodedSignedCodeValue by decoding the a Signed Code Data (SMD) that is in a PEM-like input stream that includes the encoded signed code with a leading line "-----BEGIN ENCODED SCODE-----" and a trailing "-----END ENCODED SCODE-----".
EPPEncodedSignedCodeValue(java.lang.String aCode, java.lang.String aType)
          Create an EPPEncodedSignedCodeValue with the code and type of the signed code.
 
Method Summary
 java.lang.Object clone()
          Clone EPPEncodedSignedCodeValue.
 void decode(org.w3c.dom.Element aElement)
          Decode the EPPSignedCode component
 byte[] encode()
          Encode the signed code to a byte[].
 org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
          Sets all this instance's data in the given XML document
 java.lang.String encodeValue()
          Encodes the Base64 signed code value without the wrapping XML elements.
 
Methods inherited from class com.verisign.epp.codec.verificationcode.EPPSignedCode
decode, equals, getAttrIdValue, getCode, getCodeType, getCodeValue, getLocalName, getTrustAnchor, hasTrustAnchor, sign, sign, toString, validate, validate, validate
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ELM_LOCALNAME

public static final java.lang.String ELM_LOCALNAME
Constant for the code local name for encoded signedCode element

See Also:
Constant Field Values

ELM_NAME

public static final java.lang.String ELM_NAME
Constant for the code tag for signedCode element

See Also:
Constant Field Values
Constructor Detail

EPPEncodedSignedCodeValue

public EPPEncodedSignedCodeValue()
Create an EPPEncodedSignedCodeValue instance.


EPPEncodedSignedCodeValue

public EPPEncodedSignedCodeValue(EPPSignedCode aSignedCode)
                          throws EPPEncodeException,
                                 EPPDecodeException
Construct Encoded SignedCode object from SignedCode object.

Parameters:
aSignedCode - SignedCode object
Throws:
EPPEncodeException - Error encoding the SignedCode byte[].
EPPDecodeException - Error decoding the encoded SignedCode byte[].

EPPEncodedSignedCodeValue

public EPPEncodedSignedCodeValue(EPPVerificationCode aCode)
                          throws EPPEncodeException
Create an EPPEncodedSignedCodeValue with the code of the signed code.

Parameters:
aCode - Verification code
Throws:
EPPEncodeException - Thrown if any errors prevent encoding.

EPPEncodedSignedCodeValue

public EPPEncodedSignedCodeValue(java.lang.String aCode,
                                 java.lang.String aType)
                          throws EPPEncodeException
Create an EPPEncodedSignedCodeValue with the code and type of the signed code.

Parameters:
aCode - Verification code
aType - Verification code type.
Throws:
EPPEncodeException - Thrown if any errors prevent encoding.

EPPEncodedSignedCodeValue

public EPPEncodedSignedCodeValue(byte[] aEncodedSignedCodeArray)
                          throws EPPDecodeException
Creates an EPPEncodedSignedCodeValue that is initialized by decoding the input byte[].

Parameters:
aEncodedSignedCodeArray - byte[] to decode the attribute values
Throws:
EPPDecodeException - Error decoding the input byte[].

EPPEncodedSignedCodeValue

public EPPEncodedSignedCodeValue(java.io.InputStream aScode)
                          throws EPPDecodeException
Creates an EPPEncodedSignedCodeValue by decoding the a Signed Code Data (SMD) that is in a PEM-like input stream that includes the encoded signed code with a leading line "-----BEGIN ENCODED SCODE-----" and a trailing "-----END ENCODED SCODE-----".

Parameters:
aScode - InputStream containing a Signed Code (SCODE)
Throws:
EPPDecodeException - Error decoding the Signed Code (SCODE)
Method Detail

decode

public void decode(org.w3c.dom.Element aElement)
            throws EPPDecodeException
Decode the EPPSignedCode component

Specified by:
decode in interface EPPCodecComponent
Overrides:
decode in class EPPSignedCode
Parameters:
aElement - Root element of the EPPSignedCode
Throws:
EPPDecodeException - Error decoding the EPPSignedCode

encode

public byte[] encode()
              throws EPPEncodeException
Encode the signed code to a byte[].

Overrides:
encode in class EPPSignedCode
Returns:
Encoded signed code
Throws:
EPPEncodeException - Error encoding the signed code

encode

public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
                           throws EPPEncodeException
Sets all this instance's data in the given XML document

Specified by:
encode in interface EPPCodecComponent
Overrides:
encode in class EPPSignedCode
Parameters:
aDocument - a DOM Document to attach data to.
Returns:
The root element of this component.
Throws:
EPPEncodeException - Thrown if any errors prevent encoding.

encodeValue

public java.lang.String encodeValue()
                             throws EPPEncodeException
Encodes the Base64 signed code value without the wrapping XML elements.

Returns:
Base64 signed code value
Throws:
EPPEncodeException - Error encoding the Base64 signed code value

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone EPPEncodedSignedCodeValue.

Specified by:
clone in interface EPPCodecComponent
Overrides:
clone in class EPPSignedCode
Returns:
clone of EPPEncodedSignedCodeValue
Throws:
java.lang.CloneNotSupportedException - standard Object.clone exception


Copyright © VeriSign Inc. All Rights Reserved.