aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-common/src
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2013-12-12 17:00:00 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2013-12-12 17:00:00 +0100
commite5316db083e46c8ae9e4b07bff57812d9314200b (patch)
tree6e027cf0f62b7018ca2c08caafa6be1fa8ce1fa2 /pdf-as-common/src
parent7f38c0767cafa16f882fd7737269697b93b47af1 (diff)
downloadpdf-as-4-e5316db083e46c8ae9e4b07bff57812d9314200b.tar.gz
pdf-as-4-e5316db083e46c8ae9e4b07bff57812d9314200b.tar.bz2
pdf-as-4-e5316db083e46c8ae9e4b07bff57812d9314200b.zip
MOA SS integration OK
Diffstat (limited to 'pdf-as-common/src')
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsMOAException.java29
-rw-r--r--pdf-as-common/src/main/resources/resources/messages/common.properties3
2 files changed, 32 insertions, 0 deletions
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsMOAException.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsMOAException.java
new file mode 100644
index 00000000..7350680d
--- /dev/null
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsMOAException.java
@@ -0,0 +1,29 @@
+package at.gv.egiz.pdfas.common.exceptions;
+
+import at.gv.egiz.pdfas.common.messages.MessageResolver;
+
+public class PdfAsMOAException extends PdfAsException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -217112433494784615L;
+
+ private String faultCode;
+ private String faultString;
+ private String errorResponse;
+ private String errorCode;
+
+ public PdfAsMOAException(String faultCode, String faultString, String errorResponse, String errorCode) {
+ super("error.pdf.io.06");
+ this.faultCode = faultCode;
+ this.faultString = faultString;
+ this.errorResponse = errorResponse;
+ this.errorCode = errorCode;
+ }
+
+ @Override
+ protected String localizeMessage(String msgId) {
+ return String.format(MessageResolver.resolveMessage(msgId), errorResponse, errorCode, faultCode, faultString);
+ }
+}
diff --git a/pdf-as-common/src/main/resources/resources/messages/common.properties b/pdf-as-common/src/main/resources/resources/messages/common.properties
index d4c58888..dadef742 100644
--- a/pdf-as-common/src/main/resources/resources/messages/common.properties
+++ b/pdf-as-common/src/main/resources/resources/messages/common.properties
@@ -7,6 +7,9 @@ error.pdf.io.02=Failed to write PDF Document
error.pdf.io.03=Security Layer communication error
error.pdf.io.04=Failed to write PDF Document
error.pdf.io.05=Security Layer element not available
+error.pdf.io.06=MOA-SS Error %s [%s] [%s [%s]]
+error.pdf.io.07=No CMS Signature in MOA SS Response
+error.pdf.io.08=MOA-SS Error communication error
#PDF Stamper Errors
error.pdf.stamp.01=Failed to load true type font