Skip to content

Commit b246cf3

Browse files
authored
Merge pull request #524 from fugerit-org/523-chore-handling-producer-for-pdf-handlers
feat: handling producer #523
2 parents 57412c7 + f294dad commit b246cf3

File tree

15 files changed

+289
-63
lines changed

15 files changed

+289
-63
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- info 'doc-producer' <https://github.com/fugerit-org/fj-doc/issues/523>
13+
1014
## [8.16.6] - 2025-10-02
1115

1216
### Added

docs/html/doc_meta_info.html

Lines changed: 71 additions & 53 deletions
Large diffs are not rendered by default.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package org.fugerit.java.doc.base.config;
2+
3+
import org.fugerit.java.core.util.mvn.FJCoreMaven;
4+
import org.fugerit.java.core.util.mvn.MavenProps;
5+
6+
import java.util.Optional;
7+
8+
public class VenusVersion {
9+
10+
private VenusVersion() {}
11+
12+
public static final String FJ_DOC_BASE_ARTIFACT_ID = "fj-doc-base";
13+
14+
public static final String NOT_AVAILABLE = "NA";
15+
16+
public static final String VENUS_CREATOR = String.format( "%s (https://github.com/fugerit-org/fj-doc)", DocConfig.FUGERIT_VENUS_DOC );
17+
18+
public static final String VENUS_PRODUCER_FORMAT = "%s (%s) over %s (%s)";
19+
20+
public static Optional<String> getFjDocCoreVersion() {
21+
return getFjDocModuleVersion( FJ_DOC_BASE_ARTIFACT_ID );
22+
}
23+
24+
public static String getFjDocCoreVersionS() {
25+
return getFjDocCoreVersion().orElse( NOT_AVAILABLE );
26+
}
27+
28+
public static Optional<String> getFjDocModuleVersion( String artifactId ) {
29+
return MavenProps.getPropertyOptional(FJCoreMaven.FJ_CORE_GROUP_ID, artifactId, MavenProps.VERSION );
30+
}
31+
32+
public static String getFjDocModuleVersionS( String artifactId ) {
33+
return getFjDocModuleVersion( artifactId ).orElse( NOT_AVAILABLE );
34+
}
35+
36+
}

fj-doc-base/src/main/java/org/fugerit/java/doc/base/model/DocBase.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ public String getInfoDocCreator() {
163163
return this.getStableInfo().getProperty( DocInfo.INFO_DOC_CREATOR );
164164
}
165165

166+
public String getInfoDocProducer() {
167+
return this.getStableInfo().getProperty( DocInfo.INFO_DOC_PRODUCER );
168+
}
169+
166170
public String getInfoDocLanguage() {
167171
return this.getStableInfo().getProperty( DocInfo.INFO_DOC_LANGUAGE );
168172
}

