aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java173
1 files changed, 173 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java b/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java
new file mode 100644
index 0000000..cc59cbd
--- /dev/null
+++ b/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java
@@ -0,0 +1,173 @@
+/**
+ *
+ */
+package at.gv.egiz.pdfas.api.sign;
+
+import at.gv.egiz.pdfas.api.commons.Constants;
+import at.gv.egiz.pdfas.api.io.DataSink;
+import at.gv.egiz.pdfas.api.io.DataSource;
+import at.gv.egiz.pdfas.api.sign.pos.SignaturePositioning;
+
+/**
+ * Parameter object that holds the sign parameters.
+ *
+ * @author wprinz
+ */
+public class SignParameters
+{
+ /**
+ * The document to be signed.
+ *
+ * <p>
+ * The DataSource implementation encapsulates the actual representaion of the
+ * data. E.g. the DataSource may be File based or byte array based. See
+ * package at.gv.egiz.pdfas.framework.input and at.gv.pdfas.impl.input
+ * </p>
+ */
+ protected DataSource document = null;
+
+ /**
+ * The type of the signature.
+ *
+ * <p>
+ * May be {@link Constants#SIGNATURE_TYPE_BINARY} or
+ * {@link Constants#SIGNATURE_TYPE_TEXTUAL}.
+ * </p>
+ */
+ protected String signatureType = Constants.SIGNATURE_TYPE_BINARY;
+
+ /**
+ * The signature device to perform the actual signature.
+ *
+ * <p>
+ * May be {@link Constants#SIGNATURE_DEVICE_MOA} or
+ * {@link Constants#SIGNATURE_DEVICE_BKU}.
+ * </p>
+ */
+ protected String signatureDevice = Constants.SIGNATURE_DEVICE_MOA;
+
+ /**
+ * The signature profile identifier identifying the profile to be used in the
+ * config file.
+ *
+ * <p>
+ * Note: In near future it will be possible to provide a full specified
+ * profile here instead of the profile id.
+ * </p>
+ */
+ protected String signatureProfileId = null;;
+
+ /**
+ * The signature position. Consult the PDF-AS documentation section
+ * Commandline.
+ */
+ protected SignaturePositioning signaturePositioning = null;
+
+ /**
+ * The output DataSink that will receive the signed document.
+ */
+ protected DataSink output = null;
+
+ /**
+ * @return the document
+ */
+ public DataSource getDocument()
+ {
+ return document;
+ }
+
+ /**
+ * @param document
+ * the document to set
+ */
+ public void setDocument(DataSource document)
+ {
+ this.document = document;
+ }
+
+ /**
+ * @return the signatureType
+ */
+ public String getSignatureType()
+ {
+ return signatureType;
+ }
+
+ /**
+ * @param signatureType
+ * the signatureType to set
+ */
+ public void setSignatureType(String signatureType)
+ {
+ this.signatureType = signatureType;
+ }
+
+ /**
+ * @return the signatureDevice
+ */
+ public String getSignatureDevice()
+ {
+ return signatureDevice;
+ }
+
+ /**
+ * @param signatureDevice
+ * the signatureDevice to set
+ */
+ public void setSignatureDevice(String signatureDevice)
+ {
+ this.signatureDevice = signatureDevice;
+ }
+
+ /**
+ * @return the signatureProfileId
+ */
+ public String getSignatureProfileId()
+ {
+ return signatureProfileId;
+ }
+
+ /**
+ * @param signatureProfileId
+ * the signatureProfileId to set
+ */
+ public void setSignatureProfileId(String signatureProfileId)
+ {
+ this.signatureProfileId = signatureProfileId;
+ }
+
+ /**
+ * @return the signaturePositioning
+ */
+ public SignaturePositioning getSignaturePositioning()
+ {
+ return this.signaturePositioning;
+ }
+
+ /**
+ * @param signaturePositioning
+ * the signaturePositioning to set
+ */
+ public void setSignaturePositioning(SignaturePositioning signaturePositioning)
+ {
+ this.signaturePositioning = signaturePositioning;
+ }
+
+ /**
+ * @return the output
+ */
+ public DataSink getOutput()
+ {
+ return output;
+ }
+
+ /**
+ * @param output
+ * the output to set
+ */
+ public void setOutput(DataSink output)
+ {
+ this.output = output;
+ }
+
+}