aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignResult.java
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2006-12-01 12:20:24 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2006-12-01 12:20:24 +0000
commit6025b6016517c6d898d8957d1d7e03ba71431912 (patch)
treeb15bd6fa5ffe9588a9bca3f2b8a7e358f83b6eba /src/main/java/at/knowcenter/wag/egov/egiz/framework/SignResult.java
parentd2c77e820ab4aba8235d71275755021347b3ad10 (diff)
downloadpdf-as-3-6025b6016517c6d898d8957d1d7e03ba71431912.tar.gz
pdf-as-3-6025b6016517c6d898d8957d1d7e03ba71431912.tar.bz2
pdf-as-3-6025b6016517c6d898d8957d1d7e03ba71431912.zip
Initial import of release 2.2.REL-2.2@923
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@4 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/framework/SignResult.java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/SignResult.java96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignResult.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignResult.java
new file mode 100644
index 0000000..c7dfcdb
--- /dev/null
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignResult.java
@@ -0,0 +1,96 @@
+/**
+ * <copyright> Copyright (c) 2006 by Know-Center, Graz, Austria </copyright>
+ *
+ * This software is the confidential and proprietary information of Know-Center,
+ * Graz, Austria. You shall not disclose such Confidential Information and shall
+ * use it only in accordance with the terms of the license agreement you entered
+ * into with Know-Center.
+ *
+ * KNOW-CENTER MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
+ * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT. KNOW-CENTER SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
+ * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
+ * DERIVATIVES.
+ *
+ * $Id: SignResult.java,v 1.1 2006/08/25 17:07:21 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.framework;
+
+import java.io.Serializable;
+
+/**
+ * This class holds the signed document, which is given by the mime type and the
+ * binary data.
+ *
+ * @author wprinz
+ */
+public class SignResult implements Serializable
+{
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -6664489317508509973L;
+
+ /**
+ * The mime type of the data specifying the type of the document.
+ */
+ protected String mime_type = null;
+
+ /**
+ * The binary data of the document.
+ */
+ protected byte[] data = null;
+
+ /**
+ * Constructor.
+ *
+ * @param document_mime_type
+ * The mime type of the data specifying the type of the document.
+ * @param document_data
+ * The binary data of the document.
+ */
+ public SignResult(String document_mime_type, byte[] document_data)
+ {
+ if (document_mime_type == null && document_mime_type.length() == 0)
+ {
+ throw new IllegalArgumentException("Please provide a valid Mime Type for the SignResult. " + document_mime_type);
+ }
+ if (document_data == null)
+ {
+ throw new IllegalArgumentException("Please provide document data. " + document_data);
+ }
+
+ this.mime_type = document_mime_type;
+ this.data = document_data;
+ }
+
+ /**
+ * Returns the binary data.
+ *
+ * @return Returns the binary data.
+ */
+ public byte[] getData()
+ {
+ return this.data;
+ }
+
+ /**
+ * Returns the mime type.
+ *
+ * @return Returns the mime type.
+ */
+ public String getMimeType()
+ {
+ return this.mime_type;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return "SignResult:" + this.mime_type + "," + this.data.length;
+ }
+
+}