aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl
diff options
context:
space:
mode:
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 {