aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/session/SignSessionInformation.java
diff options
context:
space:
mode:
authorpdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-12-06 16:34:52 +0000
committerpdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-12-06 16:34:52 +0000
commit29ad090c29567ff1a4d3a2ec9b8ad0b5d80ee24d (patch)
tree5b75b34c822a79f70b83c266465dda70b9baeaf2 /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/session/SignSessionInformation.java
parent04375406fc1634adbf9b37143a2125327da6a11e (diff)
downloadpdf-as-3-29ad090c29567ff1a4d3a2ec9b8ad0b5d80ee24d.tar.gz
pdf-as-3-29ad090c29567ff1a4d3a2ec9b8ad0b5d80ee24d.tar.bz2
pdf-as-3-29ad090c29567ff1a4d3a2ec9b8ad0b5d80ee24d.zip
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@671 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/session/SignSessionInformation.java')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/session/SignSessionInformation.java154
1 files changed, 154 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/session/SignSessionInformation.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/session/SignSessionInformation.java
new file mode 100644
index 0000000..94428a4
--- /dev/null
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/session/SignSessionInformation.java
@@ -0,0 +1,154 @@
+/**
+ *
+ */
+package at.gv.egiz.pdfas.web.session;
+
+import java.io.Serializable;
+
+import javax.servlet.http.HttpSessionBindingEvent;
+import javax.servlet.http.HttpSessionBindingListener;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.gv.egiz.pdfas.api.internal.LocalBKUParams;
+import at.gv.egiz.pdfas.api.io.DataSink;
+import at.gv.egiz.pdfas.api.io.DataSource;
+import at.gv.egiz.pdfas.api.sign.SignParameters;
+import at.gv.egiz.pdfas.api.sign.SignResult;
+import at.gv.egiz.pdfas.api.sign.SignatureDetailInformation;
+import at.gv.egiz.pdfas.api.sign.pos.SignaturePositioning;
+import at.gv.egiz.pdfas.web.ExternAppInformation;
+import at.gv.egiz.pdfas.web.LocalRequest;
+
+/**
+ * @author wprinz
+ *
+ */
+public class SignSessionInformation implements HttpSessionBindingListener, Serializable
+{
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = 2739944460007369626L;
+
+ /**
+ * The log.
+ */
+ private static Log log = LogFactory.getLog(SignSessionInformation.class);
+
+ /**
+ * The connector.
+ */
+ public String connector = null;
+
+ /**
+ * For local requests, tells the application (sign, verify).
+ */
+ public String application = null;
+
+ /**
+ * Tells the operation mode (binary, textual).
+ */
+ public String mode = null;
+
+ /**
+ * The original, uploaded pdf.
+ */
+ public DataSource pdfDataSource = null;
+
+ /**
+ * The type/profile of the signature.
+ */
+ public String type = null;
+
+ /**
+ * The suggested filename.
+ */
+ public String filename;
+
+ /**
+ * Tells, if the file download should be done inline or as attachment.
+ */
+ public boolean download_inline;
+
+ /**
+ * Object containing information about the calling webapplication.
+ *
+ * @author: Thomas Zefferer
+ */
+ public ExternAppInformation exappinf;
+
+ /**
+ * Information about the signature position
+ *
+ * @author exthex
+ */
+ public SignaturePositioning pos;
+
+ /**
+ * The SignatureDetailInformation.
+ */
+ public SignatureDetailInformation sdi = null;
+
+ /**
+ * The DataSink to write the output data to.
+ */
+ public DataSink output = null;
+
+ /**
+ * The local request to be sent to the device.
+ */
+ public LocalRequest localRequest = null;
+
+// /**
+// * The response properties of the local request.
+// */
+// public Properties response_properties = null;
+
+ /**
+ * Tells if the sign request has been processed and the signed document is
+ * available in the DataSink.
+ */
+ public boolean outputAvailable = false;
+
+ /**
+ * The SignParameters
+ */
+ public SignParameters signParameters;
+
+ public SignResult signResult;
+
+ public byte[] signedPdf;
+
+ public String xmlResponse;
+
+ public LocalBKUParams localBKUParams;
+
+
+ /**
+ * @see javax.servlet.http.HttpSessionBindingListener#valueBound(javax.servlet.http.HttpSessionBindingEvent)
+ */
+ public void valueBound(HttpSessionBindingEvent event)
+ {
+ log.debug("Bound SignSessionInformation to session (ID=" + event.getSession().getId() + ").");
+ }
+
+ /**
+ * @see javax.servlet.http.HttpSessionBindingListener#valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
+ */
+ public void valueUnbound(HttpSessionBindingEvent event)
+ {
+ log.debug("Unbound SignSessionInformation from session (ID=" + event.getSession().getId() + ").");
+
+ //TODO needed?
+// if (this.pdfDataSource != null)
+// {
+// TempDirHelper.deleteDataSourceIfFileBased(this.pdfDataSource);
+// }
+// if (this.output != null)
+// {
+// TempDirHelper.deleteDataSinkIfFileBased(this.output);
+// }
+ }
+}