Skip to content

Commit 0419cc4

Browse files
authored
update javadocs (#200)
2 parents ad44a1e + 1764691 commit 0419cc4

File tree

86 files changed

+2428
-941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2428
-941
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/maven.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,32 @@
44
name: Java CI with Maven
55

66
on:
7+
workflow_dispatch:
78
push:
89
branches: [ "master" ]
910
pull_request:
1011
branches: [ "master" ]
12+
schedule:
13+
- cron: '* 11 * * 1'
1114

1215
permissions:
1316
pull-requests: read
1417

1518
jobs:
16-
build:
17-
19+
ci:
20+
name: Continuous Integration
1821
runs-on: ubuntu-latest
22+
permissions:
23+
actions: read
24+
contents: read
25+
security-events: write
1926

27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
version: [ '17', '18', '19', '20' ]
31+
language: [ 'java' ]
32+
2033
steps:
2134
- uses: actions/checkout@v3
2235
with:
@@ -25,7 +38,7 @@ jobs:
2538
- name: Set up JDK
2639
uses: actions/setup-java@v3
2740
with:
28-
java-version: '17'
41+
java-version: ${{ matrix.version }}
2942
distribution: 'temurin'
3043
cache: 'maven'
3144

@@ -42,10 +55,18 @@ jobs:
4255
path: ~/.m2
4356
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4457
restore-keys: ${{ runner.os }}-m2
45-
58+
59+
- name: Initialize CodeQL
60+
uses: github/codeql-action/init@v2
61+
with:
62+
languages: ${{ matrix.language }}
63+
4664
- name: Build with Maven
4765
env:
4866
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4967
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5068
SONAR_HOST_URL: https://sonarcloud.io
5169
run: mvn --batch-mode --no-transfer-progress package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.organization=verronpro
70+
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v2

pom.xml

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@
150150
<version>3.5.0</version>
151151
<configuration>
152152
<encoding>UTF-8</encoding>
153-
<failOnError>false</failOnError>
154153
</configuration>
155154
<executions>
156155
<execution>
@@ -205,8 +204,6 @@
205204
</dependency>
206205
</dependencies>
207206
</plugin>
208-
209-
210207

211208
<plugin>
212209
<groupId>org.jacoco</groupId>
@@ -225,11 +222,11 @@
225222
<goals>
226223
<goal>report</goal>
227224
</goals>
228-
<configuration>
229-
<formats>
230-
<format>XML</format>
231-
</formats>
232-
</configuration>
225+
<configuration>
226+
<formats>
227+
<format>XML</format>
228+
</formats>
229+
</configuration>
233230
</execution>
234231
</executions>
235232
</plugin>
@@ -247,19 +244,11 @@
247244
<groupId>org.apache.maven.plugins</groupId>
248245
<artifactId>maven-project-info-reports-plugin</artifactId>
249246
<version>3.4.5</version>
250-
<configuration>
251-
<inputEncoding>UTF-8</inputEncoding>
252-
<outputEncoding>UTF-8</outputEncoding>
253-
</configuration>
254247
</plugin>
255248
<plugin>
256249
<groupId>org.apache.maven.plugins</groupId>
257250
<artifactId>maven-javadoc-plugin</artifactId>
258251
<version>3.5.0</version>
259-
<configuration>
260-
<encoding>UTF-8</encoding>
261-
<failOnError>false</failOnError>
262-
</configuration>
263252
<reportSets>
264253
<reportSet>
265254
<reports>
@@ -272,6 +261,7 @@
272261
<plugin>
273262
<groupId>org.jacoco</groupId>
274263
<artifactId>jacoco-maven-plugin</artifactId>
264+
<version>0.8.10</version>
275265
<reportSets>
276266
<reportSet>
277267
<reports>
@@ -295,13 +285,6 @@
295285
<artifactId>docx4j-core</artifactId>
296286
<version>11.4.9</version>
297287
</dependency>
298-
<dependency>
299-
<groupId>org.projectlombok</groupId>
300-
<artifactId>lombok</artifactId>
301-
<version>1.18.28</version>
302-
<optional>true</optional>
303-
<scope>provided</scope>
304-
</dependency>
305288
<dependency>
306289
<groupId>org.javassist</groupId>
307290
<artifactId>javassist</artifactId>

src/main/java/org/wickedsource/docxstamper/CommentProcessorBuilder.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
import org.wickedsource.docxstamper.replace.PlaceholderReplacer;
44

5+
/**
6+
* Factory interface for creating {@link org.wickedsource.docxstamper.api.commentprocessor.ICommentProcessor} instances.
7+
*
8+
* @author joseph
9+
* @version $Id: $Id
10+
*/
511
public interface CommentProcessorBuilder {
12+
/**
13+
* Creates a {@link org.wickedsource.docxstamper.api.commentprocessor.ICommentProcessor} instance.
14+
*
15+
* @param placeholderReplacer the placeholder replacer that should be used by the comment processor.
16+
* @return a {@link org.wickedsource.docxstamper.api.commentprocessor.ICommentProcessor} instance.
17+
*/
618
Object create(PlaceholderReplacer placeholderReplacer);
719
}

src/main/java/org/wickedsource/docxstamper/DocxStamper.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.wickedsource.docxstamper.replace.typeresolver.image.Image;
2222
import org.wickedsource.docxstamper.replace.typeresolver.image.ImageResolver;
2323
import pro.verron.docxstamper.OpcStamper;
24-
import pro.verron.docxstamper.StamperFactory;
2524

2625
import java.io.InputStream;
2726
import java.io.OutputStream;
@@ -39,6 +38,9 @@
3938
* Main class of the docx-stamper library. This class can be used to "stamp" .docx templates
4039
* to create a .docx document filled with custom data at runtime.
4140
* </p>
41+
*
42+
* @author joseph
43+
* @version $Id: $Id
4244
*/
4345
public class DocxStamper<T> implements OpcStamper<WordprocessingMLPackage> {
4446
private final List<PreProcessor> preprocessors;
@@ -48,7 +50,7 @@ public class DocxStamper<T> implements OpcStamper<WordprocessingMLPackage> {
4850
/**
4951
* Creates a new DocxStamper with the default configuration.
5052
*
51-
* @deprecated since 1.6.4, use {@link StamperFactory#newDocxStamper()} or {@link StamperFactory#nopreprocessingDocxStamper()} instead.
53+
* @deprecated since 1.6.4, use {@link pro.verron.docxstamper.StamperFactory#newDocxStamper()} or {@link pro.verron.docxstamper.StamperFactory#nopreprocessingDocxStamper()} instead.
5254
*/
5355
@Deprecated(since = "1.6.4", forRemoval = true)
5456
public DocxStamper() {
@@ -165,6 +167,8 @@ private static TypedValue throwException(ReflectiveOperationException exception)
165167
}
166168

167169
/**
170+
* {@inheritDoc}
171+
*
168172
* <p>
169173
* Reads in a .docx template and "stamps" it into the given OutputStream, using the specified context object to
170174
* fill out any expressions it finds.
@@ -191,11 +195,6 @@ private static TypedValue throwException(ReflectiveOperationException exception)
191195
* If you need a wider vocabulary of methods available in the comments, you can create your own ICommentProcessor
192196
* and register it via getCommentProcessorRegistry().addCommentProcessor().
193197
* </p>
194-
*
195-
* @param template the .docx template.
196-
* @param contextRoot the context root object against which all expressions found in the template are evaluated.
197-
* @param out the output stream in which to write the resulting .docx document.
198-
* @throws DocxStamperException in case of an error.
199198
*/
200199
public void stamp(InputStream template, Object contextRoot, OutputStream out) throws DocxStamperException {
201200
try {
@@ -208,13 +207,10 @@ public void stamp(InputStream template, Object contextRoot, OutputStream out) th
208207

209208

210209
/**
210+
* {@inheritDoc}
211+
*
211212
* Same as stamp(InputStream, T, OutputStream) except that you may pass in a DOCX4J document as a template instead
212213
* of an InputStream.
213-
*
214-
* @param document the .docx template.
215-
* @param contextRoot the context root object against which all expressions found in the template are evaluated.
216-
* @param out the output stream in which to write the resulting .docx document.
217-
* @throws DocxStamperException in case of an error.
218214
*/
219215
@Override
220216
public void stamp(WordprocessingMLPackage document, Object contextRoot, OutputStream out) throws DocxStamperException {

0 commit comments

Comments
 (0)