diff options
author | pdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-12-09 13:45:33 +0000 |
---|---|---|
committer | pdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-12-09 13:45:33 +0000 |
commit | dadb912a6d38ced2e7f29957ff6b50a017d2e223 (patch) | |
tree | a4e35cb028ec83c60fded14090a859588bae183d /src/main/java/at/gv/egiz | |
parent | 72910ebd1b66ceb10b90ad9fe1741c9df67d0e33 (diff) | |
download | pdf-as-3-dadb912a6d38ced2e7f29957ff6b50a017d2e223.tar.gz pdf-as-3-dadb912a6d38ced2e7f29957ff6b50a017d2e223.tar.bz2 pdf-as-3-dadb912a6d38ced2e7f29957ff6b50a017d2e223.zip |
moved suppress_validate_exceptions to verifyparameters
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@698 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/api/verify/VerifyParameters.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/api/verify/VerifyParameters.java b/src/main/java/at/gv/egiz/pdfas/api/verify/VerifyParameters.java index 793764b..9cc86a7 100644 --- a/src/main/java/at/gv/egiz/pdfas/api/verify/VerifyParameters.java +++ b/src/main/java/at/gv/egiz/pdfas/api/verify/VerifyParameters.java @@ -79,7 +79,13 @@ public class VerifyParameters protected boolean returnHashInputData = false;
protected boolean returnNonTextualObjects = false;
+
+ private static ThreadLocal suppressVerifyExceptions = new ThreadLocal();
+
+ public VerifyParameters() {
+ suppressVerifyExceptions.set(Boolean.FALSE);
+ }
/**
* @return the document
*/
@@ -196,6 +202,25 @@ public class VerifyParameters public void setReturnNonTextualObjects(boolean returnNonTextualObjects) {
this.returnNonTextualObjects = returnNonTextualObjects;
}
+
+ /**
+ * Set if verify exceptions (because of unknown signatures) are suppressed or not (default).
+ * Suppressing can be helpful for multiple signatures if you want to verify the working rest. Unsupported
+ * Signatures are reported without throwing an exception via {@link VerifyResult#getVerificationException()}
+ * @param suppress
+ */
+ public void setSuppressVerifyExceptions(boolean suppress) {
+ suppressVerifyExceptions.set(new Boolean(suppress));
+ }
+
+ /**
+ * See {@link #setSuppressVerifyExceptions(boolean)}
+ * @return
+ */
+ public static boolean isSuppressVerifyExceptions() {
+ if (suppressVerifyExceptions.get() == null) return false;
+ return ((Boolean) suppressVerifyExceptions.get()).booleanValue();
+ }
|