diff --git a/docgen/parameters.json b/docgen/parameters.json index 12b0f3538..9bce82177 100644 --- a/docgen/parameters.json +++ b/docgen/parameters.json @@ -1,8 +1,8 @@ { "title" : "Venus (Fugerit Document Generation Framework)", "name": "Venus", - "version" : "1.3.1-rc.002", - "date" : "14/07/2023", + "version" : "1.3.1-rc.003", + "date" : "18/07/2023", "organization" : { "name" : "Fugerit Org", "url" : "https://www.fugerit.org" diff --git a/docgen/release-notes.txt b/docgen/release-notes.txt index a7df2e5ac..cf102bcdb 100644 --- a/docgen/release-notes.txt +++ b/docgen/release-notes.txt @@ -1,517 +1,523 @@ -1.3.1-rc.002 (2023-07-14) ------------------- -+ Updated fj-core version to 8.0.11-rc.002 -+ Simplified FreemarkerDocProcessConfig - -1.3.1-rc.001 (2023-07-13) ------------------- -+ [[fj-doc-mod-fop] add pdf/a support](https://github.com/fugerit-org/fj-doc/issues/43) - -1.3.0-rc.007 (2023-07-12) ------------------- -+ [New freemarker configuration model, compatibility mode](https://github.com/fugerit-org/fj-doc/issues/38) - -1.3.0-rc.004 (2023-07-11) ------------------- -+ fj-bom updated to 1.2.3 - -1.3.0-rc.001 (2023-07-09) ------------------- -+ [New freemarker configuration model](https://github.com/fugerit-org/fj-doc/issues/38) - -1.2.0-rc.001 (2023-07-07) ------------------- -+ Added module fj-doc-lib-simpletable-import to convert xlsx or csv to simple table - -1.1.2-rc.001 (2023-07-03) ------------------- -+ Updated quarkus version to 3.1.3.Final -+ Added generation time on playgroud quarkus -+ Added lombok dependency -+ Added API for AOT type handlers initialization (especially useful for libraries like apache fop) - -1.1.1-rc.001 (2023-07-02) ------------------- -+ Added fj-doc bom dependencies for incubator and deprecated modules (fj-doc-ent, fj-doc-mod-pdfbox, fj-doc-mod-itext, fj-doc-mod-jxl) -+ Fix page number handling on footer / header of fj-doc-mod-fop,[[fj-doc-mod-fop] inccorect handling of &](https://github.com/fugerit-org/fj-bom/issues/35) - -1.1.0-rc.001 (2023-06-25) ------------------- -+ Added bom to make importing core libraries easier (fj-doc-bom-core) -+ Added bom to make importing fop pdf libraries easier (fj-doc-bom-pdf) - -1.0.3-rc.002 (2023-06-15) ------------------- -+ Upgrade quarkus version to 3.1.1.Final (Apache Maven 3.8.2+ needed to build) - -1.0.3-rc.001 (2023-06-08) ------------------- -+ [[fj-doc-mod-fop] inccorect handling of &](https://github.com/fugerit-org/fj-bom/issues/35) -+ update fj-bom version 1.1.0 -+ update fj-core version 8.0.10-rc.003 - -1.0.2-rc.001 (2023-04-05) ------------------- -+ Upgrade playground to quarkus 3.0.0.CR1 - -1.0.1 (2023-03-26) ------------------- -+ update fj-bom version 1.0.0 -+ update fj-core version 8.0.4 -+ maven.compiler.release property set to '8' (so the project is still compatible with java8+) [except for quarkus playground] -+ [As for the new parent version, building should be done using java11+](https://github.com/fugerit-org/fj-bom/issues/11) - -1.0.0 (2023-03-18) ------------------- -+ [Moving github pages to main branch, dropping 0 version](https://github.com/fugerit-org/fj-doc/issues/33) -+ update fj-core version 8.0.0 - -0.8.11 (2023-02-26) ------------------- -+ Fixed column helper for SimpleTable - -0.8.10 (2023-02-26) ------------------- -+ [Managing of unsafe DocTypeHandler for DocHandlerFactory](https://github.com/fugerit-org/fj-doc/issues/31) -+ update fj-core version to 0.8.13 (DocHandlerFactory would not work with previous versions) - -0.8.9 (2023-02-20) ------------------- -+ [Upgraded quarkus version to 3.0.0.Alpha4](https://github.com/fugerit-org/fj-doc/issues/29) -+ Fix charset handling for csv type handler -+ Fix to alternate text for json and yaml sample - -0.8.8 (2023-02-11) ------------------- -+ [Fix javadoc build for java 17](https://github.com/fugerit-org/fj-doc/issues/26) -+ [Jackson core need to be upgraded 2.14.1](https://github.com/fugerit-org/fj-doc/issues/9) -+ update fj-core version to 0.8.12 - -0.8.7 (2023-02-08) ------------------- -+ [Fix Javadoc generations with older versions of jdk 11 fails](https://github.com/fugerit-org/fj-doc/issues/24) - -0.8.6 (2023-02-06) ------------------- -+ Added meta informations to samples documents -+ Added new sample catalog entry from playground -+ Playground tests disabled by default -+ Playground not included in release - -0.8.5 (2023-01-31) ------------------- -+ [fj-doc-base - Extend charset provider capabilities](https://github.com/fugerit-org/fj-doc/issues/22) - -0.8.4 (2023-01-27) ------------------- -+ [fj-doc-base - Enable charset selection for DocTypeHandlerXML](https://github.com/fugerit-org/fj-doc/issues/17) - -0.8.3 (2023-01-24) ------------------- -+ [fj-doc-mod-fop - need to create FopConfigClassLoaderWrapper with default ResourceResolver](https://github.com/fugerit-org/fj-doc/issues/15) - -0.8.2 (2023-01-22) ------------------- -+ Updated fj-core version to 0.8.8 -+ Improved playground - -0.8.1 (2023-01-15) ------------------- -+ Added methods to DocProcessContext for DocBase and DocType availability. -+ Added access to DocConfig static variables in Freemarker Chain process -+ Added new info doc-version-compatibility for handling behaviours in 1-x e 2-x doc versions. -+ Added a sample documents catalog to the fj-doc-sample modules (accessible in the playgound application too) - -0.8.0 (2023-01-07) ------------------- -+ Added a new module for generating documentation [fj-doc-lib-autodoc](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-lib-autodoc) -+ Published new version of [doc-2-0.xsd](https://venusdocs.fugerit.org/fj-doc-base/src/main/resources/config/doc-2-0.xsd), [see doc xsd changelog](https://github.com/fugerit-org/fj-doc/blob/main/fj-doc-base/DocXsdChangelog.md) -+ Created a brand new [xsd reference documentation](https://venusdocs.fugerit.org/fj-doc-base/src/main/docs/doc_xsd_config_ref.html) - -0.7.2 (2023-01-04) ------------------- -+ Fixed xml validation in DocXmlParser -+ Added validation in DocJsonParser and DocYamlParser (though conversion to XML) -+ The xml parsing is no namespace aware (experimental) -+ More functionalities in playground - -0.7.1 (2023-01-02) ------------------- -+ Added conversion utility from json/yaml to xml -+ Added xml to [json/yaml conversion conventions](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-base-json/xml_conversion.md) -+ More functionalities in playground -+ Upgrade playground to quarkus 3.0.0.Alpha2 - -0.7.0 (2022-12-29) ------------------- -+ Added module for using json a document generator [fj-doc-base-json](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-base-json) (based on jackson) -+ Added module for using yaml a document generator [fj-doc-base-yaml](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-base-yaml) (based on jackson) -+ Added playground module [fj-doc-playground-quarkus](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-playground-quarkus) (based on quarkus) -+ Better pdf validation handling -+ Updated fj-core version to 0.8.6 - -0.6.2 (2022-12-23) ------------------- -+ The fj-doc-val has been split in modules, to optimize dependencies - -0.6.1 (2022-12-22) ------------------- -+ Added doc(x) and xls(x) validators -+ Corrected type in package name - -0.6.0 (2022-12-20) ------------------- -+ Added compatibility check for Tiff Image Validator (required java 9+ at runtime) -+ Now fj-doc requires java9+ at build time (will be build with java 11), java8 at runtime (some functionalities will not works) -+ Updated fj-core version to 0.8.5 - -0.5.11 (2022-12-19) ------------------- -+ Added doc type validation module (fj-doc-val) -+ Now fj-doc requires java9+ at build time (will be build with java 11), java8 at runtime (some functionalities will not works) - -0.5.10 (2022-12-12) ------------------- -+ Added support for maximum table width and doc language in simpletable module - -0.5.9 (2022-12-11) ------------------- -+ Added support for style and align in simpletable module - -0.5.8 (2022-12-10) ------------------- -+ Added support for border width in simpletable module - -0.5.7 (2022-12-09) ------------------- -+ Updated fj-core version to 0.8.4 -+ Updated fj-bom version to 0.2.3 -+ Added facade for creating new SimpleTable - -0.5.6 (2022-12-05) ------------------- -+ Changed base path of freemarker config to avoid conflict -+ Changed base path of mod fop config to avoid conflict -+ Added module fj-doc-lib-simpletable (with samples, basic documentation and junit) - -0.5.5 (2022-11-24) ------------------- -+ fj-doc-mod-fop Fixed legacy compatibility of FopConfigClassLoader see [0.5.2](https://github.com/fugerit-org/fj-doc/issues/7) - -0.5.4 (2022-11-24) ------------------- -+ fj-doc-mod-opencsv, added module for handling CSV format [CSV format](https://github.com/fugerit-org/fj-doc/issues/8) - -0.5.3 (2022-11-21) ------------------- -+ fj-doc-base fixed xsd version comparison (before was a normal string comparison) -+ fj-doc-mod-fop Fixed legacy compatibility of FopConfigClassLoader see [0.5.2](https://github.com/fugerit-org/fj-doc/issues/7) - -0.5.2 (2022-11-21) ------------------- -+ fj-doc-sample semplified. (Reduced to only one test facade.) -+ Introduce new FopPrtTypeHandler config attribute 'fop-config-mode' (previous mode is deprecated) see [0.5.2](https://github.com/fugerit-org/fj-doc/issues/7) - -0.5.1 (2022-11-20) ------------------- -+ Changed Apahe FOP version from 2.6 to 2.8 -+ Fix for bug [FOP-3109](https://github.com/fugerit-org/fj-doc/issues/6) - -0.5.0 (2022-11-17) [0.5-RC2] ------------------- -+ Changed fj-core version to 0.8.0 -+ Added parent (fj-bom 0.2.2) -+ Put in incubator and moved module [fj-doc-mod-pdfbox](https://github.com/fugerit-org/fj-doc-mod-pdfbox.git) -+ Deprecated and moved module [fj-doc-ent](https://github.com/fugerit-org/fj-doc-ent.git) -+ Deprecated and moved module [fj-doc-mod-itext](https://github.com/fugerit-org/fj-doc-mod-itext.git) -+ Deprecated and moved module [fj-doc-mod-jxl](https://github.com/fugerit-org/fj-doc-mod-jxl.git) -+ Updated README.md - -0.4.2 (2022-11-07) ------------------- -+ Changed fj-core version to 0.7.9 - -0.4.1 (2022-11-07) ------------------- -+ Bump hsqldb from 2.5.0 to 2.7.1 - -0.4.0 (2022-11-07) ------------------- -+ Changed version format to MAJOR.MINOR.PATH -+ Changed fj-core version to 0.7.8 - -0.3.9.4 (2022-04-06) --------------------- -+ para can now contains para and phrases (fop and freemarker mod) -+ Changed fj-core version to 0.7.6.8 - -0.3.9.3 (2022-03-18) --------------------- -+ Fix to phrase link style in mod-fop - -0.3.9.2 (2022-03-17) --------------------- -+ Added external link support in mod-fop - -0.3.9.1 (2022-03-17) --------------------- -+ Added page-widht and page-height support in mod-fop - -0.3.9.0 (2022-03-10) --------------------- -+ Added support for page-break in mod-fop - -0.3.8.9 (2022-03-07) --------------------- -+ Changed doc version to doc-1-9 (deep changes to list handling) - -0.3.8.7 / 0.3.8.8 (2022-03-06) --------------------- -+ Added support for different symbols on FOP/HTML rendered list (dash, minus, letters, numbers) - -0.3.8.5 / 0.3.8.6 (2022-02-16) --------------------- -+ Fix the current doc meta model supported version to 1.8 - -0.3.8.3 / 0.3.8.4 (2022-02-14) --------------------- -+ Fix in empty list handling for fop type handler - -0.3.8.2 (2022-02-10) --------------------- -+ Added no comments configuration for Markdown handlers - -0.3.8.1 (2022-02-09) --------------------- -+ Added constant for type markdown (md) - -0.3.8.0 (2022-02-09) --------------------- -+ Added simple type handler for Markdown format (basic and extended -syntax) - -0.3.7.4 (2022-02-03) --------------------- -+ fj-mode-freemarker : fix in DocPhrase handling - -0.3.7.3 (2022-01-26) --------------------- -+ Added metadata info doc-language for whole document (currently only supported by fop renderer) - -0.3.7.2 (2022-01-26) --------------------- -+ Added metadata info doc-title, doc-author, doc-subject, doc-creator, doc-version (currently only supported by fop renderer) - -0.3.7.1 (2021-12-22) --------------------- -+ Added bookmark tree support (currently only work with fop renderer) - -0.3.7.0 (2021-11-21) --------------------- -+ Better header handling for fop - -0.3.6.9 (2021-10-21) --------------------- -+ Metadata for default-table-padding and default-table-spacing - -0.3.6.8 (2021-10-09) --------------------- -+ Added meta/background to doc.xsd - -0.3.6.7 (2021-09-27) --------------------- -+ Fix on doc-1-7.xsd for - -0.3.6.6 (2021-09-27) --------------------- -+ Added para.text-indent and para.spaceBefore to fop renderer - -0.3.6.5 (2021-09-27) --------------------- -+ fix bug on fop renderer when space-after/before in inline container - -0.3.6.4 (2021-09-27) --------------------- -+ fix bug on fop renderer when spacing and align both present - -0.3.6.3 (2021-09-27) --------------------- -+ added para.space-left and para.space-right to fop renderer - -0.3.6.2 (2021-09-27) --------------------- -+ added para.format="preserve-line" to fop renderer - -0.3.6.1 (2021-09-26) --------------------- -+ added support for space-after / space-before in freemarker and fop renderer - -0.3.6.0 (2021-09-21) --------------------- -+ doc-1-5.xsd : added 'render-mode' attribute to 'table' element (supported in freemarker fop) -+ doc-1-5.xsd : added 'align' attribute to 'image' element (supported in freemarker fop) -+ Changed fj-core version to 0.7.6.7 - -0.3.5.9 (2021-02-24) --------------------- -+ Corrections in link and list handling - -0.3.5.8 (2021-02-24) --------------------- -+ Fix on list item for freemarker html and fop module - -0.3.5.7 (2021-02-24) --------------------- -+ Upgraded fj-core version to 0.7.5.2 -+ Added FreeMarkerComplexProcessStep (providing a simplified chain step for freemarker, Process + Map Step) - -0.3.5.6 (2021-02-24) --------------------- -+ Upgraded fj-core version to 0.7.5.1 -+ Added some functions to DocProcessContext -+ Added type and alt attributes to DocImage (supported in freemarker-html and pdf-fop for now) - -0.3.5.5 (2021-02-21) --------------------- -+ Added DocTypeFacadeDefault for inspecting DocBase model in new DocTypeHandler - -0.3.5.4 (2021-02-20) --------------------- -+ Added ProccessDocFacade facility (adding DocHandlerFacade and DocProcessConfig together) - -0.3.5.3 (2021-02-18) --------------------- -+ Added SimpleDocFacade for simple document handling -+ Added dependancy fj-mod-freemarker for fj-mod-fop - -0.3.5.2 (2021-02-16) --------------------- -+ Handle table header for mod-fop e mod-freemarker html - -0.3.5.1 (2021-02-16) --------------------- -+ List support for mod-fop e mod-freemarker html - -0.3.5.0 (2021-02-16) --------------------- -+ List support (currently only for mod-fop) - -0.3.4.7 (2021-02-15) --------------------- -+ Fix to doc xsd 1.3 - -0.3.4.4 (2021-02-14) --------------------- -+ Added simple free marker functions to sum numbers - -0.3.4.3 (2021-02-14) --------------------- -+ Bugfix on Support for default font family/size/style in mod-fop - -0.3.4.2 (2021-02-14) --------------------- -+ Support for default font family/size/style in mod-fop - -0.3.4.1 (2021-02-14) --------------------- -+ Custom configuration of renderers -+ Added support for class loader configuration in mod-fop - -0.3.4.0 (2021-02-13) --------------------- -+ Added free marker extension for formatting in mod-freemarker -+ Added mod-freemarker step for configuring custom functions - -0.3.3.10 (2021-02-12) --------------------- -+ Changed pdfboc version from 2.0.17 to 2.0.12 -+ added check pdf utility in mod-pdfbox - -0.3.3.9 (2021-02-11) --------------------- -+ better mod-fop support for
align and style - -0.3.3.8 (2021-02-10) --------------------- -+ Changed fop version from 2.4 to 2.6 -+ mod-fop now supports accessibility tags in pdf (h1/h7) - -0.3.3.7 (2021-02-05) --------------------- -+ Default apache free marker version change (2.3.29 -> 2.3.30) - -0.3.3.6 (2021-02-03) --------------------- -+ fremarker html support now print style attribute only if has values - -0.3.3.5 (2021-02-02) --------------------- -+ Added support for italic and bold italic style in freemarker html - -0.3.3.4 (2021-02-02) --------------------- -+ Added support for italic and bold italic style in freemarker html - -0.3.3.3 (2021-02-01) --------------------- -+ Added some dirext xml api call -+ Removed some depecrated call to apache POI - -0.3.3.2 (2021-01-07) --------------------- -+ bufix : freemarker html didn't handle right text align - -0.3.3.1 (2021-01-05) --------------------- -+ Upgrade fj-core version to 0.7.4.8 -+ Added support for headings level 1/7 (doc-1-2.xsd) [currently supported only on freemarker html renderer) - -0.3.3.0 (2020-12-18) --------------------- -+ Changed free marker template extension from .xml to .ftl -+ Upgrade free marker version from 2.3.29 to 2.3.30 -+ Upgrade fj-core version to 0.7.4.0 - -0.3.2.0 (2020-05-10) --------------------- -+ Added xsd version 1.1 -+ Check for maximum supported version - -0.3.1.1 (2020-05-05) --------------------- -+ Added element br (for nw line) [supported only in mod freemarker and itext] -+ Added element nbsp (for spacer) [supported only in mod freemarker and itext] - -0.3.1.0 (2020-04-13) --------------------- -+ Changed fj-core version from 0.7.0.9 to 0.7.1.0 -+ Changed maven-source-plugin version from 3.1.0 to 3.2.1 -+ Changed javadoc-source-plugin version from 3.1.0 to 3.2.0 -+ Changed jar-source-plugin version from 3.1.2 to 3.2.0 -+ Changed shade-source-plugin version from 3.2.1 to 3.2.2 -+ Changed apache poi version from 4.1.0 to 4.1.2 -+ Changed hsqldb version from 2.3.4 to 2.5.0 -+ Changed log4j version from 1.2.17 to 2.13.1 -+ Minor update to javadoc -+ Added log4j2 configuration file -+ Added logger test tool - -0.3.0.4 (2020-04-01) --------------------- -+ changed reference to fj-core 0.7.0.4 - -0.3.0.3 (2020-04-01) --------------------- -+ changed reference to fj-core 0.7.0.3 - -0.3.0.2 (2020-04-01) --------------------- -+ Change of fj-core reference - -0.3.0.1 (2020-04-01) [deprecated] --------------------- -+ Better use 0.3.0.2 - -0.3.0.0 (2020-03-31) --------------------- -+ Java 8 is the minimum version supported +1.3.1-rc.003 (2023-07-18) +------------------ ++ Freemarker html type handler converted to new configuration model ++ Configuration stub for freemarker configuration model ++ Tool for stub generation and conversion from old model (new maven module fj-doc-tool) + +1.3.1-rc.002 (2023-07-13) +------------------ ++ Updated fj-core version to 8.0.11-rc.002 ++ Simplified FreemarkerDocProcessConfig + +1.3.1-rc.001 (2023-07-13) +------------------ ++ [[fj-doc-mod-fop] add pdf/a support](https://github.com/fugerit-org/fj-doc/issues/43) + +1.3.0-rc.007 (2023-07-12) +------------------ ++ [New freemarker configuration model, compatibility mode](https://github.com/fugerit-org/fj-doc/issues/38) + +1.3.0-rc.004 (2023-07-11) +------------------ ++ fj-bom updated to 1.2.3 + +1.3.0-rc.001 (2023-07-09) +------------------ ++ [New freemarker configuration model](https://github.com/fugerit-org/fj-doc/issues/38) + +1.2.0-rc.001 (2023-07-07) +------------------ ++ Added module fj-doc-lib-simpletable-import to convert xlsx or csv to simple table + +1.1.2-rc.001 (2023-07-03) +------------------ ++ Updated quarkus version to 3.1.3.Final ++ Added generation time on playgroud quarkus ++ Added lombok dependency ++ Added API for AOT type handlers initialization (especially useful for libraries like apache fop) + +1.1.1-rc.001 (2023-07-02) +------------------ ++ Added fj-doc bom dependencies for incubator and deprecated modules (fj-doc-ent, fj-doc-mod-pdfbox, fj-doc-mod-itext, fj-doc-mod-jxl) ++ Fix page number handling on footer / header of fj-doc-mod-fop,[[fj-doc-mod-fop] inccorect handling of &](https://github.com/fugerit-org/fj-bom/issues/35) + +1.1.0-rc.001 (2023-06-25) +------------------ ++ Added bom to make importing core libraries easier (fj-doc-bom-core) ++ Added bom to make importing fop pdf libraries easier (fj-doc-bom-pdf) + +1.0.3-rc.002 (2023-06-15) +------------------ ++ Upgrade quarkus version to 3.1.1.Final (Apache Maven 3.8.2+ needed to build) + +1.0.3-rc.001 (2023-06-08) +------------------ ++ [[fj-doc-mod-fop] inccorect handling of &](https://github.com/fugerit-org/fj-bom/issues/35) ++ update fj-bom version 1.1.0 ++ update fj-core version 8.0.10-rc.003 + +1.0.2-rc.001 (2023-04-05) +------------------ ++ Upgrade playground to quarkus 3.0.0.CR1 + +1.0.1 (2023-03-26) +------------------ ++ update fj-bom version 1.0.0 ++ update fj-core version 8.0.4 ++ maven.compiler.release property set to '8' (so the project is still compatible with java8+) [except for quarkus playground] ++ [As for the new parent version, building should be done using java11+](https://github.com/fugerit-org/fj-bom/issues/11) + +1.0.0 (2023-03-18) +------------------ ++ [Moving github pages to main branch, dropping 0 version](https://github.com/fugerit-org/fj-doc/issues/33) ++ update fj-core version 8.0.0 + +0.8.11 (2023-02-26) +------------------ ++ Fixed column helper for SimpleTable + +0.8.10 (2023-02-26) +------------------ ++ [Managing of unsafe DocTypeHandler for DocHandlerFactory](https://github.com/fugerit-org/fj-doc/issues/31) ++ update fj-core version to 0.8.13 (DocHandlerFactory would not work with previous versions) + +0.8.9 (2023-02-20) +------------------ ++ [Upgraded quarkus version to 3.0.0.Alpha4](https://github.com/fugerit-org/fj-doc/issues/29) ++ Fix charset handling for csv type handler ++ Fix to alternate text for json and yaml sample + +0.8.8 (2023-02-11) +------------------ ++ [Fix javadoc build for java 17](https://github.com/fugerit-org/fj-doc/issues/26) ++ [Jackson core need to be upgraded 2.14.1](https://github.com/fugerit-org/fj-doc/issues/9) ++ update fj-core version to 0.8.12 + +0.8.7 (2023-02-08) +------------------ ++ [Fix Javadoc generations with older versions of jdk 11 fails](https://github.com/fugerit-org/fj-doc/issues/24) + +0.8.6 (2023-02-06) +------------------ ++ Added meta informations to samples documents ++ Added new sample catalog entry from playground ++ Playground tests disabled by default ++ Playground not included in release + +0.8.5 (2023-01-31) +------------------ ++ [fj-doc-base - Extend charset provider capabilities](https://github.com/fugerit-org/fj-doc/issues/22) + +0.8.4 (2023-01-27) +------------------ ++ [fj-doc-base - Enable charset selection for DocTypeHandlerXML](https://github.com/fugerit-org/fj-doc/issues/17) + +0.8.3 (2023-01-24) +------------------ ++ [fj-doc-mod-fop - need to create FopConfigClassLoaderWrapper with default ResourceResolver](https://github.com/fugerit-org/fj-doc/issues/15) + +0.8.2 (2023-01-22) +------------------ ++ Updated fj-core version to 0.8.8 ++ Improved playground + +0.8.1 (2023-01-15) +------------------ ++ Added methods to DocProcessContext for DocBase and DocType availability. ++ Added access to DocConfig static variables in Freemarker Chain process ++ Added new info doc-version-compatibility for handling behaviours in 1-x e 2-x doc versions. ++ Added a sample documents catalog to the fj-doc-sample modules (accessible in the playgound application too) + +0.8.0 (2023-01-07) +------------------ ++ Added a new module for generating documentation [fj-doc-lib-autodoc](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-lib-autodoc) ++ Published new version of [doc-2-0.xsd](https://venusdocs.fugerit.org/fj-doc-base/src/main/resources/config/doc-2-0.xsd), [see doc xsd changelog](https://github.com/fugerit-org/fj-doc/blob/main/fj-doc-base/DocXsdChangelog.md) ++ Created a brand new [xsd reference documentation](https://venusdocs.fugerit.org/fj-doc-base/src/main/docs/doc_xsd_config_ref.html) + +0.7.2 (2023-01-04) +------------------ ++ Fixed xml validation in DocXmlParser ++ Added validation in DocJsonParser and DocYamlParser (though conversion to XML) ++ The xml parsing is no namespace aware (experimental) ++ More functionalities in playground + +0.7.1 (2023-01-02) +------------------ ++ Added conversion utility from json/yaml to xml ++ Added xml to [json/yaml conversion conventions](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-base-json/xml_conversion.md) ++ More functionalities in playground ++ Upgrade playground to quarkus 3.0.0.Alpha2 + +0.7.0 (2022-12-29) +------------------ ++ Added module for using json a document generator [fj-doc-base-json](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-base-json) (based on jackson) ++ Added module for using yaml a document generator [fj-doc-base-yaml](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-base-yaml) (based on jackson) ++ Added playground module [fj-doc-playground-quarkus](https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-playground-quarkus) (based on quarkus) ++ Better pdf validation handling ++ Updated fj-core version to 0.8.6 + +0.6.2 (2022-12-23) +------------------ ++ The fj-doc-val has been split in modules, to optimize dependencies + +0.6.1 (2022-12-22) +------------------ ++ Added doc(x) and xls(x) validators ++ Corrected type in package name + +0.6.0 (2022-12-20) +------------------ ++ Added compatibility check for Tiff Image Validator (required java 9+ at runtime) ++ Now fj-doc requires java9+ at build time (will be build with java 11), java8 at runtime (some functionalities will not works) ++ Updated fj-core version to 0.8.5 + +0.5.11 (2022-12-19) +------------------ ++ Added doc type validation module (fj-doc-val) ++ Now fj-doc requires java9+ at build time (will be build with java 11), java8 at runtime (some functionalities will not works) + +0.5.10 (2022-12-12) +------------------ ++ Added support for maximum table width and doc language in simpletable module + +0.5.9 (2022-12-11) +------------------ ++ Added support for style and align in simpletable module + +0.5.8 (2022-12-10) +------------------ ++ Added support for border width in simpletable module + +0.5.7 (2022-12-09) +------------------ ++ Updated fj-core version to 0.8.4 ++ Updated fj-bom version to 0.2.3 ++ Added facade for creating new SimpleTable + +0.5.6 (2022-12-05) +------------------ ++ Changed base path of freemarker config to avoid conflict ++ Changed base path of mod fop config to avoid conflict ++ Added module fj-doc-lib-simpletable (with samples, basic documentation and junit) + +0.5.5 (2022-11-24) +------------------ ++ fj-doc-mod-fop Fixed legacy compatibility of FopConfigClassLoader see [0.5.2](https://github.com/fugerit-org/fj-doc/issues/7) + +0.5.4 (2022-11-24) +------------------ ++ fj-doc-mod-opencsv, added module for handling CSV format [CSV format](https://github.com/fugerit-org/fj-doc/issues/8) + +0.5.3 (2022-11-21) +------------------ ++ fj-doc-base fixed xsd version comparison (before was a normal string comparison) ++ fj-doc-mod-fop Fixed legacy compatibility of FopConfigClassLoader see [0.5.2](https://github.com/fugerit-org/fj-doc/issues/7) + +0.5.2 (2022-11-21) +------------------ ++ fj-doc-sample semplified. (Reduced to only one test facade.) ++ Introduce new FopPrtTypeHandler config attribute 'fop-config-mode' (previous mode is deprecated) see [0.5.2](https://github.com/fugerit-org/fj-doc/issues/7) + +0.5.1 (2022-11-20) +------------------ ++ Changed Apahe FOP version from 2.6 to 2.8 ++ Fix for bug [FOP-3109](https://github.com/fugerit-org/fj-doc/issues/6) + +0.5.0 (2022-11-17) [0.5-RC2] +------------------ ++ Changed fj-core version to 0.8.0 ++ Added parent (fj-bom 0.2.2) ++ Put in incubator and moved module [fj-doc-mod-pdfbox](https://github.com/fugerit-org/fj-doc-mod-pdfbox.git) ++ Deprecated and moved module [fj-doc-ent](https://github.com/fugerit-org/fj-doc-ent.git) ++ Deprecated and moved module [fj-doc-mod-itext](https://github.com/fugerit-org/fj-doc-mod-itext.git) ++ Deprecated and moved module [fj-doc-mod-jxl](https://github.com/fugerit-org/fj-doc-mod-jxl.git) ++ Updated README.md + +0.4.2 (2022-11-07) +------------------ ++ Changed fj-core version to 0.7.9 + +0.4.1 (2022-11-07) +------------------ ++ Bump hsqldb from 2.5.0 to 2.7.1 + +0.4.0 (2022-11-07) +------------------ ++ Changed version format to MAJOR.MINOR.PATH ++ Changed fj-core version to 0.7.8 + +0.3.9.4 (2022-04-06) +-------------------- ++ para can now contains para and phrases (fop and freemarker mod) ++ Changed fj-core version to 0.7.6.8 + +0.3.9.3 (2022-03-18) +-------------------- ++ Fix to phrase link style in mod-fop + +0.3.9.2 (2022-03-17) +-------------------- ++ Added external link support in mod-fop + +0.3.9.1 (2022-03-17) +-------------------- ++ Added page-widht and page-height support in mod-fop + +0.3.9.0 (2022-03-10) +-------------------- ++ Added support for page-break in mod-fop + +0.3.8.9 (2022-03-07) +-------------------- ++ Changed doc version to doc-1-9 (deep changes to list handling) + +0.3.8.7 / 0.3.8.8 (2022-03-06) +-------------------- ++ Added support for different symbols on FOP/HTML rendered list (dash, minus, letters, numbers) + +0.3.8.5 / 0.3.8.6 (2022-02-16) +-------------------- ++ Fix the current doc meta model supported version to 1.8 + +0.3.8.3 / 0.3.8.4 (2022-02-14) +-------------------- ++ Fix in empty list handling for fop type handler + +0.3.8.2 (2022-02-10) +-------------------- ++ Added no comments configuration for Markdown handlers + +0.3.8.1 (2022-02-09) +-------------------- ++ Added constant for type markdown (md) + +0.3.8.0 (2022-02-09) +-------------------- ++ Added simple type handler for Markdown format (basic and extended +syntax) + +0.3.7.4 (2022-02-03) +-------------------- ++ fj-mode-freemarker : fix in DocPhrase handling + +0.3.7.3 (2022-01-26) +-------------------- ++ Added metadata info doc-language for whole document (currently only supported by fop renderer) + +0.3.7.2 (2022-01-26) +-------------------- ++ Added metadata info doc-title, doc-author, doc-subject, doc-creator, doc-version (currently only supported by fop renderer) + +0.3.7.1 (2021-12-22) +-------------------- ++ Added bookmark tree support (currently only work with fop renderer) + +0.3.7.0 (2021-11-21) +-------------------- ++ Better header handling for fop + +0.3.6.9 (2021-10-21) +-------------------- ++ Metadata for default-table-padding and default-table-spacing + +0.3.6.8 (2021-10-09) +-------------------- ++ Added meta/background to doc.xsd + +0.3.6.7 (2021-09-27) +-------------------- ++ Fix on doc-1-7.xsd for + +0.3.6.6 (2021-09-27) +-------------------- ++ Added para.text-indent and para.spaceBefore to fop renderer + +0.3.6.5 (2021-09-27) +-------------------- ++ fix bug on fop renderer when space-after/before in inline container + +0.3.6.4 (2021-09-27) +-------------------- ++ fix bug on fop renderer when spacing and align both present + +0.3.6.3 (2021-09-27) +-------------------- ++ added para.space-left and para.space-right to fop renderer + +0.3.6.2 (2021-09-27) +-------------------- ++ added para.format="preserve-line" to fop renderer + +0.3.6.1 (2021-09-26) +-------------------- ++ added support for space-after / space-before in freemarker and fop renderer + +0.3.6.0 (2021-09-21) +-------------------- ++ doc-1-5.xsd : added 'render-mode' attribute to 'table' element (supported in freemarker fop) ++ doc-1-5.xsd : added 'align' attribute to 'image' element (supported in freemarker fop) ++ Changed fj-core version to 0.7.6.7 + +0.3.5.9 (2021-02-24) +-------------------- ++ Corrections in link and list handling + +0.3.5.8 (2021-02-24) +-------------------- ++ Fix on list item for freemarker html and fop module + +0.3.5.7 (2021-02-24) +-------------------- ++ Upgraded fj-core version to 0.7.5.2 ++ Added FreeMarkerComplexProcessStep (providing a simplified chain step for freemarker, Process + Map Step) + +0.3.5.6 (2021-02-24) +-------------------- ++ Upgraded fj-core version to 0.7.5.1 ++ Added some functions to DocProcessContext ++ Added type and alt attributes to DocImage (supported in freemarker-html and pdf-fop for now) + +0.3.5.5 (2021-02-21) +-------------------- ++ Added DocTypeFacadeDefault for inspecting DocBase model in new DocTypeHandler + +0.3.5.4 (2021-02-20) +-------------------- ++ Added ProccessDocFacade facility (adding DocHandlerFacade and DocProcessConfig together) + +0.3.5.3 (2021-02-18) +-------------------- ++ Added SimpleDocFacade for simple document handling ++ Added dependancy fj-mod-freemarker for fj-mod-fop + +0.3.5.2 (2021-02-16) +-------------------- ++ Handle table header for mod-fop e mod-freemarker html + +0.3.5.1 (2021-02-16) +-------------------- ++ List support for mod-fop e mod-freemarker html + +0.3.5.0 (2021-02-16) +-------------------- ++ List support (currently only for mod-fop) + +0.3.4.7 (2021-02-15) +-------------------- ++ Fix to doc xsd 1.3 + +0.3.4.4 (2021-02-14) +-------------------- ++ Added simple free marker functions to sum numbers + +0.3.4.3 (2021-02-14) +-------------------- ++ Bugfix on Support for default font family/size/style in mod-fop + +0.3.4.2 (2021-02-14) +-------------------- ++ Support for default font family/size/style in mod-fop + +0.3.4.1 (2021-02-14) +-------------------- ++ Custom configuration of renderers ++ Added support for class loader configuration in mod-fop + +0.3.4.0 (2021-02-13) +-------------------- ++ Added free marker extension for formatting in mod-freemarker ++ Added mod-freemarker step for configuring custom functions + +0.3.3.10 (2021-02-12) +-------------------- ++ Changed pdfboc version from 2.0.17 to 2.0.12 ++ added check pdf utility in mod-pdfbox + +0.3.3.9 (2021-02-11) +-------------------- ++ better mod-fop support for
align and style + +0.3.3.8 (2021-02-10) +-------------------- ++ Changed fop version from 2.4 to 2.6 ++ mod-fop now supports accessibility tags in pdf (h1/h7) + +0.3.3.7 (2021-02-05) +-------------------- ++ Default apache free marker version change (2.3.29 -> 2.3.30) + +0.3.3.6 (2021-02-03) +-------------------- ++ fremarker html support now print style attribute only if has values + +0.3.3.5 (2021-02-02) +-------------------- ++ Added support for italic and bold italic style in freemarker html + +0.3.3.4 (2021-02-02) +-------------------- ++ Added support for italic and bold italic style in freemarker html + +0.3.3.3 (2021-02-01) +-------------------- ++ Added some dirext xml api call ++ Removed some depecrated call to apache POI + +0.3.3.2 (2021-01-07) +-------------------- ++ bufix : freemarker html didn't handle right text align + +0.3.3.1 (2021-01-05) +-------------------- ++ Upgrade fj-core version to 0.7.4.8 ++ Added support for headings level 1/7 (doc-1-2.xsd) [currently supported only on freemarker html renderer) + +0.3.3.0 (2020-12-18) +-------------------- ++ Changed free marker template extension from .xml to .ftl ++ Upgrade free marker version from 2.3.29 to 2.3.30 ++ Upgrade fj-core version to 0.7.4.0 + +0.3.2.0 (2020-05-10) +-------------------- ++ Added xsd version 1.1 ++ Check for maximum supported version + +0.3.1.1 (2020-05-05) +-------------------- ++ Added element br (for nw line) [supported only in mod freemarker and itext] ++ Added element nbsp (for spacer) [supported only in mod freemarker and itext] + +0.3.1.0 (2020-04-13) +-------------------- ++ Changed fj-core version from 0.7.0.9 to 0.7.1.0 ++ Changed maven-source-plugin version from 3.1.0 to 3.2.1 ++ Changed javadoc-source-plugin version from 3.1.0 to 3.2.0 ++ Changed jar-source-plugin version from 3.1.2 to 3.2.0 ++ Changed shade-source-plugin version from 3.2.1 to 3.2.2 ++ Changed apache poi version from 4.1.0 to 4.1.2 ++ Changed hsqldb version from 2.3.4 to 2.5.0 ++ Changed log4j version from 1.2.17 to 2.13.1 ++ Minor update to javadoc ++ Added log4j2 configuration file ++ Added logger test tool + +0.3.0.4 (2020-04-01) +-------------------- ++ changed reference to fj-core 0.7.0.4 + +0.3.0.3 (2020-04-01) +-------------------- ++ changed reference to fj-core 0.7.0.3 + +0.3.0.2 (2020-04-01) +-------------------- ++ Change of fj-core reference + +0.3.0.1 (2020-04-01) [deprecated] +-------------------- ++ Better use 0.3.0.2 + +0.3.0.0 (2020-03-31) +-------------------- ++ Java 8 is the minimum version supported diff --git a/fj-doc-base-json/pom.xml b/fj-doc-base-json/pom.xml index f7b103f5a..5d2152096 100644 --- a/fj-doc-base-json/pom.xml +++ b/fj-doc-base-json/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-base-json diff --git a/fj-doc-base-yaml/pom.xml b/fj-doc-base-yaml/pom.xml index 2613dff5c..d3d34b0d8 100644 --- a/fj-doc-base-yaml/pom.xml +++ b/fj-doc-base-yaml/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-base-yaml diff --git a/fj-doc-base/pom.xml b/fj-doc-base/pom.xml index b68e41079..73feb445f 100644 --- a/fj-doc-base/pom.xml +++ b/fj-doc-base/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-base diff --git a/fj-doc-bom-core/pom.xml b/fj-doc-bom-core/pom.xml index 1fe3a0217..98447d171 100644 --- a/fj-doc-bom-core/pom.xml +++ b/fj-doc-bom-core/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-bom-core diff --git a/fj-doc-bom-fop/pom.xml b/fj-doc-bom-fop/pom.xml index 79c5f2786..2d87f7f66 100644 --- a/fj-doc-bom-fop/pom.xml +++ b/fj-doc-bom-fop/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-bom-fop diff --git a/fj-doc-freemarker/pom.xml b/fj-doc-freemarker/pom.xml index dd8595d40..fa3ef5b09 100644 --- a/fj-doc-freemarker/pom.xml +++ b/fj-doc-freemarker/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-freemarker diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/helper/FreeMarkerDocProcess.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/helper/FreeMarkerDocProcess.java index b743ff899..5723d5db6 100644 --- a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/helper/FreeMarkerDocProcess.java +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/helper/FreeMarkerDocProcess.java @@ -2,7 +2,8 @@ import java.io.Serializable; -import org.fugerit.java.doc.base.process.DocProcessConfig; +import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig; +import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade; public class FreeMarkerDocProcess implements Serializable { @@ -11,11 +12,11 @@ public class FreeMarkerDocProcess implements Serializable { */ private static final long serialVersionUID = 1277168639030295400L; - public static final String CONFIG_PATH = "cl://fj_doc_freemarker_config/fm-process-config.xml"; + public static final String CONFIG_PATH = "cl://fj_doc_freemarker_config/fm-freemarker-doc-process-config.xml"; - private static DocProcessConfig INSTANCE = DocProcessConfig.loadConfigSafe( CONFIG_PATH ); + private static FreemarkerDocProcessConfig INSTANCE = FreemarkerDocProcessConfigFacade.loadConfigSafe( CONFIG_PATH ); - public static DocProcessConfig getInstance() { + public static FreemarkerDocProcessConfig getInstance() { return INSTANCE; } diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/FreemarkerDocProcessConfigFacade.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/FreemarkerDocProcessConfigFacade.java index e2873319e..abfabd2f0 100644 --- a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/FreemarkerDocProcessConfigFacade.java +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/FreemarkerDocProcessConfigFacade.java @@ -1,5 +1,6 @@ package org.fugerit.java.doc.freemarker.process; +import java.io.InputStreamReader; import java.io.Reader; import java.util.Properties; @@ -7,9 +8,11 @@ import javax.xml.parsers.DocumentBuilderFactory; import org.fugerit.java.core.cfg.ConfigException; +import org.fugerit.java.core.cfg.ConfigRuntimeException; import org.fugerit.java.core.cfg.ConfigurableObject; import org.fugerit.java.core.cfg.helpers.UnsafeHelper; import org.fugerit.java.core.cfg.xml.XmlBeanHelper; +import org.fugerit.java.core.io.helper.StreamHelper; import org.fugerit.java.core.lang.helpers.ClassHelper; import org.fugerit.java.core.lang.helpers.StringUtils; import org.fugerit.java.core.util.filterchain.MiniFilterBase; @@ -44,6 +47,8 @@ public class FreemarkerDocProcessConfigFacade { public static final String STEP_TYPE_FUNCTION = "function"; + public static final String STEP_TYPE_COMPLEX = "complex"; + public static final String STEP_TYPE_MAP = "map"; public static FreemarkerDocProcessConfig newSimpleConfig( String id, String templatePath ) throws ConfigException { @@ -92,6 +97,16 @@ private static DocTypeHandler createHelper( Element docHandlerConfig ) throws Co return res; } + public static FreemarkerDocProcessConfig loadConfigSafe( String configPath ) { + FreemarkerDocProcessConfig config = null; + try ( Reader xmlReader = new InputStreamReader(StreamHelper.resolveStream( configPath ) ) ) { + config = loadConfig(xmlReader); + } catch (Exception e) { + throw new ConfigRuntimeException( e ); + } + return config; + } + public static FreemarkerDocProcessConfig loadConfig( Reader xmlReader ) throws ConfigException { FreemarkerDocProcessConfig result = null; try { @@ -187,11 +202,13 @@ public static FreemarkerDocProcessConfig loadConfig( Reader xmlReader ) throws C } private static final Properties BUILT_IN_STEPS = new Properties(); + public static final Properties BUILT_IN_STEPS_REVERSE = new Properties(); static { BUILT_IN_STEPS.setProperty( STEP_TYPE_CONFIG , FreeMarkerConfigStep.class.getName() ); BUILT_IN_STEPS.setProperty( STEP_TYPE_FUNCTION , FreeMarkerFunctionStep.class.getName() ); - BUILT_IN_STEPS.setProperty( "complex" , FreeMarkerComplexProcessStep.class.getName() ); - BUILT_IN_STEPS.setProperty( "map" , FreeMarkerMapStep.class.getName() ); + BUILT_IN_STEPS.setProperty( STEP_TYPE_COMPLEX , FreeMarkerComplexProcessStep.class.getName() ); + BUILT_IN_STEPS.setProperty( STEP_TYPE_MAP , FreeMarkerMapStep.class.getName() ); + BUILT_IN_STEPS.keySet().stream().forEach( k -> BUILT_IN_STEPS_REVERSE.put( BUILT_IN_STEPS.get( k ) , k ) ); } private static Properties convertConfiguration( Properties props ) { diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/GenerateStub.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/GenerateStub.java new file mode 100644 index 000000000..11717e423 --- /dev/null +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/GenerateStub.java @@ -0,0 +1,98 @@ +package org.fugerit.java.doc.freemarker.tool; + +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.Writer; +import java.util.Properties; + +import org.fugerit.java.core.io.StreamIO; +import org.fugerit.java.core.lang.helpers.StringUtils; +import org.fugerit.java.doc.base.process.DocProcessContext; +import org.fugerit.java.doc.base.process.DocProcessData; +import org.fugerit.java.doc.freemarker.helper.FreeMarkerDocProcess; +import org.fugerit.java.doc.freemarker.tool.model.ConfigModel; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class GenerateStub { + + public static final String ATT_CONFIG_MODEL = "configModel"; + + public static final String CONFIG_STUB_CHAIN_ID = "freemarker-doc-process-config-stub"; + + public static final String ATT_STUB_PARAMS = "stubParams"; + + /** + * Generate the docHandlerConfig stub ('1' = enabled, default = '1') + */ + public static final String PARAM_STUB_HANDLER = "stub-handler"; + + /** + * Generate the docChain stub ('0' = enabled, default = '1') + */ + public static final String PARAM_STUB_CHAIN = "stub-chain"; + + /** + * Enable FOP basic type handler in stub ('1' = enabled, default = '0') + */ + public static final String PARAM_ENABLE_FOP_BASE = "enable-fop-base"; + + /** + * Enable FOP basic type handler in stub ('1' = enabled, default = '0') + */ + public static final String PARAM_ENABLE_FOP_FULL = "enable-fop-full"; + + /** + * Enable POI type handler in stub ('1' = enabled, default = '0') + */ + public static final String PARAM_ENABLE_POI = "enable-poi"; + + /** + * Enable opencsv type handler in stub ('1' = enabled, default = '0') + */ + public static final String PARAM_ENABLE_OPENCSV = "enable-opencsv"; + + /** + * Freemarker config id (default = 'FJ_DOC_STUB') + */ + public static final String PARAM_CONFIG_ID = "config-id"; + + /** + * Freemarker version (default = '2.3.29') + */ + public static final String PARAM_FM_VERSION = "fm-version"; + + /** + * Freemarker template path (default = '/free_marker/') + */ + public static final String PARAM_FM_TEMPLATE_PATH = "fm-template-path"; + + public static final String ARG_INPUT_FILE = "input"; + + public static void generate( Writer out, Properties params ) throws Exception { + String input = params.getProperty(ARG_INPUT_FILE); + if ( StringUtils.isNotEmpty( input ) ) { + try ( InputStream is = new FileInputStream( new File( input ) ) ) { + generate(out, params, is); + } + } else { + generate(out, params, null); + } + } + + public static void generate( Writer out, Properties params, InputStream is ) throws Exception { + ConfigModel configModel = null; + DocProcessData data = new DocProcessData(); + DocProcessContext context = DocProcessContext.newContext( ATT_STUB_PARAMS, params ); + if ( is != null ) { + log.info( "read legacy config model" ); + configModel = LegacyConfigRead.readConfig(is); + context = context.withAtt( ATT_CONFIG_MODEL , configModel ); + } + FreeMarkerDocProcess.getInstance().process( CONFIG_STUB_CHAIN_ID, context, data ); + StreamIO.pipeChar( data.getCurrentXmlReader() , out, StreamIO.MODE_CLOSE_IN_ONLY ); + } + +} diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/LegacyConfigRead.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/LegacyConfigRead.java new file mode 100644 index 000000000..082b9dbd7 --- /dev/null +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/LegacyConfigRead.java @@ -0,0 +1,66 @@ +package org.fugerit.java.doc.freemarker.tool; + +import java.io.InputStream; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import org.fugerit.java.doc.freemarker.config.FreeMarkerProcessStep; +import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade; +import org.fugerit.java.doc.freemarker.tool.model.ChainModel; +import org.fugerit.java.doc.freemarker.tool.model.ConfigModel; +import org.fugerit.java.doc.freemarker.tool.model.StepModel; +import org.w3c.dom.Attr; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.NodeList; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class LegacyConfigRead { + + public static ConfigModel readConfig( InputStream is ) throws Exception { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware( true ); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document inputDoc = parser.parse( is ); + NodeList chainTagList = inputDoc.getDocumentElement().getElementsByTagName( "chain" ); + ConfigModel configModel = new ConfigModel(); + for ( int k=0; k 0 ) { + Element propertyTag = (Element) propertiesTagList.item( 0 ); + NamedNodeMap attMap = propertyTag.getAttributes(); + for ( int j=0; j {}", currentAtt.getName() , currentAtt.getValue() ); + stepModel.getAtts().put( currentAtt.getName() , currentAtt.getValue() ); + } + } + } + } + return configModel; + } + +} diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ChainModel.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ChainModel.java new file mode 100644 index 000000000..d31d6f94a --- /dev/null +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ChainModel.java @@ -0,0 +1,23 @@ +package org.fugerit.java.doc.freemarker.tool.model; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import lombok.Data; + +@Data +public class ChainModel implements Serializable { + + private static final long serialVersionUID = 3421438389573953861L; + + private List stepList; + + private String id; + + public ChainModel( String id ) { + this.setId( id ); + this.stepList = new ArrayList<>(); + } + +} diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ConfigModel.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ConfigModel.java new file mode 100644 index 000000000..af324a5b4 --- /dev/null +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ConfigModel.java @@ -0,0 +1,20 @@ +package org.fugerit.java.doc.freemarker.tool.model; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import lombok.Data; + +@Data +public class ConfigModel implements Serializable { + + private static final long serialVersionUID = 5198896174327509127L; + + private List chainList; + + public ConfigModel() { + this.chainList = new ArrayList<>(); + } + +} diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/StepModel.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/StepModel.java new file mode 100644 index 000000000..8709b4de4 --- /dev/null +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/StepModel.java @@ -0,0 +1,25 @@ +package org.fugerit.java.doc.freemarker.tool.model; + +import java.util.LinkedHashMap; +import java.util.Set; + +import lombok.Data; + +@Data +public class StepModel { + + private String type; + + private LinkedHashMap atts; + + public StepModel(String type) { + super(); + this.type = type; + this.atts = new LinkedHashMap<>(); + } + + public Set getAttNames() { + return this.getAtts().keySet(); + } + +} diff --git a/fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/fm-freemarker-doc-process-config.xml b/fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/fm-freemarker-doc-process-config.xml new file mode 100644 index 000000000..07ad3eedf --- /dev/null +++ b/fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/fm-freemarker-doc-process-config.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/template/freemarker-doc-process-config-stub.ftl b/fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/template/freemarker-doc-process-config-stub.ftl new file mode 100644 index 000000000..712abd448 --- /dev/null +++ b/fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/template/freemarker-doc-process-config-stub.ftl @@ -0,0 +1,136 @@ + + + + + + <#assign stubHandler=stubParams['stub-handler']!'1'> + <#if stubHandler == '1'> + + + + + + + + + + + + + + <#assign enableFopBase=stubParams['enable-fop-base']!'0'> + <#assign enableFopFull=stubParams['enable-fop-full']!'0'> + + + + <#if enableFopBase != '1'> --> + + + <#if enableFopBase != '1'> --> + + + + + <#if enableFopFull != '1'> --> + + + + + <#if enableFopFull != '1'> --> + + <#assign enablePoi=stubParams['enable-poi']!'0'> + + + + <#if enablePoi != '1'>--> + + + <#if enablePoi != '1'>--> + + <#assign enableOpencsv=stubParams['enable-opencsv']!'0'> + + + + <#if enableOpencsv != '1'>--> + + + + + <#assign stubChain=stubParams['stub-chain']!'0'> + <#if stubChain == '1'> + <#assign configId=stubParams['config-id']!'FJ_DOC_STUB'> + <#assign fmVersion=stubParams['fm-version']!'2.3.29'> + <#assign fmTemplatePath=stubParams['fm-template-path']!'/free_marker/'> + + + + + + + + + + + + + + + + + + + <#if (configModel)??> + <#list configModel.chainList as chainModel> + + <#list chainModel.stepList as stepModel> + <#list stepModel.attNames as currentAttName> ${currentAttName}="${stepModel.atts[currentAttName]}"> + <#if stepModel.type == 'map'> + <#list stepModel.attNames as currentAttName> + + + <#elseif stepModel.type == 'config'> + + ${currentAttName}="${stepModel.atts[currentAttName]}" + + /> + <#elseif stepModel.type == 'complex'> + <#else> + + + + + + + + + + diff --git a/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/process/TestFreemarkerGenerateStub.java b/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/process/TestFreemarkerGenerateStub.java new file mode 100644 index 000000000..d0349515d --- /dev/null +++ b/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/process/TestFreemarkerGenerateStub.java @@ -0,0 +1,29 @@ +package test.org.fugerit.java.doc.freemarker.process; + +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.FileWriter; +import java.io.Writer; +import java.util.Properties; + +import org.fugerit.java.doc.freemarker.tool.GenerateStub; +import org.junit.Test; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class TestFreemarkerGenerateStub { + + @Test + public void testGenerateStub() { + try ( Writer writer = new FileWriter( new File( "target/freemarker-doc-process-config-stub.xml" ) ) ) { + GenerateStub.generate(writer, new Properties() ); + } catch (Exception e) { + String message = "Error : "+e; + log.error( message, e ); + fail(message); + } + } + +} diff --git a/fj-doc-lib-autodoc/pom.xml b/fj-doc-lib-autodoc/pom.xml index 2b637eeab..e2cf842d6 100644 --- a/fj-doc-lib-autodoc/pom.xml +++ b/fj-doc-lib-autodoc/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-lib-autodoc diff --git a/fj-doc-lib-simpletable-import/pom.xml b/fj-doc-lib-simpletable-import/pom.xml index 6404d73d7..f22f00a38 100644 --- a/fj-doc-lib-simpletable-import/pom.xml +++ b/fj-doc-lib-simpletable-import/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-lib-simpletable-import diff --git a/fj-doc-lib-simpletable/pom.xml b/fj-doc-lib-simpletable/pom.xml index b6884f066..1aa63b469 100644 --- a/fj-doc-lib-simpletable/pom.xml +++ b/fj-doc-lib-simpletable/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-lib-simpletable diff --git a/fj-doc-mod-fop/pom.xml b/fj-doc-mod-fop/pom.xml index c5a03063f..2ebecb443 100644 --- a/fj-doc-mod-fop/pom.xml +++ b/fj-doc-mod-fop/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-mod-fop diff --git a/fj-doc-mod-opencsv/pom.xml b/fj-doc-mod-opencsv/pom.xml index 6783e890b..295422f24 100644 --- a/fj-doc-mod-opencsv/pom.xml +++ b/fj-doc-mod-opencsv/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-mod-opencsv diff --git a/fj-doc-mod-poi/pom.xml b/fj-doc-mod-poi/pom.xml index 35ab24be1..13c13b676 100644 --- a/fj-doc-mod-poi/pom.xml +++ b/fj-doc-mod-poi/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-mod-poi diff --git a/fj-doc-playground-quarkus/pom.xml b/fj-doc-playground-quarkus/pom.xml index 39dddaeb5..f0adc6771 100644 --- a/fj-doc-playground-quarkus/pom.xml +++ b/fj-doc-playground-quarkus/pom.xml @@ -4,7 +4,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-playground-quarkus diff --git a/fj-doc-sample/pom.xml b/fj-doc-sample/pom.xml index 0e9466efd..fe614d860 100644 --- a/fj-doc-sample/pom.xml +++ b/fj-doc-sample/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-sample diff --git a/fj-doc-tool/CHANGELOG.md b/fj-doc-tool/CHANGELOG.md new file mode 100644 index 000000000..823d96f48 --- /dev/null +++ b/fj-doc-tool/CHANGELOG.md @@ -0,0 +1,4 @@ +# Changelog for module fj-doc-tool + +## version 1.3.1-rc.003 +* generate-stub tool \ No newline at end of file diff --git a/fj-doc-tool/README.md b/fj-doc-tool/README.md new file mode 100644 index 000000000..82b041eca --- /dev/null +++ b/fj-doc-tool/README.md @@ -0,0 +1,45 @@ +# Fugerit Document Generation Framework (fj-doc) + +## Doc tool - utilities (fj-doc-tool) + +[back to fj-doc index](../README.md) + +*Description* : +This modules contains useful tools for the Venus Doc Generation Framework + +*Status* : +generate-stub tool implemented (allows generation of stub configuration of the new freemarker doc process config) + +*[ChangeLog](CHANGELOG.md)* + +*Quickstart* : + +Build : + +``` +mvn clean install -P singlepackage +``` + +Run (sample) : + +``` +java -jar target/dist-fj-doc-tool-1.3.1-rc.002.jar \ + --tool generate-stub \ + --input src/test/resources/convert-config-test/doc-process-sample.xml \ + --output target/new-config.xml +``` + +## reference parameters for tool : generate-stub + +1. output=[required] path to the stub configuration to be generated +2. input=[optional] path to input config file in old model +3. stub-handler=[default='1'] '1' to add the default handlers configuration to the stub +4. stub-chain=[default='0'] '1' to add the default chain to the stub +5. enable-fop-base=[default='0'] '1' will enable basic fop type handlers for .fo and .pdf formats +6. enable-fop-full=[default='0'] '1' will enable full fop type handlers for custon and PDF/A .pdf format (Additional configuration may be required) +7. enable-poi=[default='0'] '1' will enable xls and xlsx formats +8. enable-opencsv=[default='0'] '1' will enable xls and xlsx formats +9. config-id=[default='FJ_DOC_STUB'] The freemarker configuration id to use +10. fm-version=[default='2.3.29'] +11. fm-template-path=[default='/free_marker/'] + diff --git a/fj-doc-tool/pom.xml b/fj-doc-tool/pom.xml new file mode 100644 index 000000000..1e8b77b41 --- /dev/null +++ b/fj-doc-tool/pom.xml @@ -0,0 +1,115 @@ + + 4.0.0 + + fj-doc-tool + + + org.fugerit.java + fj-doc + 1.3.1-rc.003 + + + fj-doc-tool + Fugerit Venus doc tool + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + 2.3.31 + + + + + + + + + + org.fugerit.java + fj-core + + + + org.fugerit.java + fj-doc-base + + + + org.fugerit.java + fj-doc-freemarker + + + + + + https://www.fugerit.org + Fugerit + + + https://www.fugerit.org/perm/venus/ + + + + + singlepackage + + + org.slf4j + slf4j-api + + + org.apache.logging.log4j + log4j-api + + + org.apache.logging.log4j + log4j-core + + + org.apache.logging.log4j + log4j-slf4j2-impl + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + org.fugerit.java.doc.tool.DocTool + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + + + dist-${project.artifactId}-${project.version} + + + + + + + + + diff --git a/fj-doc-tool/src/main/java/org/fugerit/java/doc/tool/DocTool.java b/fj-doc-tool/src/main/java/org/fugerit/java/doc/tool/DocTool.java new file mode 100644 index 000000000..bfcdac079 --- /dev/null +++ b/fj-doc-tool/src/main/java/org/fugerit/java/doc/tool/DocTool.java @@ -0,0 +1,66 @@ +package org.fugerit.java.doc.tool; + +import java.util.Collections; +import java.util.List; +import java.util.Properties; +import java.util.function.Consumer; +import java.util.stream.Collectors; + +import org.fugerit.java.core.cfg.ConfigException; +import org.fugerit.java.core.cli.ArgUtils; +import org.fugerit.java.core.lang.helpers.StringUtils; +import org.fugerit.java.core.util.PropsIO; +import org.fugerit.java.doc.tool.handler.GenerateStubHandler; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class DocTool { + + public static final String ARG_TOOL = "tool"; + + public static final String ARG_HELP = "help"; + + public static final String ARG_TOOL_GENERATE_STUB = "generate-stub"; + + public static void handle( Properties params ) throws Exception { + String toolHandler = params.getProperty( ARG_TOOL ); + if ( StringUtils.isEmpty( toolHandler ) ) { + throw new ConfigException( "Required parameter : "+ARG_TOOL ); + } + Consumer handler = null; + if ( ARG_TOOL_GENERATE_STUB.equalsIgnoreCase( toolHandler ) ) { + handler = new GenerateStubHandler(); + } else { + throw new ConfigException( "Unknown tool : "+toolHandler ); + } + String helpParam = params.getProperty( ARG_HELP ); + if ( helpParam != null ) { + String path = "help/"+toolHandler+".properties"; + Properties helpProps = PropsIO.loadFromClassLoader( path ); + List keySet = helpProps.keySet().stream().map( m -> String.valueOf( m ) ).collect( Collectors.toList() ); + Collections.sort( keySet ); + log.info( "----------------------------------------------------------" ); + log.info( "help params for tool : {}", toolHandler ); + log.info( "----------------------------------------------------------" ); + for ( String k : keySet ) { + log.info( "param : {} -> {}", k, helpProps.getProperty( k ) ); + } + log.info( "----------------------------------------------------------" ); + } else { + handler.accept(params); + } + } + + public static void main( String[] args ) { + log.info( "START" ); + try { + Properties params = ArgUtils.getArgs( args ); + handle(params); + } catch (Exception e) { + log.error( "Error : "+e, e ); + } + log.info( "END" ); + } + +} diff --git a/fj-doc-tool/src/main/java/org/fugerit/java/doc/tool/handler/GenerateStubHandler.java b/fj-doc-tool/src/main/java/org/fugerit/java/doc/tool/handler/GenerateStubHandler.java new file mode 100644 index 000000000..66ad1a220 --- /dev/null +++ b/fj-doc-tool/src/main/java/org/fugerit/java/doc/tool/handler/GenerateStubHandler.java @@ -0,0 +1,34 @@ +package org.fugerit.java.doc.tool.handler; + +import java.io.File; +import java.io.FileWriter; +import java.io.Writer; +import java.util.Properties; +import java.util.function.Consumer; + +import org.fugerit.java.core.cfg.ConfigRuntimeException; +import org.fugerit.java.core.lang.helpers.StringUtils; +import org.fugerit.java.doc.freemarker.tool.GenerateStub; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class GenerateStubHandler implements Consumer { + + public static final String ARG_OUTPUT_FILE = "output"; + + @Override + public void accept(Properties t) { + String output = t.getProperty( ARG_OUTPUT_FILE ); + if ( StringUtils.isEmpty( output ) ) { + throw new ConfigRuntimeException( "Required parameter : "+ARG_OUTPUT_FILE ); + } + log.info( "output file path : {}", output ); + try ( Writer w = new FileWriter( new File( output ) ) ) { + GenerateStub.generate( w, t ); + } catch (Exception e) { + throw new ConfigRuntimeException( "Error generating stub "+e, e ); + } + } + +} diff --git a/fj-doc-tool/src/main/resources/help/generate-stub.properties b/fj-doc-tool/src/main/resources/help/generate-stub.properties new file mode 100644 index 000000000..b757d801c --- /dev/null +++ b/fj-doc-tool/src/main/resources/help/generate-stub.properties @@ -0,0 +1,12 @@ +# additional config params for generate stub helper +output=[required] path to the stub configuration to be generated +input=[optional] path to input config file in old model +stub-handler=[default='1'] '1' to add the default handlers configuration to the stub +stub-chain=[default='0'] '1' to add the default chain to the stub +enable-fop-base=[default='0'] '1' will enable basic fop type handlers for .fo and .pdf formats +enable-fop-full=[default='0'] '1' will enable full fop type handlers for custon and PDF/A .pdf format (Additional configuration may be required) +enable-poi=[default='0'] '1' will enable xls and xlsx formats +enable-opencsv=[default='0'] '1' will enable xls and xlsx formats +config-id=[default='FJ_DOC_STUB'] The freemarker configuration id to use +fm-version=[default='2.3.29'] +fm-template-path=[default='/free_marker/'] diff --git a/fj-doc-tool/src/main/resources/log4j2.xml b/fj-doc-tool/src/main/resources/log4j2.xml new file mode 100644 index 000000000..51b9129fc --- /dev/null +++ b/fj-doc-tool/src/main/resources/log4j2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestConvertConfigTool.java b/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestConvertConfigTool.java new file mode 100644 index 000000000..5633eabd9 --- /dev/null +++ b/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestConvertConfigTool.java @@ -0,0 +1,22 @@ +package test.org.fugerit.java.doc.tool; + +import org.junit.Test; + +public class TestConvertConfigTool extends TestDocTool { + + @Test + public void testConvertConfigFop() { + this.docToolWorker( "src/test/resources/params-test/convert-config-fop.properties" ); + } + + @Test + public void testConvertConfigSample() { + this.docToolWorker( "src/test/resources/params-test/convert-config-sample.properties" ); + } + + @Test + public void testConvertConfigHelp() { + this.docToolWorker( "src/test/resources/params-test/convert-config-help.properties" ); + } + +} diff --git a/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestDocTool.java b/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestDocTool.java new file mode 100644 index 000000000..c7bc34543 --- /dev/null +++ b/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestDocTool.java @@ -0,0 +1,26 @@ +package test.org.fugerit.java.doc.tool; + +import static org.junit.Assert.fail; + +import java.util.Properties; + +import org.fugerit.java.core.util.PropsIO; +import org.fugerit.java.doc.tool.DocTool; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class TestDocTool { + + protected void docToolWorker( String paramsPath ) { + try { + Properties params = PropsIO.loadFromFile( paramsPath ); + DocTool.handle( params ); + } catch (Exception e) { + String message = "Error : "+e; + log.error( message, e ); + fail( message ); + } + } + +} diff --git a/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestGenerateStubTool.java b/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestGenerateStubTool.java new file mode 100644 index 000000000..ba1583a84 --- /dev/null +++ b/fj-doc-tool/src/test/java/test/org/fugerit/java/doc/tool/TestGenerateStubTool.java @@ -0,0 +1,22 @@ +package test.org.fugerit.java.doc.tool; + +import org.junit.Test; + +public class TestGenerateStubTool extends TestDocTool { + + @Test + public void testGenerateStub001() { + this.docToolWorker( "src/test/resources/params-test/generate-stub-001.properties" ); + } + + @Test + public void testGenerateStub002() { + this.docToolWorker( "src/test/resources/params-test/generate-stub-002.properties" ); + } + + @Test + public void testGenerateStubHelp() { + this.docToolWorker( "src/test/resources/params-test/generate-stub-help.properties" ); + } + +} diff --git a/fj-doc-tool/src/test/resources/convert-config-test/doc-process-sample.xml b/fj-doc-tool/src/test/resources/convert-config-test/doc-process-sample.xml new file mode 100644 index 000000000..d5202b3be --- /dev/null +++ b/fj-doc-tool/src/test/resources/convert-config-test/doc-process-sample.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/fm-process-config.xml b/fj-doc-tool/src/test/resources/convert-config-test/fop-process-config.xml similarity index 58% rename from fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/fm-process-config.xml rename to fj-doc-tool/src/test/resources/convert-config-test/fop-process-config.xml index 632ce7df0..e8c2331e1 100644 --- a/fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/fm-process-config.xml +++ b/fj-doc-tool/src/test/resources/convert-config-test/fop-process-config.xml @@ -1,15 +1,15 @@ - + + param01="FJDOC_MOD_FOP_FREEMARKER_CONFIG"> - - - - - - - - - + param01="fop_doc.ftl"/> \ No newline at end of file diff --git a/fj-doc-tool/src/test/resources/log4j2.xml b/fj-doc-tool/src/test/resources/log4j2.xml new file mode 100644 index 000000000..51b9129fc --- /dev/null +++ b/fj-doc-tool/src/test/resources/log4j2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/fj-doc-tool/src/test/resources/params-test/convert-config-fop.properties b/fj-doc-tool/src/test/resources/params-test/convert-config-fop.properties new file mode 100644 index 000000000..6dc17d469 --- /dev/null +++ b/fj-doc-tool/src/test/resources/params-test/convert-config-fop.properties @@ -0,0 +1,5 @@ +# test params for generate stub +tool=generate-stub +input=src/test/resources/convert-config-test/fop-process-config.xml +output=target/fop-new-process-config.xml +stub-handler=0 \ No newline at end of file diff --git a/fj-doc-tool/src/test/resources/params-test/convert-config-help.properties b/fj-doc-tool/src/test/resources/params-test/convert-config-help.properties new file mode 100644 index 000000000..c2e501225 --- /dev/null +++ b/fj-doc-tool/src/test/resources/params-test/convert-config-help.properties @@ -0,0 +1,3 @@ +# test params for generate stub +tool=generate-stub +help= \ No newline at end of file diff --git a/fj-doc-tool/src/test/resources/params-test/convert-config-sample.properties b/fj-doc-tool/src/test/resources/params-test/convert-config-sample.properties new file mode 100644 index 000000000..b2b60f666 --- /dev/null +++ b/fj-doc-tool/src/test/resources/params-test/convert-config-sample.properties @@ -0,0 +1,8 @@ +# test params for generate stub +tool=generate-stub +input=src/test/resources/convert-config-test/doc-process-sample.xml +output=target/sample-new-process-config.xml +enable-opencsv=1 +enable-fop-base=1 +enable-fop-full=0 +enable-poi=1 \ No newline at end of file diff --git a/fj-doc-tool/src/test/resources/params-test/generate-stub-001.properties b/fj-doc-tool/src/test/resources/params-test/generate-stub-001.properties new file mode 100644 index 000000000..71cc95496 --- /dev/null +++ b/fj-doc-tool/src/test/resources/params-test/generate-stub-001.properties @@ -0,0 +1,4 @@ +# test params for generate stub +tool=generate-stub +output=target/freemarker-doc-config-stub-001.xml +stub-chain=1 \ No newline at end of file diff --git a/fj-doc-tool/src/test/resources/params-test/generate-stub-002.properties b/fj-doc-tool/src/test/resources/params-test/generate-stub-002.properties new file mode 100644 index 000000000..896498c38 --- /dev/null +++ b/fj-doc-tool/src/test/resources/params-test/generate-stub-002.properties @@ -0,0 +1,11 @@ +# test params for generate stub +tool=generate-stub +output=target/freemarker-doc-config-stub-002.xml +stub-chain=1 +config-id=FJ_DOC_STUB_002 +fm-version=2.3.31 +fm-template-path=/free_marker/ +enable-opencsv=1 +enable-fop-base=1 +enable-fop-full=0 +enable-poi=1 \ No newline at end of file diff --git a/fj-doc-tool/src/test/resources/params-test/generate-stub-help.properties b/fj-doc-tool/src/test/resources/params-test/generate-stub-help.properties new file mode 100644 index 000000000..c2e501225 --- /dev/null +++ b/fj-doc-tool/src/test/resources/params-test/generate-stub-help.properties @@ -0,0 +1,3 @@ +# test params for generate stub +tool=generate-stub +help= \ No newline at end of file diff --git a/fj-doc-val-core/pom.xml b/fj-doc-val-core/pom.xml index e0b0a4a08..25ac0728b 100644 --- a/fj-doc-val-core/pom.xml +++ b/fj-doc-val-core/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-val-core diff --git a/fj-doc-val-pdfbox/pom.xml b/fj-doc-val-pdfbox/pom.xml index b67a5e046..66b4143e9 100644 --- a/fj-doc-val-pdfbox/pom.xml +++ b/fj-doc-val-pdfbox/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-val-pdfbox diff --git a/fj-doc-val-poi/pom.xml b/fj-doc-val-poi/pom.xml index 7cbec28c5..0a2a29f9b 100644 --- a/fj-doc-val-poi/pom.xml +++ b/fj-doc-val-poi/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-val-poi diff --git a/fj-doc-val/pom.xml b/fj-doc-val/pom.xml index c7ac80a2c..a1f897359 100644 --- a/fj-doc-val/pom.xml +++ b/fj-doc-val/pom.xml @@ -7,7 +7,7 @@ org.fugerit.java fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 fj-doc-val diff --git a/pom.xml b/pom.xml index 9de1bca0c..4cfa77545 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ fj-doc - 1.3.1-rc.002 + 1.3.1-rc.003 pom fj-doc @@ -88,6 +88,7 @@ fj-doc-val-pdfbox fj-doc-val-poi fj-doc-val + fj-doc-tool fj-doc-sample fj-doc-bom-core fj-doc-bom-fop