Class DefaultEbicsRootElement

java.lang.Object
org.kopi.ebics.xml.DefaultEbicsRootElement
All Implemented Interfaces:
Serializable, EbicsElement, EbicsRootElement
Direct Known Subclasses:
DefaultResponseElement, HIARequestElement, HIARequestOrderDataElement, HPBRequestElement, INIRequestElement, InitializationRequestElement, NoPubKeyDigestsRequestElement, ReceiptRequestElement, SignaturePubKeyOrderDataElement, SignedInfo, TransferRequestElement, UnsecuredRequestElement, UserSignature

public abstract class DefaultEbicsRootElement extends Object implements EbicsRootElement
See Also:
  • Field Details

    • document

      protected org.apache.xmlbeans.XmlObject document
    • session

      protected EbicsSession session
  • Constructor Details

    • DefaultEbicsRootElement

      protected DefaultEbicsRootElement(EbicsSession session)
      Constructs a new default EbicsRootElement
      Parameters:
      session - the current ebics session
    • DefaultEbicsRootElement

      protected DefaultEbicsRootElement()
      Constructs a new default EbicsRootElement
  • Method Details

    • setSaveSuggestedPrefixes

      protected void setSaveSuggestedPrefixes(String uri, String prefix)
      Saves the Suggested Prefixes when the XML is printed
      Parameters:
      uri - the namespace URI
      prefix - the namespace URI prefix
    • prettyPrint

      public byte[] prettyPrint()
      Prints a pretty XML document in Canonical XML.
      Returns:
      the canonical XML document.
    • toPrettyString

      public String toPrettyString()
    • insertSchemaLocation

      public void insertSchemaLocation(String namespaceURI, String localPart, String prefix, String value)
      Inserts a schema location to the current ebics root element.
      Parameters:
      namespaceURI - the name space URI
      localPart - the local part
      prefix - the prefix
      value - the value
    • generateName

      public static String generateName(EbicsOrderType type)
      Generates a random file name with a prefix.
      Parameters:
      type - the order type.
      Returns:
      the generated file name.
    • generateName

      public static String generateName(String prefix)
      Generates a random file name with a prefix.
      Parameters:
      prefix - the prefix to use.
      Returns:
      the generated file name.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toByteArray

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

      public void addNamespaceDecl(String prefix, String uri)
      Description copied from interface: EbicsRootElement
      Adds a namespace declaration for the EbicsRootElement
      Specified by:
      addNamespaceDecl in interface EbicsRootElement
      Parameters:
      prefix - namespace prefix
      uri - namespace uri
    • validate

      public void validate() throws EbicsException
      Description copied from interface: EbicsRootElement
      Validates the request element according to the EBICS XML schema specification
      Specified by:
      validate in interface EbicsRootElement
      Throws:
      EbicsException - throws an EbicsException when validation fails
    • save

      public void save(OutputStream out) throws EbicsException
      Description copied from interface: EbicsRootElement
      Saves the EbicsElement into a given output stream.
      Specified by:
      save in interface EbicsRootElement
      Parameters:
      out - the output stream
      Throws:
      EbicsException - the save operation fails
    • print

      public void print(PrintStream stream)
      Description copied from interface: EbicsElement
      Prints the EbicsElement into the given stream.
      Specified by:
      print in interface EbicsElement
      Parameters:
      stream - the print stream