aboutsummaryrefslogtreecommitdiff
path: root/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java')
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java97
1 files changed, 96 insertions, 1 deletions
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
index fbf40be88..b5cc96a04 100644
--- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
@@ -35,6 +35,9 @@ import org.apache.commons.discovery.tools.DiscoverClass;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
+import at.gv.egovernment.moa.spss.api.cmssign.CMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmssign.CreateCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmssign.CreateCMSSignatureResponse;
import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
@@ -138,6 +141,26 @@ public abstract class SPSSFactory {
List singleSignatureInfos);
/**
+ * Create a new <code>CreateCMSSignatureRequest</code> object.
+ *
+ * @param keyIdentifier The identifier for the key group to use for signing.
+ * @param singleSignatureInfos A <code>List</code> of
+ * <code>SingleSignatureInfo</code> objects containing information about a
+ * single signature to be created.
+ * @return The <code>CreateCMSSignatureRequest</code> containing the above
+ * data.
+ *
+ * @pre keyIdentifier != null && keyIdentifier.length() > 0
+ * @pre singleSignatureInfos != null
+ * @pre forall Object o in singleSignatureInfos |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.SingleSignatureInfo
+ * @post return != null
+ */
+ public abstract CreateCMSSignatureRequest createCreateCMSSignatureRequest(
+ String keyIdentifier,
+ List singleSignatureInfos);
+
+ /**
* Create a new <code>SingleSignatureInfo</code> object.
*
* @param dataObjectInfos The data objects that will be signed (including
@@ -156,6 +179,23 @@ public abstract class SPSSFactory {
public abstract SingleSignatureInfo createSingleSignatureInfo(
List dataObjectInfos,
CreateSignatureInfo createSignatureInfo, boolean securityLayerConform);
+
+ /**
+ * Create a new <code>SingleSignatureInfo</code> object.
+ *
+ * @param dataObjectInfo The data object that will be signed.
+ * @param securityLayerConform If <code>true</code>, a Security Layer conform
+ * signature manifest is created, otherwise not.
+ * @return The <code>SingleSignatureInfo</code> containing the above data.
+ *
+ * @post return != null
+ */
+ public abstract at.gv.egovernment.moa.spss.api.cmssign.SingleSignatureInfo createSingleSignatureInfoCMS(
+ at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo dataObjectInfo,
+ boolean securityLayerConform);
+
+
+
/**
* Create a new <code>DataObjectInfo</code> object.
@@ -182,6 +222,22 @@ public abstract class SPSSFactory {
CreateTransformsInfoProfile createTransformsInfoProfile);
/**
+ * Create a new <code>DataObjectInfo</code> object.
+ *
+ * @param structure The type of signature to create.
+ * @param dataObject The data object that will be signed.
+ * @return The <code>DataObjectInfo</code> containing the above data.
+ *
+ * @pre DataObjectInfo.STRUCTURE_DETACHED.equals(structure) ||
+ * DataObjectInfo.STRUCTURE_ENVELOPING.equals(structure)
+ * @pre dataObject != null
+ * @post return != null
+ */
+ public abstract at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo createDataObjectInfo(
+ String structure,
+ CMSDataObject dataObject);
+
+ /**
* Create a new <code>CreateTransformsInfoProfile</code> object containing a
* reference to a locally stored profile.
*
@@ -321,6 +377,37 @@ public abstract class SPSSFactory {
*/
public abstract CreateXMLSignatureResponse createCreateXMLSignatureResponse(List responseElements);
+
+ /**
+ * Create a new <code>CreateCMSSignatureResponse</code> object.
+ *
+ * @param responseElements The elements of the response, either
+ * <code>CMSSignatureResponse</code> objects, or
+ * <code>ErrorResponse</code> objects.
+ * @return The new <code>CreateCMSSignatureResponse</code> containing the
+ * above data.
+ *
+ * @pre responseElements != null && responseElements.size() > 0
+ * @pre forall Object o in responseElements |
+ * o instanceof at.gv.egovernment.moa.spss.api.cmssign.CMSSignatureResponse
+ * @post return != null
+ */
+ public abstract CreateCMSSignatureResponse createCreateCMSSignatureResponse(List responseElements);
+
+
+ /**
+ * Create a new <code>SignatureEnvironmentResponse</code> object.
+ *
+ * @param signatureEnvironment The signature environment containing the
+ * signature.
+ * @return The <code>SignatureEnvironmentResponse</code> containing the
+ * <code>signatureEnvironment</code>.
+ *
+ * @pre signatureEnvironment != null
+ * @post return != null
+ */
+ public abstract CMSSignatureResponse createCMSSignatureResponse(String base64value);
+
/**
* Create a new <code>SignatureEnvironmentResponse</code> object.
*
@@ -1003,6 +1090,8 @@ public abstract class SPSSFactory {
* @param signerCertificate The signer certificate in binary form.
* @param qualifiedCertificate <code>true</code>, if the signer certificate is
* a qualified certificate, otherwise <code>false</code>.
+ * @param qcSourceTSL <code>true</code>, if the QC information comes from the TSL,
+ * otherwise <code>false</code>.
* @param publicAuthority <code>true</code>, if the signer certificate is a
* public authority certificate, otherwise <code>false</code>.
* @param publicAuthorityID The identification of the public authority
@@ -1010,6 +1099,9 @@ public abstract class SPSSFactory {
* <code>null</code>.
* @param sscd <code>true</code>, if the TSL check verifies the
* signature based on a SSDC, otherwise <code>false</code>.
+ * @param sscdSourceTSL <code>true</code>, if the SSCD information comes from the TSL,
+ * otherwise <code>false</code>.
+ * @param issuerCountryCode contains the signer certificate issuer country code.
* @return The <code>SignerInfo</code> containing the above data.
*
* @pre signerCertSubjectName != null
@@ -1019,9 +1111,12 @@ public abstract class SPSSFactory {
public abstract SignerInfo createSignerInfo(
X509Certificate signerCertificate,
boolean qualifiedCertificate,
+ boolean qcSourceTSL,
boolean publicAuthority,
String publicAuthorityID,
- boolean sscd);
+ boolean sscd,
+ boolean sscdSourceTSL,
+ String issuerCountryCode);
/**
* Create a new <code>X509IssuerSerial</code> object.