Class InitializationRequestElement

java.lang.Object
org.kopi.ebics.xml.DefaultEbicsRootElement
org.kopi.ebics.xml.InitializationRequestElement
All Implemented Interfaces:
Serializable, EbicsElement, EbicsRootElement
Direct Known Subclasses:
DownloadInitializationRequestElement, SPRRequestElement, UploadInitializationRequestElement

public abstract class InitializationRequestElement extends DefaultEbicsRootElement
The InitializationRequestElement is the root element for ebics uploads and downloads requests. The response of this element is then used either to upload or download files from the ebics server.
See Also:
  • Field Details

  • Constructor Details

    • InitializationRequestElement

      protected InitializationRequestElement(EbicsSession session, EbicsOrderType type, String name)
      Construct a new InitializationRequestElement root element.
      Parameters:
      session - the current ebics session.
      type - the initialization type (UPLOAD, DOWNLOAD).
      name - the element name.
  • Method Details

    • build

      public void build() throws EbicsException
      Description copied from interface: EbicsElement
      Builds the EbicsElement XML fragment
      Throws:
      EbicsException
    • getName

      public String getName()
      Description copied from interface: EbicsElement
      Returns the name of this EbicsElement
      Returns:
      the name of the element
    • toByteArray

      public byte[] toByteArray()
      Description copied from interface: EbicsRootElement
      Converts the EbicsElement to a byte array
      Specified by:
      toByteArray in interface EbicsRootElement
      Overrides:
      toByteArray in class DefaultEbicsRootElement
      Returns:
      the equivalent byte array of this EbicsElement
    • getDigest

      public byte[] getDigest() throws EbicsException
      Returns the digest value of the authenticated XML portions.
      Returns:
      the digest value.
      Throws:
      EbicsException - Failed to retrieve the digest value.
    • getType

      public String getType()
      Returns the element type.
      Returns:
      the element type.
    • decodeHex

      protected byte[] decodeHex(byte[] hex) throws EbicsException
      Decodes an hexadecimal input.
      Parameters:
      hex - the hexadecimal input
      Returns:
      the decoded hexadecimal value
      Throws:
      EbicsException
    • generateTransactionKey

      protected byte[] generateTransactionKey() throws EbicsException
      Generates the upload transaction key
      Returns:
      the transaction key
      Throws:
      EbicsException
    • buildInitialization

      public abstract void buildInitialization() throws EbicsException
      Builds the initialization request according to the element type.
      Throws:
      EbicsException - build fails