From 217ffc112176ded156ef581c73409d8fa194bb54 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Mon, 20 Oct 2014 11:58:13 +0200 Subject: Is Visible configuration added --- .../at/gv/egiz/pdfas/lib/api/IConfigurationConstants.java | 1 + .../impl/configuration/SignatureProfileConfiguration.java | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'pdf-as-lib/src/main') 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 a3988add..03e72ecc 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 @@ -35,6 +35,7 @@ public interface IConfigurationConstants { public static final String TYPE = "type"; public static final String TABLE = "table"; public static final String MAIN = "main"; + public static final String ISVISIBLE = "isvisible"; public static final String POS = "pos"; public static final String DEFAULT = "default"; public static final String SEPERATOR = "."; diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/SignatureProfileConfiguration.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/SignatureProfileConfiguration.java index a7dd3138..04448b96 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/SignatureProfileConfiguration.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/SignatureProfileConfiguration.java @@ -39,7 +39,20 @@ public class SignatureProfileConfiguration extends SpecificBaseConfiguration public boolean isVisualSignature() { String key = SIG_OBJECT + SEPERATOR + profileID + SEPERATOR + TABLE + SEPERATOR + MAIN; - return this.configuration.hasPrefix(key); + + String isVisibleKey = SIG_OBJECT + SEPERATOR + profileID + SEPERATOR + ISVISIBLE; + + String isVisibleValue = this.configuration.getValue(isVisibleKey); + + boolean isVisible = true; + + if(isVisibleValue != null) { + if(isVisibleValue.equals(FALSE)) { + isVisible = false; + } + } + + return this.configuration.hasPrefix(key) && isVisible; } public String getDefaultPositioning() { -- cgit v1.2.3