From 578ad0d6bc408edf9e6c875156054374f5fd8337 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Mon, 22 Mar 2021 18:40:26 +0100 Subject: change to EGIZ codestyle --- .../gv/egovernment/moa/spss/api/SPSSFactory.java | 1195 ++++++++++---------- 1 file changed, 593 insertions(+), 602 deletions(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java') 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 getInstance() to get a concrete factory instance. Using - * this instance, concrete MOA SP/SS API object can be created. - * + * + * Use getInstance() 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 CreateXMLSignatureRequest object. - * - * @param keyIdentifier The identifier for the key group to use for signing. - * @param singleSignatureInfos A List of - * SingleSignatureInfo objects containing information about a - * single signature to be created. - * @return The CreateXMLSignatureRequest containing the above - * data. - * + * + * @param keyIdentifier The identifier for the key group to use for + * signing. + * @param singleSignatureInfos A List of + * SingleSignatureInfo objects + * containing information about a single signature + * to be created. + * @return The CreateXMLSignatureRequest 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 CreateCMSSignatureRequest object. - * - * @param keyIdentifier The identifier for the key group to use for signing. - * @param singleSignatureInfos A List of - * SingleSignatureInfo objects containing information about a - * single signature to be created. - * @return The CreateCMSSignatureRequest containing the above - * data. - * + * + * @param keyIdentifier The identifier for the key group to use for + * signing. + * @param singleSignatureInfos A List of + * SingleSignatureInfo objects + * containing information about a single signature + * to be created. + * @return The CreateCMSSignatureRequest 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 SingleSignatureInfo object. - * - * @param dataObjectInfos The data objects that will be signed (including - * transformations). - * @param createSignatureInfo Information about the signature environment. May - * be null. + * + * @param dataObjectInfos The data objects that will be signed (including + * transformations). + * @param createSignatureInfo Information about the signature environment. May + * be null. * @param securityLayerConform If true, a Security Layer conform - * signature manifest is created, otherwise not. + * signature manifest is created, otherwise not. * @return The SingleSignatureInfo 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 SingleSignatureInfo object. - * - * @param dataObjectInfo The data object that will be signed. + * + * @param dataObjectInfo The data object that will be signed. * @param securityLayerConform If true, a Security Layer conform - * signature manifest is created, otherwise not. - * @param isPAdESSignature + * signature manifest is created, otherwise not. + * @param isPAdESSignature * @return The SingleSignatureInfo 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 DataObjectInfo object. - * - * @param structure The type of signature to create. - * @param childOfManifest If true, 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 true, 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 DataObjectInfo 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 DataObjectInfo 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 DataObjectInfo 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 CreateTransformsInfoProfile 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 CreateTransformsInfoProfile 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 CreateTransformsInfoProfile 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 - * null. + * Create a new CreateTransformsInfoProfile 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 + * null. * @return The CreateTransformsInfoProfile 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 CreateTransformsInfo object. - * - * @param transforms The Transforms to apply to the associated - * data object. May be null. - * @param finalDataMetaInfo Information about the type of the transformed - * data. + * + * @param transforms The Transforms to apply to the + * associated data object. May be null. + * @param finalDataMetaInfo Information about the type of the transformed data. * @return The CreateTransformsInfo 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 CreateSignatureInfo 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 CreateSignatureInfo 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 CreateSignatureEnvironmentProfile object - * containing a reference to a locally stored profile. - * + * Create a new CreateSignatureEnvironmentProfile object containing + * a reference to a locally stored profile. + * * @param profileID The profile ID to resolve during signature creation. - * @return The CreateSignatureEnvironmentProfile containing - * the given profile ID. - * + * @return The CreateSignatureEnvironmentProfile containing the + * given profile ID. + * * @pre profileID != null && profileID.length() > 0 * @post return != null */ public abstract CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(String profileID); /** - * Create a new CreateSignatureEnvironmentProfile object by - * providing the profile data explicitly. - * + * Create a new CreateSignatureEnvironmentProfile 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 CreateSignatureEnvironmentProfile 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 CreateSignatureLocation 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 CreateSignatureLocation 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 CreateXMLSignatureResponse object. - * - * @param responseElements The elements of the response, either - * SignatureEnvironmentResponse objects, or - * ErrorResponse objects. - * @return The new CreateXMLSignatureResponse containing the - * above data. - * + * + * @param responseElements The elements of the response, either + * SignatureEnvironmentResponse objects, or + * ErrorResponse objects. + * @return The new CreateXMLSignatureResponse 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 CreateCMSSignatureResponse object. - * - * @param responseElements The elements of the response, either - * CMSSignatureResponse objects, or - * ErrorResponse objects. - * @return The new CreateCMSSignatureResponse containing the - * above data. - * + * + * @param responseElements The elements of the response, either + * CMSSignatureResponse objects, or + * ErrorResponse objects. + * @return The new CreateCMSSignatureResponse 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 SignatureEnvironmentResponse object. - * + * * @param signatureEnvironment The signature environment containing the - * signature. + * signature. * @return The SignatureEnvironmentResponse containing the - * signatureEnvironment. - * + * signatureEnvironment. + * * @pre signatureEnvironment != null * @post return != null */ public abstract CMSSignatureResponse createCMSSignatureResponse(String base64value); - + /** * Create a new SignatureEnvironmentResponse object. - * + * * @param signatureEnvironment The signature environment containing the - * signature. + * signature. * @return The SignatureEnvironmentResponse containing the - * signatureEnvironment. - * + * signatureEnvironment. + * * @pre signatureEnvironment != null * @post return != null */ - public abstract SignatureEnvironmentResponse createSignatureEnvironmentResponse(Element signatureEnvironment); + public abstract SignatureEnvironmentResponse createSignatureEnvironmentResponse( + Element signatureEnvironment); /** * Create a new ErrorResponse object. - * + * * @param code The numerical error code. * @param info Verbose error information. * @return The new ErrorResponse containing the above data. - * + * * @pre code > 0 * @pre info != null * @post return != null @@ -445,91 +441,87 @@ public abstract class SPSSFactory { /** * Create a new VerifyCMSSignatureRequest 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 null. - * @param cmsSignature The CMS signature. - * @param dataObject The signed data. May be null. - * @param trustProfileID The ID of the trust profile containing the trusted - * root certificates. - * @return The VerifyCMSSignatureRequest 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 null. + * @param cmsSignature The CMS signature. + * @param dataObject The signed data. May be null. + * @param trustProfileID The ID of the trust profile containing the trusted root + * certificates. + * @return The VerifyCMSSignatureRequest 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 VerifyCMSSignatureRequest 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 null. - * @param cmsSignature The CMS signature. - * @param dataObject The signed data. May be null. - * @param trustProfileID The ID of the trust profile containing the trusted - * root certificates. - * @return The VerifyCMSSignatureRequest 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 null. + * @param cmsSignature The CMS signature. + * @param dataObject The signed data. May be null. + * @param trustProfileID The ID of the trust profile containing the trusted root + * certificates. + * @return The VerifyCMSSignatureRequest 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 CMSDataObject object from data at a given URI. - * - * @param metaInfo Type information about the CMSDataObject. - * May be null. - * @param content The CMS content containing the data. + * + * @param metaInfo Type information about the CMSDataObject. May be + * null. + * @param content The CMS content containing the data. * @return The new CMSDataObject 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 CMSContent object from the data contained at the * given URI. - * + * * @param referenceURI The URI identifying the data. Must be resolvable. * @return The CMSContent 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 CMSContent object from a byte stream. - * + * * @param binaryContent The byte stream containing the signed data. - * @return The new CMSContent containing the data from the - * byte stream. - * + * @return The new CMSContent containing the data from the byte + * stream. + * * @pre binaryContent != null * @post return != null */ @@ -549,41 +541,40 @@ public abstract class SPSSFactory { /** * Create a new VerifyCMSSignatureResponse object. - * + * * @param responseElements Verification information about each signature. - * @return The new VerifyCMSSignatureResponse 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 VerifyCMSSignatureResponse 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 VerifyCMSSignatureResponseElement 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 VerifyCMSSignatureResponseElement containing - * the above data. - * - * @pre signerInfo != null && signatureCheck != null && - * certificateCheck != null + * @return The new VerifyCMSSignatureResponseElement 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 VerifyXMLSignatureRequest object. - * - * @param dateTime The date for which the verification is to be performed. - * May be null. - * @param verifySignatureInfo Information about the signature environment and - * the location of the signature. - * @param supplementProfiles Supplemental information for the signature - * environment. May be null. + * + * @param dateTime The date for which the verification is to be + * performed. May be null. + * @param verifySignatureInfo Information about the signature environment + * and the location of the signature. + * @param supplementProfiles Supplemental information for the signature + * environment. May be null. * @param signatureManifestParams Additional information for checking the - * signature manifest. May be null. - * @param returnHashInputData If true, 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 VerifyXMLSignatureRequest containing the - * above data. - * + * signature manifest. May be null. + * @param returnHashInputData If true, 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 VerifyXMLSignatureRequest 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 VerifyXMLSignatureRequest object. - * - * @param dateTime The date for which the verification is to be performed. - * May be null. - * @param verifySignatureInfo Information about the signature environment and - * the location of the signature. - * @param supplementProfiles Supplemental information for the signature - * environment. May be null. + * + * @param dateTime The date for which the verification is to be + * performed. May be null. + * @param verifySignatureInfo Information about the signature environment + * and the location of the signature. + * @param supplementProfiles Supplemental information for the signature + * environment. May be null. * @param signatureManifestParams Additional information for checking the - * signature manifest. May be null. - * @param returnHashInputData If true, 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 VerifyXMLSignatureRequest containing the - * above data. - * + * signature manifest. May be null. + * @param returnHashInputData If true, 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 VerifyXMLSignatureRequest 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 VerifySignatureInfo 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 VerifySignatureInfo 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 VerifySignatureLocation 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 VerifySignatureLocation 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 SupplementProfile object containing a reference - * to a locally stored profile. - * + * Create a new SupplementProfile object containing a reference to + * a locally stored profile. + * * @param profileID The profile ID to resolve during signature verification. * @return The SupplementProfile containing the profile ID. - * + * * @pre profileID != null && profileID.length() > 0 * @post return != null */ @@ -707,7 +698,7 @@ public abstract class SPSSFactory { /** * Create a new SupplementProfile object by providing the profile * data explicitly. - * + * * @param supplementProfile The profile data. * @return The SupplementProfile containing the profile data. */ @@ -715,232 +706,227 @@ public abstract class SPSSFactory { /** * Create a new SignatureManifestCheckParams object. - * - * @param referenceInfos Information for checking the validity of a - * a reference. - * @param returnReferenceInputData If true, the input data to - * the calculation of reference digest values will be returned in the - * response, otherwise not. - * @return The SignatureManifestCheckParams containing the - * above data. - * + * + * @param referenceInfos Information for checking the validity of a a + * reference. + * @param returnReferenceInputData If true, the input data to the + * calculation of reference digest values will + * be returned in the response, otherwise not. + * @return The SignatureManifestCheckParams 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 ReferenceInfo object. - * - * @param verifyTransformsInfoProfiles The transformation profiles valid for - * the associated reference. - * @return The ReferenceInfo 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 ReferenceInfo 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 VerifyTransformsInfoProfile object containing - * a reference to a locally stored profile. - * + * Create a new VerifyTransformsInfoProfile object containing a + * reference to a locally stored profile. + * * @param profileID The profile ID to resolve during signature verification. - * @return The VerifyTransformsInfoProfile containing the - * given profile ID. - * + * @return The VerifyTransformsInfoProfile containing the given + * profile ID. + * * @pre profileID != null && profileID.length() > 0 * @post return != null */ public abstract VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(String profileID); /** - * Create a new VerifyTransformsInfoProfile object by providing - * the profile data explicitly. - * - * @param transforms A valid chain of transformations for the reference. - * May be null. + * Create a new VerifyTransformsInfoProfile object by providing the + * profile data explicitly. + * + * @param transforms A valid chain of transformations for the + * reference. May be null. * @param transformParameters Additional transformation information. * @return The VerifyTransformsInfoProfile 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 TransformParameter object with the data - * contained at the given URI. - * + * Create a new TransformParameter 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 TransformParameter containing the URI of the - * data. - * + * signature verification. + * @return The TransformParameter containing the URI of the data. + * * @pre URI != null * @post return != null */ public abstract TransformParameter createTransformParameter(String URI); /** - * Creata a new TransformParameter object containing the - * binary data. - * - * @param URI The URI identifying the data. - * @param binaryData The binary data. + * Creata a new TransformParameter object containing the binary + * data. + * + * @param URI The URI identifying the data. + * @param binaryData The binary data. * @return The TransformParameter 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 TransformParameter 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 TransformParameter 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 TransformParameter 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 VerifyXMLSignatureResponse object. - * - * @param signerInfo Information about the signer certificate. - * @param hashInputDatas The signed data objects. May be null. - * @param referenceInputDatas The reference input data objects. - * May be null. - * @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 + * null. + * @param referenceInputDatas The reference input data objects. May be + * null. + * @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 VerifyXMLSignatureResponse 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 ReferencesCheckResult object. - * + * * @param code The status code. * @param info Additional information about the reference check. * @return The ReferencesCheckResult 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 ReferencesCheckResultInfo object. - * - * @param anyOtherInfo Arbitrary XML content describing the check result. - * May be null. - * @param failedReferences The indexes of the failed references. May be - * null. - * @return The ReferencesCheckResultInfo containing the above - * data. - * + * + * @param anyOtherInfo Arbitrary XML content describing the check result. + * May be null. + * @param failedReferences The indexes of the failed references. May be + * null. + * @return The ReferencesCheckResultInfo containing the above data. + * * @post return != null */ public abstract ReferencesCheckResultInfo createReferencesCheckResultInfo( - NodeList anyOtherInfo, - int[] failedReferences); + NodeList anyOtherInfo, + int[] failedReferences); /** * Create a new ManifestRefsCheckResult object. - * + * * @param code The status code. * @param info Additional information about the manifest check. May be - * null. - * @return The ManifestRefsCheckResult containing the above - * data. - * + * null. + * @return The ManifestRefsCheckResult 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 ManifestRefsCheckResultInfo object. - * - * @param anyOtherInfo Arbitrary XML content describing the check result. - * May be null. - * @param failedReferences The indexes of the failed references. May be - * null. + * + * @param anyOtherInfo Arbitrary XML content describing the check + * result. May be null. + * @param failedReferences The indexes of the failed references. May be + * null. * @param referringSigReference The index of the reference in the signature. - * @return The ManifestRefsCheckResultInfo containing the - * above data. - * + * @return The ManifestRefsCheckResultInfo 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 Content object referencing data via a URI. - * + * * @param referenceURI The URI pointing to the content. * @return The Content object containing the reference. - * + * * @pre referenceURI != null && referenceURI.length() > 0 * @post return != null */ @@ -959,41 +945,43 @@ public abstract class SPSSFactory { /** * Create a new Content object containing binary data. - * - * @param binaryData An InputStream containing the binary data. + * + * @param binaryData An InputStream containing the binary data. * @param referenceURI An URI identifying the data. May be null. * @return The Content 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 Content 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 null. - * - * @return The Content object containing the data. - * - * @pre locationReferenceURI != null - * @post return != null - */ - public abstract Content createContent( - String locationReferenceURI, - String referenceURI); + * Create a new Content 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 + * null. + * + * @return The Content object containing the data. + * + * @pre locationReferenceURI != null + * @post return != null + */ + public abstract Content createContent( + String locationReferenceURI, + String referenceURI); /** * Create a new Content object containing XML data. - * - * @param xmlData The XML data contained in the new Content. + * + * @param xmlData The XML data contained in the new Content. * @param referenceURI An URI identifying the data. May be null. * @return The Content object containing the data. - * + * * @pre xmlData != null * @post return != null */ @@ -1001,13 +989,11 @@ public abstract class SPSSFactory { /** * Create a new XMLDataObjectAssociation object. - * - * @param metaInfo Information about the content type. May be - * null. - * @param content The Content object containing the data. - * @return The XMLDataObjectAssociation containing the above - * data. - * + * + * @param metaInfo Information about the content type. May be null. + * @param content The Content object containing the data. + * @return The XMLDataObjectAssociation 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 MetaInfo 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 null. - * @param otherInfo XML meta information. May be null. - * @param type Type information for XML signature creation. May be null. + * @param otherInfo XML meta information. May be null. + * @param type Type information for XML signature creation. May be + * null. * @return The MetaInfo 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 CanonicalizationTransform type of Transform. - * + * Create a CanonicalizationTransform type of + * Transform. + * * @param algorithmURI The algorithm URI of the canonicalization. * @return The created CanonicalizationTransform 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 ExclusiveCanonicalizationTransform type of * Transform. - * - * @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 ExclusiveCanonicalizationTransform - * - * @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 Base64Transform type of Transform. - * + * * @return A Transform denoting a Base64 decoding. - * + * * @post return != null */ public abstract Transform createBase64Transform(); /** - * Create a EnvelopedSignatureTransform type of + * Create a EnvelopedSignatureTransform type of * Transform. - * + * * @return A Transform denoting an enveloped signature. - * + * * @post return != null */ public abstract Transform createEnvelopedSignatureTransform(); /** * Create an XSLTTransform type of Transform. - * - * @param styleSheet The XSLT stylesheet contained in the - * Transform. + * + * @param styleSheet The XSLT stylesheet contained in the + * Transform. * @return A Transform containing the XSLT stylesheet. - * + * * @post return != null */ public abstract Transform createXSLTTransform(Element styleSheet); /** * Create an XPathTransform type of Transform. - * - * @param xPathExpression The XPath expression to use in the created - * Transform. - * @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 + * Transform. + * @param namespaceDeclarations The namespace prefix to URI mapping to apply on + * evaluation of the XPath expression. * @return The XPathTransform 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 XPathFilter2Transform type of - * Transform. - * + * Create a new XPathFilter2Transform type of + * Transform. + * * @param xPathFilters The filters contained in the newly created - * XPathFilter2Transform. - * @return The XPathFilter2Transform containing the given - * filters. - * - * @pre xPathFilters != null && - * forall Object o in xPathFilters | - * o instanceof at.gv.egovernment.moa.spss.api.common.XPathFilter + * XPathFilter2Transform. + * @return The XPathFilter2Transform 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 XPathFilter 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 XPathFilter 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 CheckResult object. - * + * * @param code The check code. * @param info Verbose information about the check. May be null. * @return The CheckResult containing the above data. - * + * * @pre code >= 0 * @post return != null */ public abstract CheckResult createCheckResult(int code, NodeList info); - - /** * Create a new SignerInfo object. - * - * @param signerCertificate The signer certificate in binary form. - * @param qualifiedCertificate true, if the signer certificate is - * a qualified certificate, otherwise false. - * @param qcSourceTSL true, if the QC information comes from the TSL, - * otherwise false. - * @param publicAuthority true, if the signer certificate is a - * public authority certificate, otherwise false. - * @param publicAuthorityID The identification of the public authority - * (if publicAuthority is true). May be - * null. - * @param sscd true, if the TSL check verifies the - * signature based on a SSDC, otherwise false. - * @param sscdSourceTSL true, if the SSCD information comes from the TSL, - * otherwise false. - * @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 true, if the signer certificate is a + * qualified certificate, otherwise + * false. + * @param qcSourceTSL true, if the QC information comes + * from the TSL, otherwise false. + * @param publicAuthority true, if the signer certificate is a + * public authority certificate, otherwise + * false. + * @param publicAuthorityID The identification of the public authority (if + * publicAuthority is + * true). May be null. + * @param sscd true, if the TSL check verifies the + * signature based on a SSDC, otherwise + * false. + * @param sscdSourceTSL true, if the SSCD information comes + * from the TSL, otherwise false. + * @param issuerCountryCode contains the signer certificate issuer country + * code. + * @param tslInfos contains information from Trust-Status List for + * the signer certificate * @return The SignerInfo 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 X509IssuerSerial 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 X509IssuerSerial containing the above data. - * + * * @pre issuerName != null * @pre issuerSerial != null */ public abstract X509IssuerSerial createX509IssuerSerial( - String issuerName, - BigInteger issuerSerial); + String issuerName, + BigInteger issuerSerial); } -- cgit v1.2.3