Skip to content

Commit bb9602a

Browse files
iText-CIAnhelinaM
authored andcommitted
[RELEASE] iText 7 7.2.3
2 parents d357d56 + 91f3da7 commit bb9602a

File tree

210 files changed

+5049
-998
lines changed

Some content is hidden

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

210 files changed

+5049
-998
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*.xht text eol=lf
2121
*.xhtml text eol=lf
2222
*.xml text eol=lf
23+
*.json text eol=lf
2324
port-hash text eol=lf
2425

2526
# Declare files that will always have CRLF line endings on checkout.

barcodes/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>7.2.2</version>
7+
<version>7.2.3</version>
88
</parent>
99
<artifactId>barcodes</artifactId>
1010
<name>iText 7 - barcodes</name>

commons/pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>7.2.2</version>
7+
<version>7.2.3</version>
88
</parent>
99
<artifactId>commons</artifactId>
1010
<name>iText 7 - commons</name>
1111
<url>https://itextpdf.com/</url>
1212

13+
<properties>
14+
<jackson.core.version>2.13.3</jackson.core.version>
15+
</properties>
16+
1317
<dependencies>
18+
<dependency>
19+
<groupId>com.fasterxml.jackson.core</groupId>
20+
<artifactId>jackson-databind</artifactId>
21+
<version>${jackson.core.version}</version>
22+
<optional>true</optional>
23+
</dependency>
24+
1425
<dependency>
1526
<groupId>com.itextpdf</groupId>
1627
<artifactId>pdftest</artifactId>

commons/src/main/java/com/itextpdf/commons/actions/EventManager.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This file is part of the iText (R) project.
2222
*/
2323
package com.itextpdf.commons.actions;
2424

25+
import com.itextpdf.commons.actions.processors.UnderAgplProductProcessorFactory;
2526
import com.itextpdf.commons.exceptions.AggregatedException;
2627

2728
import java.util.ArrayList;
@@ -51,6 +52,16 @@ public static EventManager getInstance() {
5152
return INSTANCE;
5253
}
5354

55+
/**
56+
* Deliberately turns off the warning message about AGPL usage.
57+
*
58+
* <p>
59+
* <b> Important note. Calling of this method means that the terms of AGPL license are met. </b>
60+
*/
61+
public static void acknowledgeAgplUsageDisableWarningMessage() {
62+
ProductProcessorFactoryKeeper.setProductProcessorFactory(new UnderAgplProductProcessorFactory());
63+
}
64+
5465
/**
5566
* Handles the event.
5667
*

commons/src/main/java/com/itextpdf/commons/actions/ProductEventHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ This file is part of the iText (R) project.
2525
import com.itextpdf.commons.actions.confirmations.ConfirmEvent;
2626
import com.itextpdf.commons.actions.confirmations.ConfirmedEventWrapper;
2727
import com.itextpdf.commons.actions.contexts.UnknownContext;
28-
import com.itextpdf.commons.actions.processors.DefaultITextProductEventProcessor;
2928
import com.itextpdf.commons.actions.processors.ITextProductEventProcessor;
3029
import com.itextpdf.commons.actions.sequence.SequenceId;
3130
import com.itextpdf.commons.exceptions.ProductEventHandlerRepeatException;
@@ -97,7 +96,7 @@ ITextProductEventProcessor getActiveProcessor(String productName) {
9796
}
9897

9998
if (ProductNameConstant.PRODUCT_NAMES.contains(productName)) {
100-
processor = new DefaultITextProductEventProcessor(productName);
99+
processor = ProductProcessorFactoryKeeper.getProductProcessorFactory().createProcessor(productName);
101100
processors.put(productName, processor);
102101
return processor;
103102
} else {
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2022 iText Group NV
4+
Authors: iText Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
package com.itextpdf.commons.actions;
24+
25+
import com.itextpdf.commons.actions.processors.DefaultProductProcessorFactory;
26+
import com.itextpdf.commons.actions.processors.IProductProcessorFactory;
27+
28+
/**
29+
* Helper class which allow to change used product processor factory instance.
30+
*/
31+
final class ProductProcessorFactoryKeeper {
32+
private static final IProductProcessorFactory DEFAULT_FACTORY = new DefaultProductProcessorFactory();
33+
private static IProductProcessorFactory productProcessorFactory = DEFAULT_FACTORY;
34+
35+
private ProductProcessorFactoryKeeper() {
36+
// do nothing
37+
}
38+
39+
/**
40+
* Sets product processor factory instance.
41+
*
42+
* @param productProcessorFactory the instance to be set
43+
*/
44+
static void setProductProcessorFactory(IProductProcessorFactory productProcessorFactory) {
45+
ProductProcessorFactoryKeeper.productProcessorFactory = productProcessorFactory;
46+
}
47+
48+
/**
49+
* Restores default factory.
50+
*/
51+
static void restoreDefaultProductProcessorFactory() {
52+
ProductProcessorFactoryKeeper.productProcessorFactory = DEFAULT_FACTORY;
53+
}
54+
55+
/**
56+
* Gets reporting product processor factory instance.
57+
*
58+
* @return the product processor factory instance
59+
*/
60+
static IProductProcessorFactory getProductProcessorFactory() {
61+
return productProcessorFactory;
62+
}
63+
}

