File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
fj-doc-freemarker/src/main
java/org/fugerit/java/doc/freemarker/tool
resources/fj_doc_freemarker_config/template Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 55import javax .xml .parsers .DocumentBuilder ;
66import javax .xml .parsers .DocumentBuilderFactory ;
77
8+ import org .fugerit .java .core .lang .helpers .StringUtils ;
89import org .fugerit .java .doc .freemarker .config .FreeMarkerProcessStep ;
910import org .fugerit .java .doc .freemarker .process .FreemarkerDocProcessConfigFacade ;
1011import 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 ++ ) {
Original file line number Diff line number Diff 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 <>();
Original file line number Diff line number Diff line change 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'>
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' >
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 -->
You can’t perform that action at this time.
0 commit comments