aboutsummaryrefslogtreecommitdiff
path: root/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java')
-rw-r--r--moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java1195
1 files changed, 593 insertions, 602 deletions
diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
index d7cd10c..d0be7d5 100644
--- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
+++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
@@ -21,7 +21,6 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
package at.gv.egovernment.moa.spss.api;
import java.io.InputStream;
@@ -81,10 +80,10 @@ import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
/**
* An abstract factory for creating MOA SP/SS API objects.
- *
- * Use <code>getInstance()</code> to get a concrete factory instance. Using
- * this instance, concrete MOA SP/SS API object can be created.
- *
+ *
+ * Use <code>getInstance()</code> to get a concrete factory instance. Using this
+ * instance, concrete MOA SP/SS API object can be created.
+ *
* @author Patrick Peck
* @author Gregor Karlinger
* @version $Id$
@@ -93,27 +92,26 @@ public abstract class SPSSFactory {
/** The default implementation of this class. */
private static final String DEFAULT_IMPLEMENTATION =
- "at.gv.egovernment.moa.spss.api.impl.SPSSFactoryImpl";
+ "at.gv.egovernment.moa.spss.api.impl.SPSSFactoryImpl";
/** The single instance of this class. */
private static SPSSFactory instance = null;
/**
* Returns the single instance of this class.
- *
+ *
* @return The single instance of this class.
*/
public static synchronized SPSSFactory getInstance() {
if (instance == null) {
try {
- /*DiscoverClass discover = new DiscoverClass();
- instance =
- (SPSSFactory) discover.newInstance(
- SPSSFactory.class,
- DEFAULT_IMPLEMENTATION);*/
+ /*
+ * DiscoverClass discover = new DiscoverClass(); instance = (SPSSFactory)
+ * discover.newInstance( SPSSFactory.class, DEFAULT_IMPLEMENTATION);
+ */
instance = new SPSSFactoryImpl();
- } catch (Exception e) {
- // this can not happen since we provide a valid default
+ } catch (final Exception e) {
+ // this can not happen since we provide a valid default
// implementation
}
}
@@ -126,94 +124,94 @@ public abstract class SPSSFactory {
/**
* Create a new <code>CreateXMLSignatureRequest</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>CreateXMLSignatureRequest</code> containing the above
- * data.
- *
+ *
+ * @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>CreateXMLSignatureRequest</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
+ * @pre forall Object o in singleSignatureInfos | o instanceof
+ * at.gv.egovernment.moa.spss.api.common.SingleSignatureInfo
* @post return != null
*/
public abstract CreateXMLSignatureRequest createCreateXMLSignatureRequest(
- String keyIdentifier,
- List singleSignatureInfos);
+ String keyIdentifier,
+ 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.
- *
+ *
+ * @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
+ * @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);
-
+ String keyIdentifier,
+ List singleSignatureInfos);
+
/**
* Create a new <code>SingleSignatureInfo</code> object.
- *
- * @param dataObjectInfos The data objects that will be signed (including
- * transformations).
- * @param createSignatureInfo Information about the signature environment. May
- * be <code>null</code>.
+ *
+ * @param dataObjectInfos The data objects that will be signed (including
+ * transformations).
+ * @param createSignatureInfo Information about the signature environment. May
+ * be <code>null</code>.
* @param securityLayerConform If <code>true</code>, a Security Layer conform
- * signature manifest is created, otherwise not.
+ * signature manifest is created, otherwise not.
* @return The <code>SingleSignatureInfo</code> containing the above data.
- *
+ *
* @pre dataObjectInfos != null && dataObjectInfos.size() > 0
- * @pre forall Object o in dataObjectInfos |
- * o instanceof at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo
+ * @pre forall Object o in dataObjectInfos | o instanceof
+ * at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo
* @post return != null
*/
public abstract SingleSignatureInfo createSingleSignatureInfo(
- List dataObjectInfos,
- CreateSignatureInfo createSignatureInfo, boolean securityLayerConform);
-
+ List dataObjectInfos,
+ CreateSignatureInfo createSignatureInfo, boolean securityLayerConform);
+
/**
* Create a new <code>SingleSignatureInfo</code> object.
- *
- * @param dataObjectInfo The data object that will be signed.
+ *
+ * @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.
- * @param isPAdESSignature
+ * signature manifest is created, otherwise not.
+ * @param isPAdESSignature
* @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, boolean isPAdESSignature);
-
-
-
+ public abstract at.gv.egovernment.moa.spss.api.cmssign.SingleSignatureInfo createSingleSignatureInfoCMS(
+ at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo dataObjectInfo,
+ boolean securityLayerConform, boolean isPAdESSignature);
/**
* Create a new <code>DataObjectInfo</code> object.
- *
- * @param structure The type of signature to create.
- * @param childOfManifest If <code>true</code>, references will be returned
- * as children of an XMLDsig manifest. Otherwise, they will be returned as
- * children of the signature itself.
- * @param dataObject The data object that will be signed.
- * @param createTransformsInfoProfile Additional transformations to apply
- * to the data object.
+ *
+ * @param structure The type of signature to create.
+ * @param childOfManifest If <code>true</code>, references will be
+ * returned as children of an XMLDsig
+ * manifest. Otherwise, they will be returned
+ * as children of the signature itself.
+ * @param dataObject The data object that will be signed.
+ * @param createTransformsInfoProfile Additional transformations to apply to the
+ * data object.
* @return The <code>DataObjectInfo</code> containing the above data.
- *
+ *
* @pre DataObjectInfo.STRUCTURE_DETACHED.equals(structure) ||
* DataObjectInfo.STRUCTURE_ENVELOPING.equals(structure)
* @pre dataObject != null
@@ -221,218 +219,216 @@ public abstract class SPSSFactory {
* @post return != null
*/
public abstract DataObjectInfo createDataObjectInfo(
- String structure,
- boolean childOfManifest,
- Content dataObject,
- CreateTransformsInfoProfile createTransformsInfoProfile);
+ String structure,
+ boolean childOfManifest,
+ Content dataObject,
+ CreateTransformsInfoProfile createTransformsInfoProfile);
/**
* Create a new <code>DataObjectInfo</code> object.
- *
- * @param structure The type of signature to create.
+ *
+ * @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);
-
+ String structure,
+ CMSDataObject dataObject);
+
/**
* Create a new <code>CreateTransformsInfoProfile</code> object containing a
* reference to a locally stored profile.
- *
- * @param profileID The profile ID to resolve during signature creation.
+ *
+ * @param profileID The profile ID to resolve during signature creation.
* @return The <code>CreateTransformsInfoProfile</code> containing the given
- * profile ID.
- *
+ * profile ID.
+ *
* @pre profileID != null && profileID.length() > 0
* @post return != null
*/
public abstract CreateTransformsInfoProfile createCreateTransformsInfoProfile(String profileID);
/**
- * Create a new <code>CreateTransformsInfoProfile</code> object by providing
- * the profile data explicitly.
- *
- * @param transformsInfo The transformations to apply to the associated
- * data object.
- * @param supplements Supplemental information for the transformation. May be
- * <code>null</code>.
+ * Create a new <code>CreateTransformsInfoProfile</code> object by providing the
+ * profile data explicitly.
+ *
+ * @param transformsInfo The transformations to apply to the associated data
+ * object.
+ * @param supplements Supplemental information for the transformation. May be
+ * <code>null</code>.
* @return The <code>CreateTransformsInfoProfile</code> containing the above
- * data.
- *
+ * data.
+ *
* @pre transformsInfo != null
- * @pre supplements != null implies
- * forall Object o in supplements |
- * o instanceof at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation
+ * @pre supplements != null implies forall Object o in supplements | o
+ * instanceof
+ * at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation
* @post return != null
*/
public abstract CreateTransformsInfoProfile createCreateTransformsInfoProfile(
- CreateTransformsInfo transformsInfo,
- List supplements);
+ CreateTransformsInfo transformsInfo,
+ List supplements);
/**
* Create a new <code>CreateTransformsInfo</code> object.
- *
- * @param transforms The <code>Transform</code>s to apply to the associated
- * data object. May be <code>null</code>.
- * @param finalDataMetaInfo Information about the type of the transformed
- * data.
+ *
+ * @param transforms The <code>Transform</code>s to apply to the
+ * associated data object. May be <code>null</code>.
+ * @param finalDataMetaInfo Information about the type of the transformed data.
* @return The <code>CreateTransformsInfo</code> containing the above data.
- *
+ *
* @pre transforms != null implies transforms.size > 0
- * @pre transforms != null implies
- * forall Object o in transforms |
- * o instanceof at.gv.egovernment.moa.spss.api.common.Transform
+ * @pre transforms != null implies forall Object o in transforms | o instanceof
+ * at.gv.egovernment.moa.spss.api.common.Transform
* @pre finalDataMetaInfo != null
* @post return != null
*/
public abstract CreateTransformsInfo createCreateTransformsInfo(
- List transforms,
- MetaInfo finalDataMetaInfo);
+ List transforms,
+ MetaInfo finalDataMetaInfo);
/**
* Create a new <code>CreateSignatureInfo</code> object.
- *
- * @param createSignatureEnvironment The signature environment that will
- * contain the signature.
- * @param createSignatureEnvironmentProfile Additional information about
- * the signture environment.
+ *
+ * @param createSignatureEnvironment The signature environment that will
+ * contain the signature.
+ * @param createSignatureEnvironmentProfile Additional information about the
+ * signture environment.
* @return The <code>CreateSignatureInfo</code> containing the above data.
- *
+ *
* @pre createSignatureEnvironment != null
* @pre createSignatureEnvironmentProfile != null
* @post return != null
*/
public abstract CreateSignatureInfo createCreateSignatureInfo(
- Content createSignatureEnvironment,
- CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile);
+ Content createSignatureEnvironment,
+ CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile);
/**
- * Create a new <code>CreateSignatureEnvironmentProfile</code> object
- * containing a reference to a locally stored profile.
- *
+ * Create a new <code>CreateSignatureEnvironmentProfile</code> object containing
+ * a reference to a locally stored profile.
+ *
* @param profileID The profile ID to resolve during signature creation.
- * @return The <code>CreateSignatureEnvironmentProfile</code> containing
- * the given profile ID.
- *
+ * @return The <code>CreateSignatureEnvironmentProfile</code> containing the
+ * given profile ID.
+ *
* @pre profileID != null && profileID.length() > 0
* @post return != null
*/
public abstract CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(String profileID);
/**
- * Create a new <code>CreateSignatureEnvironmentProfile</code> object by
- * providing the profile data explicitly.
- *
+ * Create a new <code>CreateSignatureEnvironmentProfile</code> object by
+ * providing the profile data explicitly.
+ *
* @param createSignatureLocation The location where the signature will be
- * inserted.
- * @param supplements Additional information about the signature environment.
+ * inserted.
+ * @param supplements Additional information about the signature
+ * environment.
* @return The <code>CreateSignatureEnvironmentProfile</code> containing the
- * above data.
- *
+ * above data.
+ *
* @pre createSignatureLocation != null
- * @pre supplements != null
- * @pre forall Object o in supplements |
- * o instanceof at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation
+ * @pre supplements != null
+ * @pre forall Object o in supplements | o instanceof
+ * at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation
* @post return != null
*/
public abstract CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(
- CreateSignatureLocation createSignatureLocation,
- List supplements);
+ CreateSignatureLocation createSignatureLocation,
+ List supplements);
/**
* Create a new <code>CreateSignatureLocation</code> object.
- *
- * @param xPathExpression The XPath expression to select the signature
- * parent element within the signature environment.
- * @param index The index of the node, after which the signature will be
- * inserted.
+ *
+ * @param xPathExpression The XPath expression to select the signature
+ * parent element within the signature environment.
+ * @param index The index of the node, after which the signature
+ * will be inserted.
* @param namespaceDeclarations The namespace prefix to URI mapping to apply
- * while evaluating the XPath expression.
+ * while evaluating the XPath expression.
* @return The <code>CreateSignatureLocation</code> containing the above data.
- *
+ *
* @pre xPathExpression != null
* @pre index >= 0
* @pre namespaceDeclarations != null
*/
public abstract CreateSignatureLocation createCreateSignatureLocation(
- String xPathExpression,
- int index,
- Map namespaceDeclarations);
+ String xPathExpression,
+ int index,
+ Map namespaceDeclarations);
/**
* Create a new <code>CreateXMLSignatureResponse</code> object.
- *
- * @param responseElements The elements of the response, either
- * <code>SignatureEnvironmentResponse</code> objects, or
- * <code>ErrorResponse</code> objects.
- * @return The new <code>CreateXMLSignatureResponse</code> containing the
- * above data.
- *
+ *
+ * @param responseElements The elements of the response, either
+ * <code>SignatureEnvironmentResponse</code> objects, or
+ * <code>ErrorResponse</code> objects.
+ * @return The new <code>CreateXMLSignatureResponse</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.xmlsign.CreateSignatureResponseElement
+ * @pre forall Object o in responseElements | o instanceof
+ * at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureResponseElement
* @post return != null
*/
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.
- *
+ *
+ * @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
+ * @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.
+ * signature.
* @return The <code>SignatureEnvironmentResponse</code> containing the
- * <code>signatureEnvironment</code>.
- *
+ * <code>signatureEnvironment</code>.
+ *
* @pre signatureEnvironment != null
* @post return != null
*/
public abstract CMSSignatureResponse createCMSSignatureResponse(String base64value);
-
+
/**
* Create a new <code>SignatureEnvironmentResponse</code> object.
- *
+ *
* @param signatureEnvironment The signature environment containing the
- * signature.
+ * signature.
* @return The <code>SignatureEnvironmentResponse</code> containing the
- * <code>signatureEnvironment</code>.
- *
+ * <code>signatureEnvironment</code>.
+ *
* @pre signatureEnvironment != null
* @post return != null
*/
- public abstract SignatureEnvironmentResponse createSignatureEnvironmentResponse(Element signatureEnvironment);
+ public abstract SignatureEnvironmentResponse createSignatureEnvironmentResponse(
+ Element signatureEnvironment);
/**
* Create a new <code>ErrorResponse</code> object.
- *
+ *
* @param code The numerical error code.
* @param info Verbose error information.
* @return The new <code>ErrorResponse</code> containing the above data.
- *
+ *
* @pre code > 0
* @pre info != null
* @post return != null
@@ -445,91 +441,87 @@ public abstract class SPSSFactory {
/**
* Create a new <code>VerifyCMSSignatureRequest</code> object.
- *
- * @param signatories The indexes of the signatories whose signature is to
- * be verified.
- * @param dateTime The date for which the verification is to be performed.
- * May be <code>null</code>.
- * @param cmsSignature The CMS signature.
- * @param dataObject The signed data. May be <code>null</code>.
- * @param trustProfileID The ID of the trust profile containing the trusted
- * root certificates.
- * @return The <code>VerifyCMSSignatureRequest</code> containing the above
- * data.
- *
+ *
+ * @param signatories The indexes of the signatories whose signature is to be
+ * verified.
+ * @param dateTime The date for which the verification is to be performed.
+ * May be <code>null</code>.
+ * @param cmsSignature The CMS signature.
+ * @param dataObject The signed data. May be <code>null</code>.
+ * @param trustProfileID The ID of the trust profile containing the trusted root
+ * certificates.
+ * @return The <code>VerifyCMSSignatureRequest</code> containing the above data.
+ *
* @pre signatories != null && signatories.length > 0
- * @pre signaturies != VerifyCMSSignatureRequest.ALL_SIGNATORIES implies
- * for (int i = 0; i < signatories.length; i++)
- * signatories[i] >= 1
+ * @pre signaturies != VerifyCMSSignatureRequest.ALL_SIGNATORIES implies for
+ * (int i = 0; i < signatories.length; i++) signatories[i] >= 1
* @pre cmsSignature != null
* @pre trustProfileID != null && trustProfileID.length() > 0
* @post return != null
*/
public abstract VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(
- int[] signatories,
- Date dateTime,
- InputStream cmsSignature,
- CMSDataObject dataObject,
- String trustProfileID,
- boolean pdf);
-
+ int[] signatories,
+ Date dateTime,
+ InputStream cmsSignature,
+ CMSDataObject dataObject,
+ String trustProfileID,
+ boolean pdf);
+
/**
* Create a new <code>VerifyCMSSignatureRequest</code> object.
- *
- * @param signatories The indexes of the signatories whose signature is to
- * be verified.
- * @param dateTime The date for which the verification is to be performed.
- * May be <code>null</code>.
- * @param cmsSignature The CMS signature.
- * @param dataObject The signed data. May be <code>null</code>.
- * @param trustProfileID The ID of the trust profile containing the trusted
- * root certificates.
- * @return The <code>VerifyCMSSignatureRequest</code> containing the above
- * data.
- *
+ *
+ * @param signatories The indexes of the signatories whose signature is to be
+ * verified.
+ * @param dateTime The date for which the verification is to be performed.
+ * May be <code>null</code>.
+ * @param cmsSignature The CMS signature.
+ * @param dataObject The signed data. May be <code>null</code>.
+ * @param trustProfileID The ID of the trust profile containing the trusted root
+ * certificates.
+ * @return The <code>VerifyCMSSignatureRequest</code> containing the above data.
+ *
* @pre signatories != null && signatories.length > 0
- * @pre signaturies != VerifyCMSSignatureRequest.ALL_SIGNATORIES implies
- * for (int i = 0; i < signatories.length; i++)
- * signatories[i] >= 1
+ * @pre signaturies != VerifyCMSSignatureRequest.ALL_SIGNATORIES implies for
+ * (int i = 0; i < signatories.length; i++) signatories[i] >= 1
* @pre cmsSignature != null
* @pre trustProfileID != null && trustProfileID.length() > 0
* @post return != null
*/
public abstract VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(
- int[] signatories,
- Date dateTime,
- InputStream cmsSignature,
- CMSDataObject dataObject,
- String trustProfileID,
- boolean pdf,
- boolean extended);
+ int[] signatories,
+ Date dateTime,
+ InputStream cmsSignature,
+ CMSDataObject dataObject,
+ String trustProfileID,
+ boolean pdf,
+ boolean extended);
/**
* Create a new <code>CMSDataObject</code> object from data at a given URI.
- *
- * @param metaInfo Type information about the <code>CMSDataObject</code>.
- * May be <code>null</code>.
- * @param content The CMS content containing the data.
+ *
+ * @param metaInfo Type information about the <code>CMSDataObject</code>. May be
+ * <code>null</code>.
+ * @param content The CMS content containing the data.
* @return The new <code>CMSDataObject</code> containing the data.
- *
+ *
* @pre referenceURI != null
* @pre content != null
* @post return != null
*/
public abstract CMSDataObject createCMSDataObject(
- MetaInfo metaInfo,
- CMSContent content,
- BigDecimal excludeByteRangeFrom,
- BigDecimal excludeByteRangeTo);
+ MetaInfo metaInfo,
+ CMSContent content,
+ BigDecimal excludeByteRangeFrom,
+ BigDecimal excludeByteRangeTo);
/**
* Create a new <code>CMSContent</code> object from the data contained at the
* given URI.
- *
+ *
* @param referenceURI The URI identifying the data. Must be resolvable.
* @return The <code>CMSContent</code> containing a reference to the signed
- * data.
- *
+ * data.
+ *
* @pre referenceURI != null
* @post return != null
*/
@@ -537,11 +529,11 @@ public abstract class SPSSFactory {
/**
* Create a new <code>CMSContent</code> object from a byte stream.
- *
+ *
* @param binaryContent The byte stream containing the signed data.
- * @return The new <code>CMSContent</code> containing the data from the
- * byte stream.
- *
+ * @return The new <code>CMSContent</code> containing the data from the byte
+ * stream.
+ *
* @pre binaryContent != null
* @post return != null
*/
@@ -549,41 +541,40 @@ public abstract class SPSSFactory {
/**
* Create a new <code>VerifyCMSSignatureResponse</code> object.
- *
+ *
* @param responseElements Verification information about each signature.
- * @return The new <code>VerifyCMSSignatureResponse</code> containing the
- * status of signature verification for each signature contained in the
- * request.
- *
- * @pre responseElements != null && responseElements.size() > 0
- * @pre forall Object o in responseElements |
- * o instanceof at.gv.egovernment.moa.spss.api.cmssign.VerifyCMSSignatureResponseElement
+ * @return The new <code>VerifyCMSSignatureResponse</code> containing the status
+ * of signature verification for each signature contained in the
+ * request.
+ *
+ * @pre responseElements != null && responseElements.size() > 0
+ * @pre forall Object o in responseElements | o instanceof
+ * at.gv.egovernment.moa.spss.api.cmssign.VerifyCMSSignatureResponseElement
* @post return != null
*/
public abstract VerifyCMSSignatureResponse createVerifyCMSSignatureResponse(List responseElements);
/**
* Create a new <code>VerifyCMSSignatureResponseElement</code> object.
- *
- * @param signerInfo Information about the signer certificate.
- * @param signatureCheck Result of the signature value check.
+ *
+ * @param signerInfo Information about the signer certificate.
+ * @param signatureCheck Result of the signature value check.
* @param certificateCheck Result of the certificate status check.
- * @return The new <code>VerifyCMSSignatureResponseElement</code> containing
- * the above data.
- *
- * @pre signerInfo != null && signatureCheck != null &&
- * certificateCheck != null
+ * @return The new <code>VerifyCMSSignatureResponseElement</code> containing the
+ * above data.
+ *
+ * @pre signerInfo != null && signatureCheck != null && certificateCheck != null
* @post return != null
*/
public abstract VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement(
- SignerInfo signerInfo,
- CheckResult signatureCheck,
- CheckResult certificateCheck,
- List adesResult,
- ExtendedCertificateCheckResult extendedCertificateCheckResult,
- String usedAlgorithm,
- Boolean coversFullDocument,
- int[] byteRangeOfSignature);
+ SignerInfo signerInfo,
+ CheckResult signatureCheck,
+ CheckResult certificateCheck,
+ List adesResult,
+ ExtendedCertificateCheckResult extendedCertificateCheckResult,
+ String usedAlgorithm,
+ Boolean coversFullDocument,
+ int[] byteRangeOfSignature);
//
// Factory methods for verifying XML signatures
@@ -591,114 +582,114 @@ public abstract class SPSSFactory {
/**
* Create a new <code>VerifyXMLSignatureRequest</code> object.
- *
- * @param dateTime The date for which the verification is to be performed.
- * May be <code>null</code>.
- * @param verifySignatureInfo Information about the signature environment and
- * the location of the signature.
- * @param supplementProfiles Supplemental information for the signature
- * environment. May be <code>null</code>.
+ *
+ * @param dateTime The date for which the verification is to be
+ * performed. May be <code>null</code>.
+ * @param verifySignatureInfo Information about the signature environment
+ * and the location of the signature.
+ * @param supplementProfiles Supplemental information for the signature
+ * environment. May be <code>null</code>.
* @param signatureManifestParams Additional information for checking the
- * signature manifest. May be <code>null</code>.
- * @param returnHashInputData If <code>true</code>, hash input data will
- * be returned in the response, otherwise not.
- * @param trustProfileID The ID of the trust profile containing the trusted
- * root certificates.
- * @return The new <code>VerifyXMLSignatureRequest</code> containing the
- * above data.
- *
+ * signature manifest. May be <code>null</code>.
+ * @param returnHashInputData If <code>true</code>, hash input data will be
+ * returned in the response, otherwise not.
+ * @param trustProfileID The ID of the trust profile containing the
+ * trusted root certificates.
+ * @return The new <code>VerifyXMLSignatureRequest</code> containing the above
+ * data.
+ *
* @pre verifySignatureInfo != null
- * @pre supplementProfiles != null implies
- * forall Object o in supplementProfiles |
- * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile
+ * @pre supplementProfiles != null implies forall Object o in supplementProfiles
+ * | o instanceof
+ * at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile
* @pre trustProfileID != null && trustProfileID.length() > 0
* @post return != null
*/
public abstract VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(
- Date dateTime,
- VerifySignatureInfo verifySignatureInfo,
- List supplementProfiles,
- SignatureManifestCheckParams signatureManifestParams,
- boolean returnHashInputData,
- String trustProfileID);
-
+ Date dateTime,
+ VerifySignatureInfo verifySignatureInfo,
+ List supplementProfiles,
+ SignatureManifestCheckParams signatureManifestParams,
+ boolean returnHashInputData,
+ String trustProfileID);
+
/**
* Create a new <code>VerifyXMLSignatureRequest</code> object.
- *
- * @param dateTime The date for which the verification is to be performed.
- * May be <code>null</code>.
- * @param verifySignatureInfo Information about the signature environment and
- * the location of the signature.
- * @param supplementProfiles Supplemental information for the signature
- * environment. May be <code>null</code>.
+ *
+ * @param dateTime The date for which the verification is to be
+ * performed. May be <code>null</code>.
+ * @param verifySignatureInfo Information about the signature environment
+ * and the location of the signature.
+ * @param supplementProfiles Supplemental information for the signature
+ * environment. May be <code>null</code>.
* @param signatureManifestParams Additional information for checking the
- * signature manifest. May be <code>null</code>.
- * @param returnHashInputData If <code>true</code>, hash input data will
- * be returned in the response, otherwise not.
- * @param trustProfileID The ID of the trust profile containing the trusted
- * root certificates.
- * @param extendedValidation Should the valdation result in forms
- * @return The new <code>VerifyXMLSignatureRequest</code> containing the
- * above data.
- *
+ * signature manifest. May be <code>null</code>.
+ * @param returnHashInputData If <code>true</code>, hash input data will be
+ * returned in the response, otherwise not.
+ * @param trustProfileID The ID of the trust profile containing the
+ * trusted root certificates.
+ * @param extendedValidation Should the valdation result in forms
+ * @return The new <code>VerifyXMLSignatureRequest</code> containing the above
+ * data.
+ *
* @pre verifySignatureInfo != null
- * @pre supplementProfiles != null implies
- * forall Object o in supplementProfiles |
- * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile
+ * @pre supplementProfiles != null implies forall Object o in supplementProfiles
+ * | o instanceof
+ * at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile
* @pre trustProfileID != null && trustProfileID.length() > 0
* @post return != null
*/
public abstract VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(
- Date dateTime,
- VerifySignatureInfo verifySignatureInfo,
- List supplementProfiles,
- SignatureManifestCheckParams signatureManifestParams,
- boolean returnHashInputData,
- String trustProfileID,
- boolean extendedValidation);
+ Date dateTime,
+ VerifySignatureInfo verifySignatureInfo,
+ List supplementProfiles,
+ SignatureManifestCheckParams signatureManifestParams,
+ boolean returnHashInputData,
+ String trustProfileID,
+ boolean extendedValidation);
/**
* Create a new <code>VerifySignatureInfo</code> object.
- *
- * @param verifySignatureEnvironment The signature environment containing
- * the signature to be verified.
- * @param verifySignatureLocation The location of the signature within the
- * signature environment.
+ *
+ * @param verifySignatureEnvironment The signature environment containing the
+ * signature to be verified.
+ * @param verifySignatureLocation The location of the signature within the
+ * signature environment.
* @return The new <code>VerifySignatureInfo</code> containing the above data.
- *
+ *
* @pre verifySignatureEnvironment != null
* @pre verifySignatureLocation != null
* @post return != null
*/
public abstract VerifySignatureInfo createVerifySignatureInfo(
- Content verifySignatureEnvironment,
- VerifySignatureLocation verifySignatureLocation);
+ Content verifySignatureEnvironment,
+ VerifySignatureLocation verifySignatureLocation);
/**
* Create a new <code>VerifySignatureLocation</code> object.
- *
- * @param xPathExpression The XPath expression to select the signature
- * element within the signature environment.
+ *
+ * @param xPathExpression The XPath expression to select the signature
+ * element within the signature environment.
* @param namespaceDeclarations The namespace prefix to URI mapping to apply
- * while evaluating the XPath expression.
+ * while evaluating the XPath expression.
* @return The new <code>VerifySignatureLocation</code> containing the above
- * data.
- *
+ * data.
+ *
* @pre xPathExpression != null
* @pre namespaceDeclarations != null
* @post return != null
*/
public abstract VerifySignatureLocation createVerifySignatureLocation(
- String xPathExpression,
- Map namespaceDeclarations);
+ String xPathExpression,
+ Map namespaceDeclarations);
/**
- * Create a new <code>SupplementProfile</code> object containing a reference
- * to a locally stored profile.
- *
+ * Create a new <code>SupplementProfile</code> object containing a reference to
+ * a locally stored profile.
+ *
* @param profileID The profile ID to resolve during signature verification.
* @return The <code>SupplementProfile</code> containing the profile ID.
- *
+ *
* @pre profileID != null && profileID.length() > 0
* @post return != null
*/
@@ -707,7 +698,7 @@ public abstract class SPSSFactory {
/**
* Create a new <code>SupplementProfile</code> object by providing the profile
* data explicitly.
- *
+ *
* @param supplementProfile The profile data.
* @return The <code>SupplementProfile</code> containing the profile data.
*/
@@ -715,232 +706,227 @@ public abstract class SPSSFactory {
/**
* Create a new <code>SignatureManifestCheckParams</code> object.
- *
- * @param referenceInfos Information for checking the validity of a
- * a reference.
- * @param returnReferenceInputData If <code>true</code>, the input data to
- * the calculation of reference digest values will be returned in the
- * response, otherwise not.
- * @return The <code>SignatureManifestCheckParams</code> containing the
- * above data.
- *
+ *
+ * @param referenceInfos Information for checking the validity of a a
+ * reference.
+ * @param returnReferenceInputData If <code>true</code>, the input data to the
+ * calculation of reference digest values will
+ * be returned in the response, otherwise not.
+ * @return The <code>SignatureManifestCheckParams</code> containing the above
+ * data.
+ *
* @pre referenceInfos != null && referenceInfos.size() > 0
- * @pre forall Object o in referenceInfos |
- * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo
+ * @pre forall Object o in referenceInfos | o instanceof
+ * at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo
* @post return != null
*/
public abstract SignatureManifestCheckParams createSignatureManifestCheckParams(
- List referenceInfos,
- boolean returnReferenceInputData);
+ List referenceInfos,
+ boolean returnReferenceInputData);
/**
* Create a new <code>ReferenceInfo</code> object.
- *
- * @param verifyTransformsInfoProfiles The transformation profiles valid for
- * the associated reference.
- * @return The <code>ReferenceInfo</code> containing the transformation
- * profiles.
- *
- * @pre verifyTransformsInfoProfiles != null &&
- * verifyTransformsInfoProfiles.size() > 0
- * @pre forall Object o in verifyTransformsInfoProfiles |
- * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile
+ *
+ * @param verifyTransformsInfoProfiles The transformation profiles valid for the
+ * associated reference.
+ * @return The <code>ReferenceInfo</code> containing the transformation
+ * profiles.
+ *
+ * @pre verifyTransformsInfoProfiles != null &&
+ * verifyTransformsInfoProfiles.size() > 0
+ * @pre forall Object o in verifyTransformsInfoProfiles | o instanceof
+ * at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile
* @post return != null
*/
public abstract ReferenceInfo createReferenceInfo(List verifyTransformsInfoProfiles);
/**
- * Create a new <code>VerifyTransformsInfoProfile</code> object containing
- * a reference to a locally stored profile.
- *
+ * Create a new <code>VerifyTransformsInfoProfile</code> object containing a
+ * reference to a locally stored profile.
+ *
* @param profileID The profile ID to resolve during signature verification.
- * @return The <code>VerifyTransformsInfoProfile</code> containing the
- * given profile ID.
- *
+ * @return The <code>VerifyTransformsInfoProfile</code> containing the given
+ * profile ID.
+ *
* @pre profileID != null && profileID.length() > 0
* @post return != null
*/
public abstract VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(String profileID);
/**
- * Create a new <code>VerifyTransformsInfoProfile</code> object by providing
- * the profile data explicitly.
- *
- * @param transforms A valid chain of transformations for the reference.
- * May be <code>null</code>.
+ * Create a new <code>VerifyTransformsInfoProfile</code> object by providing the
+ * profile data explicitly.
+ *
+ * @param transforms A valid chain of transformations for the
+ * reference. May be <code>null</code>.
* @param transformParameters Additional transformation information.
* @return The <code>VerifyTransformsInfoProfile</code> containing the above
- * data.
- *
- * @pre transforms != null implies
- * (transforms.size() > 0 &&
- * forall Object o in transforms | o instanceof Transform)
- * @pre transformParameters != null implies
- * forall Object o in transformParameters |
- * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter
+ * data.
+ *
+ * @pre transforms != null implies (transforms.size() > 0 && forall Object o in
+ * transforms | o instanceof Transform)
+ * @pre transformParameters != null implies forall Object o in
+ * transformParameters | o instanceof
+ * at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter
* @post return != null
*/
public abstract VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(
- List transforms,
- List transformParameters);
+ List transforms,
+ List transformParameters);
/**
- * Create a new <code>TransformParameter</code> object with the data
- * contained at the given URI.
- *
+ * Create a new <code>TransformParameter</code> object with the data contained
+ * at the given URI.
+ *
* @param URI The URI identifying the data. The URI will be resolved during
- * signature verification.
- * @return The <code>TransformParameter</code> containing the URI of the
- * data.
- *
+ * signature verification.
+ * @return The <code>TransformParameter</code> containing the URI of the data.
+ *
* @pre URI != null
* @post return != null
*/
public abstract TransformParameter createTransformParameter(String URI);
/**
- * Creata a new <code>TransformParameter</code> object containing the
- * binary data.
- *
- * @param URI The URI identifying the data.
- * @param binaryData The binary data.
+ * Creata a new <code>TransformParameter</code> object containing the binary
+ * data.
+ *
+ * @param URI The URI identifying the data.
+ * @param binaryData The binary data.
* @return The <code>TransformParameter</code> containig the binary data.
- *
+ *
* @pre URI != null
* @pre binary != null
* @post return != null
*/
public abstract TransformParameter createTransformParameter(
- String URI,
- InputStream binaryData);
+ String URI,
+ InputStream binaryData);
/**
- * Create a new <code>TransformParameter</code> object containing the hash
- * value of the transformation data.
- *
- * @param URI The URI identifying the data. It will be resolved during
- * signature verification.
- * @param digestMethod The digest method used for calculating the digest
- * value.
- * @param digestValue The hash value of the transformation data.
+ * Create a new <code>TransformParameter</code> object containing the hash value
+ * of the transformation data.
+ *
+ * @param URI The URI identifying the data. It will be resolved during
+ * signature verification.
+ * @param digestMethod The digest method used for calculating the digest value.
+ * @param digestValue The hash value of the transformation data.
* @return The <code>TransformParameter</code> containing the above data.
- *
+ *
* @pre URI != null
* @pre digestMethod != null
* @pre digestValue != null
*/
public abstract TransformParameter createTransformParameter(
- String URI,
- String digestMethod,
- byte[] digestValue);
+ String URI,
+ String digestMethod,
+ byte[] digestValue);
/**
* Create a new <code>VerifyXMLSignatureResponse</code> object.
- *
- * @param signerInfo Information about the signer certificate.
- * @param hashInputDatas The signed data objects. May be <code>null</code>.
- * @param referenceInputDatas The reference input data objects.
- * May be <code>null</code>.
- * @param signatureCheck Status information about the signature check.
- * @param signatureManifestCheck Status information about the signature
- * manifest check.
- * @param xmlDsigManifestChecks Status information about each XMLDsig manifest
- * check.
- * @param certificateCheck Status information about the signer certificate
- * check.
+ *
+ * @param signerInfo Information about the signer certificate.
+ * @param hashInputDatas The signed data objects. May be
+ * <code>null</code>.
+ * @param referenceInputDatas The reference input data objects. May be
+ * <code>null</code>.
+ * @param signatureCheck Status information about the signature check.
+ * @param signatureManifestCheck Status information about the signature manifest
+ * check.
+ * @param xmlDsigManifestChecks Status information about each XMLDsig manifest
+ * check.
+ * @param certificateCheck Status information about the signer certificate
+ * check.
* @return The <code>VerifyXMLSignatureResponse</code> containing the above
- * data.
- *
+ * data.
+ *
* @pre signerInfo != null
- * @pre hashInputDatas != null implies
- * forall Object o in hashInputDatas |
- * o instanceof at.gv.egovernment.moa.spss.api.common.Content
- * @pre referenceInputDatas != null implies
- * forall Object o in referenceInputDatas |
- * o instanceof at.gv.egovernment.moa.spss.api.common.Content
+ * @pre hashInputDatas != null implies forall Object o in hashInputDatas | o
+ * instanceof at.gv.egovernment.moa.spss.api.common.Content
+ * @pre referenceInputDatas != null implies forall Object o in
+ * referenceInputDatas | o instanceof
+ * at.gv.egovernment.moa.spss.api.common.Content
* @pre signatureCheck != null
- * @pre xmlDsigManifestChecks != null implies
- * forall Object o in xmlDsigManifestChecks |
- * o instanceof at.gv.egovernment.moa.spss.api.xmlverifyManifestRefsCheckResult
+ * @pre xmlDsigManifestChecks != null implies forall Object o in
+ * xmlDsigManifestChecks | o instanceof
+ * at.gv.egovernment.moa.spss.api.xmlverifyManifestRefsCheckResult
* @pre certificateCheck != null
* @post return != null
*/
public abstract VerifyXMLSignatureResponse createVerifyXMLSignatureResponse(
- SignerInfo signerInfo,
- List hashInputDatas,
- List referenceInputDatas,
- ReferencesCheckResult signatureCheck,
- ReferencesCheckResult signatureManifestCheck,
- List xmlDsigManifestChecks,
- CheckResult certificateCheck,
- List adesFormResults,
- ExtendedCertificateCheckResult extCheckResult,
- String signatureAlgorithm);
+ SignerInfo signerInfo,
+ List hashInputDatas,
+ List referenceInputDatas,
+ ReferencesCheckResult signatureCheck,
+ ReferencesCheckResult signatureManifestCheck,
+ List xmlDsigManifestChecks,
+ CheckResult certificateCheck,
+ List adesFormResults,
+ ExtendedCertificateCheckResult extCheckResult,
+ String signatureAlgorithm);
/**
* Create a new <code>ReferencesCheckResult</code> object.
- *
+ *
* @param code The status code.
* @param info Additional information about the reference check.
* @return The <code>ReferencesCheckResult</code> containing the above data.
- *
+ *
* @pre code >= 0
* @post return != null
*/
public abstract ReferencesCheckResult createReferencesCheckResult(
- int code,
- ReferencesCheckResultInfo info);
+ int code,
+ ReferencesCheckResultInfo info);
/**
* Create a new <code>ReferencesCheckResultInfo</code> object.
- *
- * @param anyOtherInfo Arbitrary XML content describing the check result.
- * May be <code>null</code>.
- * @param failedReferences The indexes of the failed references. May be
- * <code>null</code>.
- * @return The <code>ReferencesCheckResultInfo</code> containing the above
- * data.
- *
+ *
+ * @param anyOtherInfo Arbitrary XML content describing the check result.
+ * May be <code>null</code>.
+ * @param failedReferences The indexes of the failed references. May be
+ * <code>null</code>.
+ * @return The <code>ReferencesCheckResultInfo</code> containing the above data.
+ *
* @post return != null
*/
public abstract ReferencesCheckResultInfo createReferencesCheckResultInfo(
- NodeList anyOtherInfo,
- int[] failedReferences);
+ NodeList anyOtherInfo,
+ int[] failedReferences);
/**
* Create a new <code>ManifestRefsCheckResult</code> object.
- *
+ *
* @param code The status code.
* @param info Additional information about the manifest check. May be
- * <code>null</code>.
- * @return The <code>ManifestRefsCheckResult</code> containing the above
- * data.
- *
+ * <code>null</code>.
+ * @return The <code>ManifestRefsCheckResult</code> containing the above data.
+ *
* @pre code >= 0
* @post return != null
*/
public abstract ManifestRefsCheckResult createManifestRefsCheckResult(
- int code,
- ManifestRefsCheckResultInfo info);
+ int code,
+ ManifestRefsCheckResultInfo info);
/**
* Create a new <code>ManifestRefsCheckResultInfo</code> object.
- *
- * @param anyOtherInfo Arbitrary XML content describing the check result.
- * May be <code>null</code>.
- * @param failedReferences The indexes of the failed references. May be
- * <code>null</code>.
+ *
+ * @param anyOtherInfo Arbitrary XML content describing the check
+ * result. May be <code>null</code>.
+ * @param failedReferences The indexes of the failed references. May be
+ * <code>null</code>.
* @param referringSigReference The index of the reference in the signature.
- * @return The <code>ManifestRefsCheckResultInfo</code> containing the
- * above data.
- *
+ * @return The <code>ManifestRefsCheckResultInfo</code> containing the above
+ * data.
+ *
* @pre referringSigReference > 0
* @post return != null
*/
public abstract ManifestRefsCheckResultInfo createManifestRefsCheckResultInfo(
- NodeList anyOtherInfo,
- int[] failedReferences,
- int referringSigReference);
+ NodeList anyOtherInfo,
+ int[] failedReferences,
+ int referringSigReference);
//
// Factory methods for common objects
@@ -948,10 +934,10 @@ public abstract class SPSSFactory {
/**
* Create a new <code>Content</code> object referencing data via a URI.
- *
+ *
* @param referenceURI The URI pointing to the content.
* @return The <code>Content</code> object containing the reference.
- *
+ *
* @pre referenceURI != null && referenceURI.length() > 0
* @post return != null
*/
@@ -959,41 +945,43 @@ public abstract class SPSSFactory {
/**
* Create a new <code>Content</code> object containing binary data.
- *
- * @param binaryData An <code>InputStream</code> containing the binary data.
+ *
+ * @param binaryData An <code>InputStream</code> containing the binary data.
* @param referenceURI An URI identifying the data. May be <code>null</code>.
* @return The <code>Content</code> object containing the data.
- *
+ *
* @pre binaryData != null
* @post return != null
*/
public abstract Content createContent(
- InputStream binaryData,
- String referenceURI);
+ InputStream binaryData,
+ String referenceURI);
/**
- * Create a new <code>Content</code> object containing location reference data.
- *
- * @param locationReferenceURI a URI pointing to the actual remote location of the content.
- *
- * @param referenceURI An URI identifying the data. May be <code>null</code>.
- *
- * @return The <code>Content</code> object containing the data.
- *
- * @pre locationReferenceURI != null
- * @post return != null
- */
- public abstract Content createContent(
- String locationReferenceURI,
- String referenceURI);
+ * Create a new <code>Content</code> object containing location reference data.
+ *
+ * @param locationReferenceURI a URI pointing to the actual remote location of
+ * the content.
+ *
+ * @param referenceURI An URI identifying the data. May be
+ * <code>null</code>.
+ *
+ * @return The <code>Content</code> object containing the data.
+ *
+ * @pre locationReferenceURI != null
+ * @post return != null
+ */
+ public abstract Content createContent(
+ String locationReferenceURI,
+ String referenceURI);
/**
* Create a new <code>Content</code> object containing XML data.
- *
- * @param xmlData The XML data contained in the new <code>Content</code>.
+ *
+ * @param xmlData The XML data contained in the new <code>Content</code>.
* @param referenceURI An URI identifying the data. May be <code>null</code>.
* @return The <code>Content</code> object containing the data.
- *
+ *
* @pre xmlData != null
* @post return != null
*/
@@ -1001,13 +989,11 @@ public abstract class SPSSFactory {
/**
* Create a new <code>XMLDataObjectAssociation</code> object.
- *
- * @param metaInfo Information about the content type. May be
- * <code>null</code>.
- * @param content The <code>Content</code> object containing the data.
- * @return The <code>XMLDataObjectAssociation</code> containing the above
- * data.
- *
+ *
+ * @param metaInfo Information about the content type. May be <code>null</code>.
+ * @param content The <code>Content</code> object containing the data.
+ * @return The <code>XMLDataObjectAssociation</code> containing the above data.
+ *
* @pre content != null
* @pre content.getContentType() == Content.CONTENT_XML ||
* content.getContentType() == Contetn.CONTENT_BINARY
@@ -1015,34 +1001,36 @@ public abstract class SPSSFactory {
* @post return != null
*/
public abstract XMLDataObjectAssociation createXMLDataObjectAssociation(
- MetaInfo metaInfo,
- Content content);
+ MetaInfo metaInfo,
+ Content content);
/**
* Create a new <code>MetaInfo</code> object.
- *
- * @param mimeType The MIME type part of the meta information.
+ *
+ * @param mimeType The MIME type part of the meta information.
* @param description Descriptive meta information. May be <code>null</code>.
- * @param otherInfo XML meta information. May be <code>null</code>.
- * @param type Type information for XML signature creation. May be <code>null</code>.
+ * @param otherInfo XML meta information. May be <code>null</code>.
+ * @param type Type information for XML signature creation. May be
+ * <code>null</code>.
* @return The <code>MetaInfo</code> object containing the above data.
- *
+ *
* @pre mimeType != null && mimeType.length() > 0
- * @pre otherInfo != null implies
- * forall Node n in otherInfo | n.getNodeType() == Node.ELEMENT
+ * @pre otherInfo != null implies forall Node n in otherInfo | n.getNodeType()
+ * == Node.ELEMENT
*/
public abstract MetaInfo createMetaInfo(
- String mimeType,
- String description,
- NodeList otherInfo,
- String type);
+ String mimeType,
+ String description,
+ NodeList otherInfo,
+ String type);
/**
- * Create a <code>CanonicalizationTransform</code> type of <code>Transform</code>.
- *
+ * Create a <code>CanonicalizationTransform</code> type of
+ * <code>Transform</code>.
+ *
* @param algorithmURI The algorithm URI of the canonicalization.
* @return The created <code>CanonicalizationTransform</code> object.
- *
+ *
* @pre CanonicalizationTransform.CANONICAL_XML.equals(algorithmURI) ||
* CanonicalizationTransform.CANONICAL_XML_WITH_COMMENTS.equals(algorithmURI)
* @post return != null
@@ -1052,95 +1040,95 @@ public abstract class SPSSFactory {
/**
* Create an <code>ExclusiveCanonicalizationTransform</code> type of
* <code>Transform</code>.
- *
- * @param algorithmURI The algorithm URI of the exclusive canonicalization.
- * @param inclusiveNamespacePrefixes The prefixes of the namespaces to
- * treat according to canonical XML.
+ *
+ * @param algorithmURI The algorithm URI of the exclusive
+ * canonicalization.
+ * @param inclusiveNamespacePrefixes The prefixes of the namespaces to treat
+ * according to canonical XML.
* @return The new <code>ExclusiveCanonicalizationTransform</code>
- *
- * @pre ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML.equals(algorithmURI) ||
+ *
+ * @pre ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML.equals(algorithmURI)
+ * ||
* ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS.equals(algorithmURI)
* @pre inclusiveNamespacePrefixes != null
- * @pre forall Object o in inclusiveNamespacePrefixes | o instanceof String
+ * @pre forall Object o in inclusiveNamespacePrefixes | o instanceof String
* @post return != null
*/
public abstract Transform createExclusiveCanonicalizationTransform(
- String algorithmURI,
- List inclusiveNamespacePrefixes);
+ String algorithmURI,
+ List inclusiveNamespacePrefixes);
/**
* Create a <code>Base64Transform</code> type of <code>Transform</code>.
- *
+ *
* @return A <code>Transform</code> denoting a Base64 decoding.
- *
+ *
* @post return != null
*/
public abstract Transform createBase64Transform();
/**
- * Create a <code>EnvelopedSignatureTransform</code> type of
+ * Create a <code>EnvelopedSignatureTransform</code> type of
* <code>Transform</code>.
- *
+ *
* @return A <code>Transform</code> denoting an enveloped signature.
- *
+ *
* @post return != null
*/
public abstract Transform createEnvelopedSignatureTransform();
/**
* Create an <code>XSLTTransform</code> type of <code>Transform</code>.
- *
- * @param styleSheet The XSLT stylesheet contained in the
- * <code>Transform</code>.
+ *
+ * @param styleSheet The XSLT stylesheet contained in the
+ * <code>Transform</code>.
* @return A <code>Transform</code> containing the XSLT stylesheet.
- *
+ *
* @post return != null
*/
public abstract Transform createXSLTTransform(Element styleSheet);
/**
* Create an <code>XPathTransform</code> type of <code>Transform</code>.
- *
- * @param xPathExpression The XPath expression to use in the created
- * <code>Transform</code>.
- * @param namespaceDeclarations The namespace prefix to URI mapping to
- * apply on evaluation of the XPath expression.
+ *
+ * @param xPathExpression The XPath expression to use in the created
+ * <code>Transform</code>.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to apply on
+ * evaluation of the XPath expression.
* @return The <code>XPathTransform</code> containing the above data.
- *
+ *
* @pre xPathExpression != null
* @pre namespaceDeclarations != null
* @post return != null
*/
public abstract Transform createXPathTransform(
- String xPathExpression,
- Map namespaceDeclarations);
+ String xPathExpression,
+ Map namespaceDeclarations);
/**
- * Create a new <code>XPathFilter2Transform</code> type of
- * <code>Transform</code>.
- *
+ * Create a new <code>XPathFilter2Transform</code> type of
+ * <code>Transform</code>.
+ *
* @param xPathFilters The filters contained in the newly created
- * <code>XPathFilter2Transform</code>.
- * @return The <code>XPathFilter2Transform</code> containing the given
- * filters.
- *
- * @pre xPathFilters != null &&
- * forall Object o in xPathFilters |
- * o instanceof at.gv.egovernment.moa.spss.api.common.XPathFilter
+ * <code>XPathFilter2Transform</code>.
+ * @return The <code>XPathFilter2Transform</code> containing the given filters.
+ *
+ * @pre xPathFilters != null && forall Object o in xPathFilters | o instanceof
+ * at.gv.egovernment.moa.spss.api.common.XPathFilter
* @post return != null
*/
public abstract Transform createXPathFilter2Transform(List xPathFilters);
/**
* Create a new <code>XPathFilter</code> object.
- *
- * @param filterType The type of filter.
- * @param xPathExpression The XPath expression contained in this filter.
- * @param namespaceDeclarations The namespace prefix to URI mapping to apply
- * on evaluation of the XPath expression.
+ *
+ * @param filterType The type of filter.
+ * @param xPathExpression The XPath expression contained in this filter.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to apply on
+ * evaluation of the XPath expression.
* @return The <code>XPathFilter</code> containing the above data.
- *
- * @pre XPathFilter.SUBTRACT_TYPE.equals(filterType) ||
+ *
+ * @pre XPathFilter.SUBTRACT_TYPE.equals(filterType) ||
* XPathFilter.INTERSECT_TYPE.equals(filterType) ||
* XPathFilter.UNION_TYPE.equals(filterType)
* @pre xPathExpression != null
@@ -1148,73 +1136,76 @@ public abstract class SPSSFactory {
* @post return != null
*/
public abstract XPathFilter createXPathFilter(
- String filterType,
- String xPathExpression,
- Map namespaceDeclarations);
+ String filterType,
+ String xPathExpression,
+ Map namespaceDeclarations);
/**
* Create a new <code>CheckResult</code> object.
- *
+ *
* @param code The check code.
* @param info Verbose information about the check. May be <code>null</code>.
* @return The <code>CheckResult</code> containing the above data.
- *
+ *
* @pre code >= 0
* @post return != null
*/
public abstract CheckResult createCheckResult(int code, NodeList info);
-
-
/**
* Create a new <code>SignerInfo</code> object.
- *
- * @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
- * (if <code>publicAuthority</code> is <code>true</code>). May be
- * <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.
- * @param tslInfos contains information from Trust-Status List for the signer certificate
+ *
+ * @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 (if
+ * <code>publicAuthority</code> is
+ * <code>true</code>). May be <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.
+ * @param tslInfos contains information from Trust-Status List for
+ * the signer certificate
* @return The <code>SignerInfo</code> containing the above data.
- *
+ *
* @pre signerCertSubjectName != null
* @pre signerCertIssuerSerial != null
* @pre signerCertificate != null
*/
public abstract SignerInfo createSignerInfo(
- X509Certificate signerCertificate,
- boolean qualifiedCertificate,
- boolean qcSourceTSL,
- boolean publicAuthority,
- String publicAuthorityID,
- boolean sscd,
- boolean sscdSourceTSL,
- String issuerCountryCode,
- Date signingTime,
- TslInfos tslInfos);
-
+ X509Certificate signerCertificate,
+ boolean qualifiedCertificate,
+ boolean qcSourceTSL,
+ boolean publicAuthority,
+ String publicAuthorityID,
+ boolean sscd,
+ boolean sscdSourceTSL,
+ String issuerCountryCode,
+ Date signingTime,
+ TslInfos tslInfos);
+
/**
* Create a new <code>X509IssuerSerial</code> object.
- *
- * @param issuerName The distinguished name of the issuer.
+ *
+ * @param issuerName The distinguished name of the issuer.
* @param issuerSerial The certificate serial number.
* @return The <code>X509IssuerSerial</code> containing the above data.
- *
+ *
* @pre issuerName != null
* @pre issuerSerial != null
*/
public abstract X509IssuerSerial createX509IssuerSerial(
- String issuerName,
- BigInteger issuerSerial);
+ String issuerName,
+ BigInteger issuerSerial);
}