aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureData.java
diff options
context:
space:
mode:
authorknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-05-12 17:37:16 +0000
committerknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-05-12 17:37:16 +0000
commit8e3ed85168edaeadcd4f3ec92450036a399d6ede (patch)
tree4fd938ebad8a042dd270ede88f7412909bfc3a4f /src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureData.java
parent064682ea2ccb0bbb7497d52790b282b179d98ae0 (diff)
downloadpdf-as-3-8e3ed85168edaeadcd4f3ec92450036a399d6ede.tar.gz
pdf-as-3-8e3ed85168edaeadcd4f3ec92450036a399d6ede.tar.bz2
pdf-as-3-8e3ed85168edaeadcd4f3ec92450036a399d6ede.zip
Detached Multipart BKU for Auftrag "Support"
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@73 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureData.java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureData.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureData.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureData.java
new file mode 100644
index 0000000..015831e
--- /dev/null
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureData.java
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package at.knowcenter.wag.egov.egiz.sig;
+
+/**
+ * This encapsuilates the content data to be signed or verified.
+ *
+ * <p>
+ * For a text signature this would be the text to be signed or verified. For a
+ * binary signature this would be the PDF to be signed or verified.
+ * </p>
+ *
+ * <p>
+ * This is an abstract reprsenation of data: the binary data, its mime type and
+ * (if appropriate according to the mime type) the charset the data is encoded.
+ * </p>
+ *
+ * @author wprinz
+ */
+public interface SignatureData
+{
+
+ // TODO Performance: make this to an InputStream
+ /**
+ * Returns the data to be signed or verified.
+ *
+ * @return Returns the data to be signed or verified.
+ */
+ public byte[] getData();
+
+ /**
+ * Returns the mime type of the data.
+ *
+ * <p>
+ * E.g. "text/plain" for text data or "application/pdf" for a PDF.
+ * </p>
+ *
+ * @return Returns the mime type of the data.
+ */
+ public String getMimeType();
+
+ /**
+ * Returns the character encoding (charset) of the data if appropriate.
+ *
+ * <p>
+ * This is only appropriate if the mime type suggests that the data contained
+ * in here is textually encoded. Usually text/plain or similar data types will
+ * have a character encoding present.
+ * </p>
+ * <p>
+ * If no character encoding is present, null is returned here.
+ * </p>
+ * <p>
+ * E.g. "UTF-8" is the most common encoding for textual data.
+ * </p>
+ *
+ * @return Returns the character encoding (charset) of the data if
+ * appropriate.
+ */
+ public String getCharacterEncoding();
+}