From 7b2e2b640b0f392183f7927f692936950d3fabfc Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 12 Nov 2013 12:26:10 +0100 Subject: SecurityLayer commands included --- .../common/exceptions/PdfAsSignatureException.java | 13 ++++++++++++ .../common/exceptions/PdfAsWrappedIOException.java | 16 +++++++++++++++ .../pdfas/common/exceptions/SLPdfAsException.java | 24 ++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsSignatureException.java create mode 100644 pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsWrappedIOException.java create mode 100644 pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/SLPdfAsException.java (limited to 'pdf-as-common/src/main') diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsSignatureException.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsSignatureException.java new file mode 100644 index 00000000..8ce81acb --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsSignatureException.java @@ -0,0 +1,13 @@ +package at.gv.egiz.pdfas.common.exceptions; + +public class PdfAsSignatureException extends PdfAsException { + + /** + * + */ + private static final long serialVersionUID = -7708377284196351907L; + + public PdfAsSignatureException(String msgId, Throwable e) { + super(msgId, e); + } +} diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsWrappedIOException.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsWrappedIOException.java new file mode 100644 index 00000000..dfb2114e --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsWrappedIOException.java @@ -0,0 +1,16 @@ +package at.gv.egiz.pdfas.common.exceptions; + +import java.io.IOException; + +public class PdfAsWrappedIOException extends IOException { + + /** + * + */ + private static final long serialVersionUID = 1241649395712516711L; + + public PdfAsWrappedIOException(PdfAsException e) { + super(e); + } + +} diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/SLPdfAsException.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/SLPdfAsException.java new file mode 100644 index 00000000..fa9031ec --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/SLPdfAsException.java @@ -0,0 +1,24 @@ +package at.gv.egiz.pdfas.common.exceptions; + + +public class SLPdfAsException extends PdfAsException { + + /** + * + */ + private static final long serialVersionUID = -1261346424827136327L; + + private int code; + private String info; + + public SLPdfAsException(int code, String info) { + super(); + this.code = code; + this.info = info; + } + + + protected String localizeMessage(String msgId) { + return String.format("%d : %s", code, info); + } +} -- cgit v1.2.3