aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-common
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-common')
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASPropertyEntry.java27
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASPropertyMap.java54
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java13
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerifyRequest.java12
4 files changed, 106 insertions, 0 deletions
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASPropertyEntry.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASPropertyEntry.java
new file mode 100644
index 00000000..8e6025f3
--- /dev/null
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASPropertyEntry.java
@@ -0,0 +1,27 @@
+package at.gv.egiz.pdfas.api.ws;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name="PropertyEntry")
+public class PDFASPropertyEntry {
+ String key;
+ String value;
+
+ @XmlElement(required = true, nillable = false, name="key")
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ @XmlElement(required = true, nillable = false, name="value")
+ public String getValue() {
+ return value;
+ }
+ public void setvalue(String value) {
+ this.value = value;
+ }
+}
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASPropertyMap.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASPropertyMap.java
new file mode 100644
index 00000000..b83daab9
--- /dev/null
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASPropertyMap.java
@@ -0,0 +1,54 @@
+package at.gv.egiz.pdfas.api.ws;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name="PropertyMap")
+public class PDFASPropertyMap {
+ List<PDFASPropertyEntry> propertyEntries;
+
+ @XmlElement(required = true, nillable = false, name="propertyEntries")
+ public List<PDFASPropertyEntry> getPropertyEntries() {
+ return propertyEntries;
+ }
+
+ public void setPropertyEntries(List<PDFASPropertyEntry> propertyEntries) {
+ this.propertyEntries = propertyEntries;
+ }
+
+ @XmlTransient
+ public Map<String, String> getMap() {
+ if(propertyEntries != null) {
+ Map<String, String> map = new HashMap<String, String>();
+ Iterator<PDFASPropertyEntry> propsIt = propertyEntries.iterator();
+ while(propsIt.hasNext()) {
+ PDFASPropertyEntry entry = propsIt.next();
+ map.put(entry.getKey(), entry.value);
+ }
+ return map;
+ }
+ return null;
+ }
+
+ public void setMap(Map<String, String> map) {
+
+ if(map != null) {
+ propertyEntries = new ArrayList<PDFASPropertyEntry>();
+ Iterator<String> keyIt = map.keySet().iterator();
+ while(keyIt.hasNext()) {
+ String key = keyIt.next();
+ PDFASPropertyEntry entry = new PDFASPropertyEntry();
+ entry.setKey(key);
+ entry.setvalue(map.get(key));
+ propertyEntries.add(entry);
+ }
+ }
+ }
+}
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java
index 9b295ff5..c6f3993e 100644
--- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java
@@ -24,6 +24,8 @@
package at.gv.egiz.pdfas.api.ws;
import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlEnumValue;
@@ -76,6 +78,7 @@ public class PDFASSignParameters implements Serializable {
String invokeErrorUrl;
String transactionId;
String profile;
+ PDFASPropertyMap preprocessor;
@XmlElement(required = true, nillable = false, name="connector")
public Connector getConnector() {
@@ -133,5 +136,15 @@ public class PDFASSignParameters implements Serializable {
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
+
+ @XmlElement(required = false, nillable = true, name="preprocessorArguments")
+ public PDFASPropertyMap getPreprocessor() {
+ return preprocessor;
+ }
+
+ public void setPreprocessor(PDFASPropertyMap preprocessor) {
+ this.preprocessor = preprocessor;
+ }
+
}
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerifyRequest.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerifyRequest.java
index 7167e921..2afa1f08 100644
--- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerifyRequest.java
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerifyRequest.java
@@ -1,6 +1,8 @@
package at.gv.egiz.pdfas.api.ws;
import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -17,6 +19,7 @@ public class PDFASVerifyRequest implements Serializable {
byte[] inputData;
VerificationLevel verificationLevel;
Integer sigIdx;
+ PDFASPropertyMap preprocessor;
@XmlElement(required = true, nillable = false, name="requestID")
public String getRequestID() {
@@ -53,4 +56,13 @@ public class PDFASVerifyRequest implements Serializable {
public void setSignatureIndex(Integer sigIdx) {
this.sigIdx = sigIdx;
}
+
+ @XmlElement(required = false, nillable = true, name="preprocessorArguments")
+ public PDFASPropertyMap getPreprocessor() {
+ return preprocessor;
+ }
+
+ public void setPreprocessor(PDFASPropertyMap preprocessor) {
+ this.preprocessor = preprocessor;
+ }
}