Class AppDocUtils


  • public class AppDocUtils
    extends Object
    Provides Unified Application Document utility methods.
    Since:
    17.10.0
    • Constructor Detail

      • AppDocUtils

        public AppDocUtils()
    • Method Detail

      • createAppDoc

        public static Document createAppDoc​(Document formDoc)
        Create new Application Document model using the '/AvokaSmartForm' Form Document model, wrapping the Form Document in a /Root element.
        Parameters:
        formDoc - the source XML document (required)
        Returns:
        an new Application Document
      • createFormDoc

        public static Document createFormDoc​(Document appDoc)
        Create a new Form Document model using the given Application Document model, extracting the /AvokaSmartForm node.
        Parameters:
        appDoc - the application document model (required)
        Returns:
        the form document model
      • mergeWithAppDoc

        public static void mergeWithAppDoc​(Document formDoc,
                                           Document appDoc)
        Merge the '/AvokaSmartForm' Form Document with the Application Document under the node '/Root/AvokaSmartForm'.
        Parameters:
        formDoc - the source XML document (required)
        appDoc - the target XML document (required)
      • toFormDocString

        public static String toFormDocString​(Document appDoc)
        Render the '//AvokaSmartForm' Form Document text from the Application Document.
        Parameters:
        appDoc - the target XML document (required)
        Returns:
        the '//AvokaSmartForm' Form Document text