commons/src/main/java/com/itextpdf/commons/actions/data/CommonsProductData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This file is part of the iText (R) project.
2828
public final class CommonsProductData {
2929
static final String COMMONS_PUBLIC_PRODUCT_NAME = "Commons";
3030
static final String COMMONS_PRODUCT_NAME = "commons";
31-
static final String COMMONS_VERSION = "7.2.2";
31+
static final String COMMONS_VERSION = "7.2.3";
3232
static final int COMMONS_COPYRIGHT_SINCE = 2000;
3333
static final int COMMONS_COPYRIGHT_TO = 2022;
3434

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2022 iText Group NV
4+
Authors: iText Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
package com.itextpdf.commons.actions.processors;
24+
25+
/**
26+
* Default factory class to construct {@link ITextProductEventProcessor} instance.
27+
*/
28+
public class DefaultProductProcessorFactory implements IProductProcessorFactory {
29+
30+
/**
31+
* Creates default product processor using a product name.
32+
*
33+
* @param productName the product which will be handled by this processor
34+
*
35+
* @return current {@link ITextProductEventProcessor} instance
36+
*/
37+
@Override
38+
public ITextProductEventProcessor createProcessor(String productName) {
39+
return new DefaultITextProductEventProcessor(productName);
40+
}
41+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2022 iText Group NV
4+
Authors: iText Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
package com.itextpdf.commons.actions.processors;
24+
25+
/**
26+
* Class represents a factory for {@link ITextProductEventProcessor} objects.
27+
*/
28+
public interface IProductProcessorFactory {
29+
/**
30+
* Creates product processor using a product name.
31+
*
32+
* @param productName the product which will be handled by this processor
33+
*
34+
* @return the processor instance
35+
*/
36+
ITextProductEventProcessor createProcessor(String productName);
37+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2022 iText Group NV
4+
Authors: iText Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
package com.itextpdf.commons.actions.processors;
24+
25+
import com.itextpdf.commons.actions.AbstractProductProcessITextEvent;
26+
27+
/**
28+
* The class defines an under APGL strategy of product event processing.
29+
*/
30+
public class UnderAgplITextProductEventProcessor extends AbstractITextProductEventProcessor{
31+
/**
32+
* Creates a new instance of under AGPL processor for the provided product.
33+
*
34+
* @param productName the product which will be handled by this processor
35+
*/
36+
public UnderAgplITextProductEventProcessor(String productName) {
37+
super(productName);
38+
}
39+
40+
@Override
41+
public void onEvent(AbstractProductProcessITextEvent event) {
42+
// do nothing
43+
}
44+
45+
@Override
46+
public String getUsageType() {
47+
return "AGPL";
48+
}
49+
}

0 commit comments

Comments
 (0)