aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss/api/common
diff options
context:
space:
mode:
authorgregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2003-07-07 10:58:37 +0000
committergregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2003-07-07 10:58:37 +0000
commitece7d18cf35374bf4e26d041799cda8f791c89f8 (patch)
tree33707cb77627b65a2a4e7327a2e93fb7751c1b76 /spss.server/src/at/gv/egovernment/moa/spss/api/common
parent273aed93c03b18a6c6bb1af745ae46a13ad3c7f2 (diff)
downloadmoa-id-spss-ece7d18cf35374bf4e26d041799cda8f791c89f8.tar.gz
moa-id-spss-ece7d18cf35374bf4e26d041799cda8f791c89f8.tar.bz2
moa-id-spss-ece7d18cf35374bf4e26d041799cda8f791c89f8.zip
Initial commit
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@2 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/api/common')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/Base64Transform.java13
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java17
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/CheckResult.java25
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/Content.java37
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentBinary.java21
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentReference.java11
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentXML.java19
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/ElementSelector.java28
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java15
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java27
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/MetaInfo.java31
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/SignerInfo.java43
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/Transform.java16
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java25
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java25
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter.java38
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java25
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathTransform.java30
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java23
19 files changed, 469 insertions, 0 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Base64Transform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Base64Transform.java
new file mode 100644
index 000000000..94785727d
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Base64Transform.java
@@ -0,0 +1,13 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * A <code>Transform</code> performing a Base64 decoding.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface Base64Transform extends Transform {
+ /** Algorithm URI of the Base64 <code>Transform</code> type. */
+ public static final String BASE64_DECODING =
+ "http://www.w3.org/2000/09/xmldsig#base64";
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java
new file mode 100644
index 000000000..352461e52
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java
@@ -0,0 +1,17 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * A canonicalization type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CanonicalizationTransform extends Transform {
+ /** Algorithm URI of canonical XML. */
+ public static final String CANONICAL_XML = Constants.C14N_URI;
+ /** Algorithm URI of canonical XML with comments. */
+ public static final String CANONICAL_XML_WITH_COMMENTS =
+ Constants.C14N_WITH_COMMENTS_URI;
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/CheckResult.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/CheckResult.java
new file mode 100644
index 000000000..974483d82
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/CheckResult.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Object encapsulating the result of a signature verification.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CheckResult {
+ /**
+ * Gets the result code.
+ *
+ * @return The result code.
+ */
+ public int getCode();
+ /**
+ * Gets descriptive information.
+ *
+ * @return Descriptive information.
+ */
+ public NodeList getInfo();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Content.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Content.java
new file mode 100644
index 000000000..173e9d395
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Content.java
@@ -0,0 +1,37 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Encapsulates content data.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface Content {
+ /**
+ * Indicates that this object contains a URI reference to some content.
+ */
+ public static final int REFERENCE_CONTENT = 0;
+ /**
+ * Indicates that this object contains binary content.
+ */
+ public static final int BINARY_CONTENT = 1;
+ /**
+ * Indicates that this object contains XML content.
+ */
+ public static final int XML_CONTENT = 2;
+
+ /**
+ * Gets the type of content contained in this object.
+ *
+ * @return The type of content, either <code>BINARY_CONTENT</code> or
+ * <code>XML_CONTENT</code>
+ */
+ public int getContentType();
+ /**
+ * Gets the reference to the content data (a URI).
+ *
+ * @return The reference to the content data.
+ */
+ public String getReference();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentBinary.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentBinary.java
new file mode 100644
index 000000000..664afa406
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentBinary.java
@@ -0,0 +1,21 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.io.InputStream;
+
+/**
+ * Encapsulates binary content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ContentBinary extends Content {
+ /**
+ * Get the binary content.
+ *
+ * @return An <code>InputStream</code> from which the binary content can
+ * be read.
+ */
+ public InputStream getBinaryContent();
+
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentReference.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentReference.java
new file mode 100644
index 000000000..c10f0c2f8
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentReference.java
@@ -0,0 +1,11 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Content containing a reference to content data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ContentReference extends Content {
+
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentXML.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentXML.java
new file mode 100644
index 000000000..ad5930452
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentXML.java
@@ -0,0 +1,19 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Encapsulates arbitrary XML content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ContentXML extends Content {
+ /**
+ * Gets the XML content stored in this object.
+ *
+ * @return The XML content.
+ */
+ public NodeList getXMLContent();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ElementSelector.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ElementSelector.java
new file mode 100644
index 000000000..862cb84da
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ElementSelector.java
@@ -0,0 +1,28 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * A class containing data for selecting single elements using an XPath
+ * expression.
+ *
+ * Derived classes are used to point to the <code>CreateSignatureLocation</code>
+ * and the <code>VerifySignatureLocation</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ElementSelector {
+ /**
+ * Gets the XPath expression pointing to a single element.
+ *
+ * @return The XPath expression to select the signature parent element.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets the namespace prefix to URI mapping to use when evaluating the XPath.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java
new file mode 100644
index 000000000..f951e35c0
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java
@@ -0,0 +1,15 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * An enveloped signature type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface EnvelopedSignatureTransform extends Transform {
+ /**
+ * Algorithm URI of the enveloped signature type of <code>Transform</code>.
+ */
+ public static final String ENVELOPED_SIGNATURE =
+ "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java
new file mode 100644
index 000000000..369270259
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java
@@ -0,0 +1,27 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.List;
+
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * An exclusive canonicalization type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ExclusiveCanonicalizationTransform extends Transform {
+ /** Algorithm URI of exclusive canonical XML. */
+ public static final String EXCLUSIVE_CANONICAL_XML = Constants.EXC_C14N_URI;
+ /** Algorithm URI of exclusive canonical XML with comments. */
+ public static final String EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS =
+ Constants.EXC_C14N_WITH_COMMENTS_URI;
+
+ /**
+ * Sets the namespace prefixes that are handled in the same manner as in
+ * canonical XML.
+ *
+ * @return The inclusive namespace prefixes.
+ */
+ public List getInclusiveNamespacePrefixes();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/MetaInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/MetaInfo.java
new file mode 100644
index 000000000..fea0a1b42
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/MetaInfo.java
@@ -0,0 +1,31 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Object encapsulating descriptive meta information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface MetaInfo {
+ /**
+ * Gets the mime type of the associated object.
+ *
+ * @return The mimetype of the associated object.
+ */
+ public String getMimeType();
+ /**
+ * Gets the descriptive information (URI).
+ *
+ * @return URI referencing the descriptive information.
+ */
+ public String getDescription();
+ /**
+ * Gets the elemental informations.
+ *
+ * @return The elemental informations.
+ */
+ public NodeList getAnyElements();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/SignerInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/SignerInfo.java
new file mode 100644
index 000000000..c3b4aaadc
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/SignerInfo.java
@@ -0,0 +1,43 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.security.cert.X509Certificate;
+
+
+/**
+ * Contains information about the signer.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SignerInfo {
+ /**
+ * Gets the signer certificate.
+ *
+ * @return The signer certificate.
+ */
+ public X509Certificate getSignerCertificate();
+ /**
+ * Checks, whether the certificate contained in this object is qualified.
+ *
+ * @return <code>true</code>, if the certificate is qualified, otherwise
+ * <code>false</code>.
+ */
+ public boolean isQualifiedCertificate();
+ /**
+ * Checks, whether the certificate contained in this object is a
+ * public authority certificate.
+ *
+ * @return <code>true</code>, if the certificate is a public authority
+ * certificate, otherwise <code>false</code>.
+ */
+ public boolean isPublicAuthority();
+ /**
+ * Gets the public authority ID, if the certificate contained in this
+ * object is from a public authority.
+ *
+ * @return The public authority ID.
+ */
+ public String getPublicAuhtorityID();
+
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Transform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Transform.java
new file mode 100644
index 000000000..49a4e7c35
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Transform.java
@@ -0,0 +1,16 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Base class for XMLDsig <code>Transform</code> elements.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface Transform {
+ /**
+ * Gets the algorithm URI of this <code>Transform</code>.
+ *
+ * @return The algorithm URI of this <code>Transform</code>.
+ */
+ public String getAlgorithmURI();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java
new file mode 100644
index 000000000..d2ea88968
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.math.BigInteger;
+
+/**
+ * Contains an X.509 issuer distinguished name/serial number pair.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface X509IssuerSerial {
+ /**
+ * Gets the issuer distinguished name.
+ *
+ * @return The issuer distinguished name.
+ */
+ public String getX509IssuerName();
+ /**
+ * Gets the issuer serial number.
+ *
+ * @return The issuer serial number.
+ */
+ public BigInteger getX509SerialNumber();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java
new file mode 100644
index 000000000..e1e034222
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+
+/**
+ * Object encapsulating arbitrary content and optional descriptive meta
+ * information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface XMLDataObjectAssociation {
+ /**
+ * Gets descriptive meta information.
+ *
+ * @return The descriptive meta information.
+ */
+ public MetaInfo getMetaInfo();
+ /**
+ * Gets the actual content.
+ *
+ * @return The content of this association.
+ */
+ public Content getContent();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter.java
new file mode 100644
index 000000000..247776ce0
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter.java
@@ -0,0 +1,38 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * An XPath expression set operation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathFilter {
+ /** Subtract this filter's node set from the resulting node set. */
+ public static final String SUBTRACT_TYPE = "subtract";
+ /** Intersect this filter's node set with the resulting node set. */
+ public static final String INTERSECT_TYPE = "intersect";
+ /** Compute the union of this filter's node set and the resulting node set. */
+ public static final String UNION_TYPE = "union";
+
+ /**
+ * Gets the type of this <code>XPathFilter</code>.
+ *
+ * @return The type of this <code>XPathFilter</code>.
+ */
+ public String getFilterType();
+ /**
+ * Gets the XPath expression for selecting the nodes.
+ *
+ * @return The XPath expression for selecting the nodes.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets The namespace prefix to URI mapping used during evaluation of the
+ * XPath expression.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java
new file mode 100644
index 000000000..335d37dbf
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.List;
+
+/**
+ * An XPath type of <code>Transform</code> containing multiple filters for
+ * performing set operations on XPath selections.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathFilter2Transform extends Transform {
+ /** Algorithm URI for the XPath Filter2 <code>Transform</code>. */
+ public static final String XPATH_FILTER2 =
+ "http://www.w3.org/2002/06/xmldsig-filter2";
+
+ /**
+ * Gets the <code>XPathFilter</code>s contained in this
+ * <code>XPathFilter2Transform</code>.
+ *
+ * @return The <code>XPathFilter</code>s.
+ */
+ public List getFilters();
+
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathTransform.java
new file mode 100644
index 000000000..f1cc1a2bc
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathTransform.java
@@ -0,0 +1,30 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * A <code>Transform</code> performing an XPath selection.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathTransform extends Transform {
+ /** Algorithm URI of the XPath <code>Transform</code>. */
+ public static final String XPATH =
+ "http://www.w3.org/TR/1999/REC-xpath-19991116";
+
+ /**
+ * Gets the XPath expression used for selection.
+ *
+ * @return The XPath expression used for selection.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets The namespace prefix to URI mapping used during evaluation of the
+ * XPath expression.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java
new file mode 100644
index 000000000..7f44bb060
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java
@@ -0,0 +1,23 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.Element;
+
+/**
+ * A <code>Transform</code> containing an XSLT stylesheet.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XSLTTransform extends Transform {
+ /** Algorithm URI for the XSLT type of <code>Transform</code>. */
+ public static final String XSLT =
+ "http://www.w3.org/TR/1999/REC-xslt-19991116";
+
+ /**
+ * Gets the XSLT stylesheet element used for the transformation.
+ *
+ * @return The XSLT stylesheet element used for the transformation.
+ */
+ public Element getStylesheet();
+
+}