aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-01-28 13:49:33 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-01-28 13:49:33 +0100
commite210f9d25fb530a2650059390f12a7e8ecec48b3 (patch)
tree39c889c93bfaf94691524cf541185b736fd63ade /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl
parentf2d16430b03c38a55009bf5d157e41bfe04fcdf9 (diff)
downloadpdf-as-4-e210f9d25fb530a2650059390f12a7e8ecec48b3.tar.gz
pdf-as-4-e210f9d25fb530a2650059390f12a7e8ecec48b3.tar.bz2
pdf-as-4-e210f9d25fb530a2650059390f12a7e8ecec48b3.zip
PDF-AS cleanups
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
index 04b385f7..540fd572 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
@@ -87,6 +87,14 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants {
}
}
+ if(parameter.getDataSource() == null || parameter.getDataSource().getByteData() == null) {
+ throw new PdfAsValidationException("error.pdf.sig.10", null);
+ }
+
+ if(parameter.getOutput() == null) {
+ throw new PdfAsValidationException("error.pdf.sig.11", null);
+ }
+
// TODO: verify Sign Parameter
}
@@ -96,6 +104,10 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants {
if (!(parameter.getConfiguration() instanceof ISettings)) {
throw new PdfAsSettingsException("Invalid settings object!");
}
+
+ if(parameter.getDataSource() == null || parameter.getDataSource().getByteData() == null) {
+ throw new PdfAsValidationException("error.pdf.verify.01", null);
+ }
// TODO: verify Verify Parameter
}
@@ -279,7 +291,8 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants {
public StatusRequest startSign(SignParameter parameter)
throws PdfAsException {
- // TODO: VERIFY PARAMETERS
+ verifySignParameter(parameter);
+
StatusRequestImpl request = new StatusRequestImpl();
try {