From d658f95290ea03bd0ecdc01110b48244b28e6f19 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 13 Nov 2020 13:49:59 +0100 Subject: refactored Profile --- .../at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'pdf-over-signer/pdf-over-sigpdfas4/src/main/java') diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java index 5d286d44..62533868 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java +++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java @@ -34,7 +34,7 @@ import at.gv.egiz.pdfas.lib.api.Configuration; import at.gv.egiz.pdfas.lib.api.PdfAs; import at.gv.egiz.pdfas.lib.api.PdfAsFactory; import at.gv.egiz.pdfas.lib.api.sign.SignParameter; -import at.asit.pdfover.gui.Constants; +import at.asit.pdfover.commons.Profile; /** * Implementation of SignatureParameter for PDF-AS 4 Library @@ -172,13 +172,11 @@ public class PdfAs4SignatureParameter extends SignatureParameter { - if (!PROFILE_VISIBILITY || this.profile.equals("Unsichtbar")) + if (!PROFILE_VISIBILITY || this.profile.equals("Unsichtbar") || Profile.getProfile(this.profile).equals(Profile.INVISIBLE)) { - //TODO set base profile id using the this.profile - //TODO verifiy profileId = "INVISIBLE"; } else { - profileId = Constants.PROFILE.getProfile(this.profile).name();//PROFILE_ID_BASE; + profileId = Profile.getProfile(this.profile).name(); profileId += (lang != null && lang.equals("en")) ? PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE; } -- cgit v1.2.3