Skip to content

Commit b1fe815

Browse files
committed
Merge branch 'develop'
2 parents e236030 + 8f1dc3f commit b1fe815

File tree

8 files changed

+47
-6
lines changed

8 files changed

+47
-6
lines changed

docgen/parameters.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"title" : "Venus (Fugerit Document Generation Framework)",
33
"name": "Venus",
4-
"version" : "1.3.1-rc.003",
5-
"date" : "18/07/2023",
4+
"version" : "1.3.1-rc.004",
5+
"date" : "19/07/2023",
66
"organization" : {
77
"name" : "Fugerit Org",
88
"url" : "https://www.fugerit.org"

docgen/release-notes.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
1.3.1-rc.003 (2023-07-18)
1+
1.3.1-rc.004 (2023-07-19)
2+
------------------
3+
+ Fix chain parent handling
4+
+ Fix xsd for attribute mapping of complex
5+
6+
1.3.1-rc.003 (2023-07-18)
27
------------------
38
+ Freemarker html type handler converted to new configuration model
49
+ Configuration stub for freemarker configuration model

fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/LegacyConfigRead.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import javax.xml.parsers.DocumentBuilder;
66
import javax.xml.parsers.DocumentBuilderFactory;
77

8+
import org.fugerit.java.core.lang.helpers.StringUtils;
89
import org.fugerit.java.doc.freemarker.config.FreeMarkerProcessStep;
910
import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade;
1011
import org.fugerit.java.doc.freemarker.tool.model.ChainModel;
@@ -31,8 +32,12 @@ public static ConfigModel readConfig( InputStream is ) throws Exception {
3132
for ( int k=0; k<chainTagList.getLength(); k++ ) {
3233
Element currentChainTag = (Element) chainTagList.item( k );
3334
String chainId = currentChainTag.getAttribute( "id" );
35+
String extendsAtt = currentChainTag.getAttribute( "extends" );
3436
log.info( "current chain id {}", chainId );
3537
ChainModel chainModel = new ChainModel(chainId);
38+
if ( StringUtils.isNotEmpty( extendsAtt ) ) {
39+
chainModel.setParent( extendsAtt );
40+
}
3641
configModel.getChainList().add(chainModel);
3742
NodeList stepTagList = currentChainTag.getElementsByTagName( "step" );
3843
for ( int i=0; i<stepTagList.getLength(); i++ ) {

fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ChainModel.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class ChainModel implements Serializable {
1515

1616
private String id;
1717

18+
private String parent;
19+
1820
public ChainModel( String id ) {
1921
this.setId( id );
2022
this.stepList = new ArrayList<>();

fj-doc-freemarker/src/main/resources/config_fm_xsd/freemarker-doc-process-1-0.xsd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* @project : org.fugerit.java.doc.base
88
* @creation : 2023-07-12
9-
* @version : 1.0.0-rc.002 (2023-07-13)
9+
* @version : 1.0.0-rc.003 (2023-07-19)
1010
*
1111
* XSD for Freemarker Doc Process Configuration
1212
*/
@@ -135,6 +135,11 @@
135135
<xsd:documentation>Can be a java type value implementing DocProcessorBasic or a fixed value for 'config', 'map', 'function', 'complex'</xsd:documentation>
136136
</xsd:annotation>
137137
</xsd:attribute>
138+
<xsd:attribute name="map-atts" type="xsd:string" use="optional">
139+
<xsd:annotation>
140+
<xsd:documentation>Comma separated list of attributes to map or 'map-all' to map all attributes</xsd:documentation>
141+
</xsd:annotation>
142+
</xsd:attribute>
138143
<xsd:attribute name="template-path" type="xsd:string" use="optional">
139144
<xsd:annotation>
140145
<xsd:documentation>Free marker template path</xsd:documentation>

fj-doc-freemarker/src/main/resources/fj_doc_freemarker_config/template/freemarker-doc-process-config-stub.ftl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="https://freemarkerdocprocess.fugerit.org https://www.fugerit.org/data/java/doc/xsd/freemarker-doc-process-1-0.xsd" >
66

77
<!--
8-
Configuration stub version : 002 (2023-07-18)
8+
Configuration stub version : 003 (2023-07-19)
99
-->
1010

1111
<#assign stubHandler=stubParams['stub-handler']!'1'>
@@ -109,7 +109,7 @@
109109

110110
<#if (configModel)??>
111111
<#list configModel.chainList as chainModel>
112-
<docChain id="${chainModel.id}">
112+
<docChain id="${chainModel.id}"<#if (chainModel.parent)??> parent="${chainModel.parent}"</#if>>
113113
<#list chainModel.stepList as stepModel>
114114
<chainStep stepType="${stepModel.type}"<#if stepModel.type == 'complex'><#list stepModel.attNames as currentAttName> ${currentAttName}="${stepModel.atts[currentAttName]}"</#list></#if>>
115115
<#if stepModel.type == 'map'>
@@ -122,6 +122,10 @@
122122
${currentAttName}="${stepModel.atts[currentAttName]}"
123123
</#list>
124124
/>
125+
<#elseif stepModel.type == 'function'>
126+
<#list stepModel.attNames as currentAttName>
127+
<function name="${currentAttName}" value="${stepModel.atts[currentAttName]}"/>
128+
</#list>
125129
<#elseif stepModel.type == 'complex'>
126130
<#else>
127131
<!-- custom step, additional configuration may be needed -->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package test.org.fugerit.java.doc.tool;
2+
3+
import org.junit.Test;
4+
5+
public class TestGenerateHelperTool extends TestDocTool {
6+
7+
@Test
8+
public void testGenerateHelper() {
9+
this.docToolWorker( "src/test/resources/params-test/test-generate-helper.properties" );
10+
}
11+
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# test params for generate stub
2+
tool=generate-stub
3+
input=src/test/resources/convert-config-test/doc-process-sample.xml
4+
output=target/sample-new-process-config.xml
5+
enable-opencsv=1
6+
enable-fop-base=1
7+
enable-fop-full=0
8+
enable-poi=1

0 commit comments

Comments
 (0)