Class EPPEncodedSignedCode

java.lang.Object
com.verisign.epp.codec.verificationcode.EPPEncodedSignedCode
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPEncodedSignedCode extends Object implements EPPCodecComponent
Class for the encoded signed code, which contains the code and the XMLSignature itself. This class extends EPPSignedCode.
See Also:
  • Field Details

    • ELM_LOCALNAME

      public static final String ELM_LOCALNAME
      Constant for the code local name for encoded signedCode element
      See Also:
    • ELM_NAME

      public static final String ELM_NAME
      Constant for the code tag for signedCode element
      See Also:
  • Constructor Details

    • EPPEncodedSignedCode

      public EPPEncodedSignedCode()
      Default constructor
    • EPPEncodedSignedCode

      public EPPEncodedSignedCode(EPPSignedCode aSignedCode) throws EPPEncodeException, EPPDecodeException
      Construct an encoded signed code with a single signed code value.
      Parameters:
      aSignedCode - Signed code value that will be encoded and added to the list.
      Throws:
      EPPEncodeException - Error encoding the SignedCode byte[].
      EPPDecodeException - Error decoding the encoded SignedCode byte[].
    • EPPEncodedSignedCode

      public EPPEncodedSignedCode(EPPEncodedSignedCodeValue aEncodedSignedCodeValue)
      Construct an encoded signed code with a single encoded signed code value.
      Parameters:
      aEncodedSignedCodeValue - Encoded signed code value to add to the list.
    • EPPEncodedSignedCode

      public EPPEncodedSignedCode(EPPVerificationCode aCode) throws EPPEncodeException
      Create an EPPEncodedSignedCode with the code of the signed code.
      Parameters:
      aCode - Verification code
      Throws:
      EPPEncodeException - Thrown if any errors prevent encoding.
    • EPPEncodedSignedCode

      public EPPEncodedSignedCode(String aCode, String aType) throws EPPEncodeException
      Create an EPPEncodedSignedCode with the code of the signed code and code type.
      Parameters:
      aCode - Verification code
      aType - OPTIONAL verification code type. Set to null if no type is defined.
      Throws:
      EPPEncodeException - Thrown if any errors prevent encoding.
    • EPPEncodedSignedCode

      public EPPEncodedSignedCode(List<EPPEncodedSignedCodeValue> aCodes)
      Create an EPPEncodedSignedCode with a list of encoded signed code values.
      Parameters:
      aCodes - List of encoded signed code values
  • Method Details

    • hasCodes

      public boolean hasCodes()
      Are encoded signed codes defined?
      Returns:
      true if encoded signed codes are defined; false otherwise.
    • getSignedCodes

      public List<EPPEncodedSignedCodeValue> getSignedCodes()
      Gets the list of encoded signed codes.
      Returns:
      List of encoded signed codes if set; null otherwise.
    • setSignedCodes

      public void setSignedCodes(List<EPPEncodedSignedCodeValue> aCodes)
      Sets the list of encoded signed codes.
      Parameters:
      aCodes - List of encoded signed codes
    • setCode

      public void setCode(EPPEncodedSignedCodeValue aCode)
      Sets the encoded signed codes to a single code.
      Parameters:
      aCode - Encoded signed code to set
    • addCode

      public void addCode(EPPEncodedSignedCodeValue aCode)
      Adds a encoded signed code to the list of encoded signed codes.
      Parameters:
      aCode - Encoded signed code to add to the list of encoded signed codes.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPSignedCode component
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root element of the EPPSignedCode
      Throws:
      EPPDecodeException - Error decoding the EPPSignedCode
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Sets all this instance's data in the given XML document
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - a DOM Document to attach data to.
      Returns:
      The root element of this component.
      Throws:
      EPPEncodeException - Thrown if any errors prevent encoding.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPEncodedSignedCode compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPEncodedSignedCode instance to compare with
      Returns:
      true if equal false otherwise
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPEncodedSignedCode.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPEncodedSignedCode
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.