From c45c60eecc2f4445ae552a870aa095039644420c Mon Sep 17 00:00:00 2001 From: tknall Date: Tue, 17 Jun 2008 06:33:31 +0000 Subject: (Default) configuration updated regarding new configuration keys. Update concerting exclusion of minimal layout profiles for verification. APIDemo updated. Many printStackTraces replaces with logger-messages. Web-Application: New error code (251) introduced: Textual signature of files with no extractable textual content (e.g. files that solely contain images) is prevented. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@293 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java | 10 ++++++++-- .../at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java | 11 ++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/gv/egiz/pdfas/impl/api') diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java index 635ef89..40da270 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java @@ -238,8 +238,14 @@ public class PdfAsObject implements PdfAs String connectorId = CommandlineConnectorChooser.chooseCommandlineConnectorForSign(signParameters.getSignatureDevice()); - SignatorInformation si = PdfAS - .signCommandline(new PdfDataSourceAdapter(signParameters.getDocument()), new DataSinkAdapter(signParameters.getOutput()), signatorId, connectorId, signParameters.getSignatureProfileId(), pos); + SignatorInformation si = PdfAS.signCommandline( + new PdfDataSourceAdapter(signParameters.getDocument()), + new DataSinkAdapter(signParameters.getOutput()), + signatorId, + connectorId, + signParameters.getSignatureProfileId(), + pos + ); return new SignResultImpl(signParameters.getOutput(), si.getSignSignatureObject().getX509Certificate(), new ActualSignaturePositionAdapter(si.getActualTablePos())); } diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java b/src/main/java/at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java index bf3f57b..83d4db0 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java @@ -8,6 +8,9 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import at.gv.egiz.pdfas.api.verify.SignatureCheck; import at.gv.egiz.pdfas.api.verify.VerifyResult; import at.gv.egiz.pdfas.impl.api.commons.SignatureInformationAdapter; @@ -15,6 +18,7 @@ import at.knowcenter.wag.egov.egiz.exceptions.SettingNotFoundException; import at.knowcenter.wag.egov.egiz.pdf.SignatureHolder; import at.knowcenter.wag.egov.egiz.sig.SignatureResponse; + /** * Implements the VerifyResult interface. * @@ -24,6 +28,11 @@ public class VerifyResultAdapter extends SignatureInformationAdapter implements { protected SignatureResponse sigRes = null; + /** + * The log. + */ + private static final Log logger_ = LogFactory.getLog(VerifyResultAdapter.class); + protected Date vTime = null; /** @@ -100,7 +109,7 @@ public class VerifyResultAdapter extends SignatureInformationAdapter implements } catch (SettingNotFoundException e) { - e.printStackTrace(); + logger_.error(e.getMessage(), e); return new ArrayList(); } } -- cgit v1.2.3