Skip to content

Commit 9643dcd

Browse files
BezrukovMiText-CI
authored andcommitted
Deprecate svg node renderer mapper interface
DEVSIX-4157
1 parent d34dbbb commit 9643dcd

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

svg/src/main/java/com/itextpdf/svg/renderers/factories/DefaultSvgNodeRendererFactory.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ public class DefaultSvgNodeRendererFactory implements ISvgNodeRendererFactory {
6767
private Collection<String> ignoredTags = new HashSet<>();
6868

6969
/**
70-
* Default constructor which uses the default {@link ISvgNodeRendererMapper}
71-
* implementation.
70+
* Default constructor with default {@link ISvgNodeRenderer} creation logic.
7271
*/
7372
public DefaultSvgNodeRendererFactory() {
7473
this(new DefaultSvgNodeRendererMapper());
@@ -80,7 +79,11 @@ public DefaultSvgNodeRendererFactory() {
8079
*
8180
* @param mapper the custom mapper implementation - if null, then we fall
8281
* back to the {@link DefaultSvgNodeRendererMapper}
82+
* @deprecated Will be removed in 7.2. The user should use the custom
83+
* {@link ISvgNodeRendererFactory} implementation (or the custom
84+
* @link DefaultSvgNodeRendererFactory} extension) to create extensions of the factory.
8385
*/
86+
@Deprecated
8487
public DefaultSvgNodeRendererFactory(ISvgNodeRendererMapper mapper) {
8588
if (mapper != null) {
8689
rendererMap.putAll(mapper.getMapping());

svg/src/main/java/com/itextpdf/svg/renderers/factories/DefaultSvgNodeRendererMapper.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,14 @@ This file is part of the iText (R) project.
7373
* default in the {@link DefaultSvgNodeRendererFactory}. It contains the mapping
7474
* of the default implementations, provided by this project for the standard SVG
7575
* tags as defined in the SVG Specification.
76+
*
77+
* @deprecated The public access to this class will be removed in 7.2. The class itself can become
78+
* either package private or the inner private static class for
79+
* the {@link DefaultSvgNodeRendererFactory}. Users should override {@link ISvgNodeRendererFactory}
80+
* (or at least {@link DefaultSvgNodeRendererFactory}) and should not deal with the mapping class
81+
* as it's more of an implementation detail.
7682
*/
83+
@Deprecated
7784
public class DefaultSvgNodeRendererMapper implements ISvgNodeRendererMapper {
7885

7986
@Override

svg/src/main/java/com/itextpdf/svg/renderers/factories/ISvgNodeRendererMapper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ This file is part of the iText (R) project.
5151
* Interface that will provide a mapping from SVG tag names to Renderers that
5252
* will be able to draw them. It's used in {@link DefaultSvgNodeRendererFactory}
5353
* to allow customizability in client code, and dependency injection in tests.
54+
*
55+
* @deprecated The interface will be removed in 7.2, while its implementation
56+
* ({@link DefaultSvgNodeRendererMapper}) will be used as our internal class. Users should
57+
* override {@link ISvgNodeRendererFactory} (or at least {@link DefaultSvgNodeRendererFactory})
58+
* and should not deal with the mapping class as it's more of an implementation detail.
5459
*/
60+
@Deprecated
5561
public interface ISvgNodeRendererMapper {
5662

5763
/**

0 commit comments

Comments
 (0)