From e49eb5e433767386a09732f5942b6425098b511b Mon Sep 17 00:00:00 2001 From: emusic Date: Wed, 21 Mar 2018 13:06:24 +0100 Subject: changes regarding protection, bug fix, thread safe --- .../pdfas/lib/api/IConfigurationConstants.java | 10 +--------- .../impl/configuration/GlobalConfiguration.java | 22 ---------------------- .../lib/impl/placeholder/PlaceholderFilter.java | 1 + 3 files changed, 2 insertions(+), 31 deletions(-) (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas') diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/IConfigurationConstants.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/IConfigurationConstants.java index 713948ba..3c560142 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/IConfigurationConstants.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/IConfigurationConstants.java @@ -54,7 +54,7 @@ public interface IConfigurationConstants { public static final String CONFIG_BKU_URL = "bku.sign.url"; /*Protect PDF content*/ - public static final String DEFAULT_CONFIG_PROTECT_PDF=DEFAULT+SEPERATOR+"protectPDF"; + public static final String DEFAULT_CONFIG_PROTECT_PDF = DEFAULT+SEPERATOR+"protectPDF"; /** * MOA SS Signing Key Identifier @@ -114,12 +114,4 @@ public interface IConfigurationConstants { public static final String SIG_PADES_FORCE_FLAG= SIG_OBJECT + SEPERATOR+"PAdESCompatibility"; public static final String SIG_PADES_INTELL_FLAG = SIG_OBJECT + SEPERATOR+"CheckPAdESCompatibility"; - - /** - * Protect PDF file from copying content and extracting - */ - - public static final String DEFAULT_CONFIG_PROTECT_COPY_PDF = DEFAULT_CONFIG_PROTECT_PDF + SEPERATOR + "accessCopy"; - public static final String DEFAULT_CONFIG_PROTECT_EXTRACT_PDF = DEFAULT_CONFIG_PROTECT_PDF + SEPERATOR + "canModify"; - } diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/GlobalConfiguration.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/GlobalConfiguration.java index a40c336d..a677676d 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/GlobalConfiguration.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/GlobalConfiguration.java @@ -41,26 +41,4 @@ public class GlobalConfiguration extends SpecificBaseConfiguration return null; } - public String getDefaultProtection() { - if(this.configuration.hasValue(DEFAULT_CONFIG_PROTECT_PDF)) { - return this.configuration.getValue(DEFAULT_CONFIG_PROTECT_PDF); - } - return null; - } - - public String getDefaultCopyProtection() { - if(this.configuration.hasValue(DEFAULT_CONFIG_PROTECT_COPY_PDF)) { - return this.configuration.getValue(DEFAULT_CONFIG_PROTECT_COPY_PDF); - } - return null; - } - - public String getDefaultExtractProtection() { - if(this.configuration.hasValue(DEFAULT_CONFIG_PROTECT_EXTRACT_PDF)) { - return this.configuration.getValue(DEFAULT_CONFIG_PROTECT_EXTRACT_PDF); - } - return null; - } - - } diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java index 9906fd6a..4b1a5a49 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java @@ -44,6 +44,7 @@ public class PlaceholderFilter implements IConfigurationConstants, .getPlaceholderExtractor(); String placeholderID = settings.getValue(PLACEHOLDER_ID); String placeholderModeString = settings.getValue(PLACEHOLDER_MODE); + int placeholderMode = PLACEHOLDER_MATCH_MODE_MODERATE; if (placeholderModeString != null) { try { -- cgit v1.2.3