fj-doc-base/src/main/java/org/fugerit/java/doc/base/model/DocInfo.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ public DocInfo() {
6161
* See {@link GenericConsts#INFO_KEY_DOC_CREATOR}.
6262
*/
6363
public static final String INFO_DOC_CREATOR = GenericConsts.INFO_KEY_DOC_CREATOR;
64+
65+
/**
66+
* See {@link GenericConsts#INFO_KEY_DOC_PRODUCER}.
67+
*/
68+
public static final String INFO_DOC_PRODUCER = GenericConsts.INFO_KEY_DOC_PRODUCER;
6469

6570
/**
6671
* See {@link GenericConsts#INFO_KEY_DOC_LANGUAGE}.

fj-doc-base/src/main/java/org/fugerit/java/doc/base/typehelper/generic/GenericConsts.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ private GenericConsts() {}
5050
* @since 1.0
5151
*/
5252
public static final String INFO_KEY_DOC_CREATOR = "doc-creator";
53+
54+
/**
55+
* <a href="https://venusdocs.fugerit.org/docs/html/doc_meta_info.html#doc-producer">See 'doc-producer' documentation</a>
56+
*
57+
* @since 1.0
58+
*/
59+
public static final String INFO_KEY_DOC_PRODUCER = "doc-producer";
5360

5461
/**
5562
* <a href="https://venusdocs.fugerit.org/docs/html/doc_meta_info.html#doc-language">See 'doc-language' documentation</a>

fj-doc-base/src/main/resources/META-INF/native-image/org.fugerit.java/fj-doc-base/reflect-config.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@
162162
}, {
163163
"name" : "getInfoDocLanguage",
164164
"parameterTypes" : [ ]
165+
}, {
166+
"name" : "getInfoDocProducer",
167+
"parameterTypes" : [ ]
165168
}, {
166169
"name" : "getInfoDocSubject",
167170
"parameterTypes" : [ ]
@@ -3070,6 +3073,51 @@
30703073
"name" : "wait",
30713074
"parameterTypes" : [ "long", "int" ]
30723075
} ]
3076+
}, {
3077+
"condition" : {
3078+
"typeReachable" : "org.fugerit.java.doc.base.facade.DocFacadeSource"
3079+
},
3080+
"name" : "org.fugerit.java.doc.base.config.VenusVersion",
3081+
"methods" : [ {
3082+
"name" : "equals",
3083+
"parameterTypes" : [ "java.lang.Object" ]
3084+
}, {
3085+
"name" : "getClass",
3086+
"parameterTypes" : [ ]
3087+
}, {
3088+
"name" : "getFjDocCoreVersion",
3089+
"parameterTypes" : [ ]
3090+
}, {
3091+
"name" : "getFjDocCoreVersionS",
3092+
"parameterTypes" : [ ]
3093+
}, {
3094+
"name" : "getFjDocModuleVersion",
3095+
"parameterTypes" : [ "java.lang.String" ]
3096+
}, {
3097+
"name" : "getFjDocModuleVersionS",
3098+
"parameterTypes" : [ "java.lang.String" ]
3099+
}, {
3100+
"name" : "hashCode",
3101+
"parameterTypes" : [ ]
3102+
}, {
3103+
"name" : "notify",
3104+
"parameterTypes" : [ ]
3105+
}, {
3106+
"name" : "notifyAll",
3107+
"parameterTypes" : [ ]
3108+
}, {
3109+
"name" : "toString",
3110+
"parameterTypes" : [ ]
3111+
}, {
3112+
"name" : "wait",
3113+
"parameterTypes" : [ ]
3114+
}, {
3115+
"name" : "wait",
3116+
"parameterTypes" : [ "long" ]
3117+
}, {
3118+
"name" : "wait",
3119+
"parameterTypes" : [ "long", "int" ]
3120+
} ]
30733121
}, {
30743122
"condition" : {
30753123
"typeReachable" : "org.fugerit.java.doc.base.facade.DocFacadeSource"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package test.org.fugerit.java.doc.base.config;
2+
3+
import org.fugerit.java.doc.base.config.VenusVersion;
4+
import org.junit.jupiter.api.Assertions;
5+
import org.junit.jupiter.api.Test;
6+
7+
class TestVenusVersion {
8+
9+
@Test
10+
void testVersion() {
11+
Assertions.assertNotNull( VenusVersion.getFjDocCoreVersionS() );
12+
Assertions.assertNotNull( VenusVersion.getFjDocModuleVersionS( "fj-doc-base" ) );
13+
}
14+
15+
}

fj-doc-base/src/test/java/test/org/fugerit/java/doc/base/model/TestDocBase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ void test1() {
3838
log.info( "info 8 : {}", docBase.isUseFooter() );
3939
log.info( "info 9 : {}", docBase.isUseHeader() );
4040
log.info( "info 10 : {}", docBase.getInfoDocCreator() );
41+
log.info( "info 11 : {}", docBase.getInfoDocProducer() );
4142
docBase.setDocHeader( new DocHeader() );
4243
docBase.setDocFooter( new DocFooter() );
4344
log.info( "info 8 : {}", docBase.isUseFooter() );

fj-doc-guide/src/main/docs/asciidoc/chapters/03_4_doc_format_info.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ For instance in this document we set following _info_ elements :
1111
* doc-title
1212
* doc-author
1313
* doc-language
14+
* doc-creator
15+
* doc-producer
1416
1517
Some DocHandler will ignore some info elements.
1618

0 commit comments

Comments
 (0)