From 0803aae4bb1a593cbfd97a73a8648ec8ee5f1f76 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> Date: Fri, 7 Nov 2003 17:58:36 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'Build-SPSS_1_1_0'. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/Build-SPSS_1_1_0@42 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../gv/egovernment/moa/spss/api/Configurator.java | 60 -- .../gv/egovernment/moa/spss/api/SPSSFactory.java | 993 --------------------- .../moa/spss/api/SignatureCreationService.java | 57 -- .../moa/spss/api/SignatureVerificationService.java | 69 -- .../moa/spss/api/cmsverify/CMSContent.java | 28 - .../spss/api/cmsverify/CMSContentExcplicit.java | 19 - .../spss/api/cmsverify/CMSContentReference.java | 17 - .../moa/spss/api/cmsverify/CMSDataObject.java | 25 - .../api/cmsverify/VerifyCMSSignatureRequest.java | 52 -- .../api/cmsverify/VerifyCMSSignatureResponse.java | 21 - .../VerifyCMSSignatureResponseElement.java | 32 - .../moa/spss/api/common/Base64Transform.java | 13 - .../spss/api/common/CanonicalizationTransform.java | 17 - .../moa/spss/api/common/CheckResult.java | 25 - .../egovernment/moa/spss/api/common/Content.java | 37 - .../moa/spss/api/common/ContentBinary.java | 21 - .../moa/spss/api/common/ContentReference.java | 11 - .../moa/spss/api/common/ContentXML.java | 19 - .../moa/spss/api/common/ElementSelector.java | 28 - .../api/common/EnvelopedSignatureTransform.java | 15 - .../common/ExclusiveCanonicalizationTransform.java | 27 - .../egovernment/moa/spss/api/common/MetaInfo.java | 31 - .../moa/spss/api/common/SignerInfo.java | 43 - .../egovernment/moa/spss/api/common/Transform.java | 16 - .../moa/spss/api/common/X509IssuerSerial.java | 25 - .../spss/api/common/XMLDataObjectAssociation.java | 25 - .../moa/spss/api/common/XPathFilter.java | 38 - .../moa/spss/api/common/XPathFilter2Transform.java | 25 - .../moa/spss/api/common/XPathTransform.java | 30 - .../moa/spss/api/common/XSLTTransform.java | 23 - .../moa/spss/api/impl/Base64TransformImpl.java | 22 - .../moa/spss/api/impl/CMSContentExplicitImpl.java | 40 - .../moa/spss/api/impl/CMSContentReferenceImpl.java | 38 - .../moa/spss/api/impl/CMSDataObjectImpl.java | 46 - .../api/impl/CanonicalizationTransformImpl.java | 25 - .../moa/spss/api/impl/CheckResultImpl.java | 52 -- .../moa/spss/api/impl/ContentBinaryImpl.java | 40 - .../egovernment/moa/spss/api/impl/ContentImpl.java | 28 - .../moa/spss/api/impl/ContentReferenceImpl.java | 24 - .../moa/spss/api/impl/ContentXMLImpl.java | 40 - ...ateSignatureEnvironmentProfileExplicitImpl.java | 66 -- .../CreateSignatureEnvironmentProfileIDImpl.java | 39 - .../moa/spss/api/impl/CreateSignatureInfoImpl.java | 50 -- .../spss/api/impl/CreateSignatureLocationImpl.java | 31 - .../spss/api/impl/CreateTransformsInfoImpl.java | 51 -- .../CreateTransformsInfoProfileExplicitImpl.java | 62 -- .../impl/CreateTransformsInfoProfileIDImpl.java | 38 - .../api/impl/CreateXMLSignatureRequestImpl.java | 53 -- .../api/impl/CreateXMLSignatureResponseImpl.java | 37 - .../moa/spss/api/impl/DataObjectInfoImpl.java | 79 -- .../moa/spss/api/impl/ElementSelectorImpl.java | 47 - .../api/impl/EnvelopedSignatureTransformImpl.java | 22 - .../moa/spss/api/impl/ErrorResponseImpl.java | 52 -- .../ExclusiveCanonicalizationTransformImpl.java | 48 - .../spss/api/impl/ManifestRefsCheckResultImpl.java | 44 - .../api/impl/ManifestRefsCheckResultInfoImpl.java | 32 - .../moa/spss/api/impl/MetaInfoImpl.java | 59 -- .../moa/spss/api/impl/ReferenceInfoImpl.java | 38 - .../spss/api/impl/ReferencesCheckResultImpl.java | 46 - .../api/impl/ReferencesCheckResultInfoImpl.java | 46 - .../moa/spss/api/impl/SPSSFactoryImpl.java | 559 ------------ .../api/impl/SignatureEnvironmentResponseImpl.java | 41 - .../api/impl/SignatureManifestCheckParamsImpl.java | 52 -- .../moa/spss/api/impl/SignerInfoImpl.java | 81 -- .../moa/spss/api/impl/SingleSignatureInfoImpl.java | 49 - .../api/impl/SupplementProfileExplicitImpl.java | 39 - .../moa/spss/api/impl/SupplementProfileIDImpl.java | 37 - .../moa/spss/api/impl/TransformImpl.java | 26 - .../api/impl/TransformParameterBinaryImpl.java | 42 - .../moa/spss/api/impl/TransformParameterImpl.java | 25 - .../spss/api/impl/TransformParameterURIImpl.java | 24 - .../spss/api/impl/TransformPatameterHashImpl.java | 54 -- .../api/impl/VerifyCMSSignatureRequestImpl.java | 93 -- .../VerifyCMSSignatureResponseElementImpl.java | 62 -- .../api/impl/VerifyCMSSinatureResponseImpl.java | 37 - .../moa/spss/api/impl/VerifySignatureInfoImpl.java | 47 - .../spss/api/impl/VerifySignatureLocationImpl.java | 15 - .../spss/api/impl/VerifyTransformsDataImpl.java | 36 - .../VerifyTransformsInfoProfileExplicitImpl.java | 61 -- .../impl/VerifyTransformsInfoProfileIDImpl.java | 38 - .../api/impl/VerifyXMLSignatureRequestImpl.java | 113 --- .../api/impl/VerifyXMLSignatureResponseImpl.java | 134 --- .../moa/spss/api/impl/X509IssuerSerialImpl.java | 45 - .../api/impl/XMLDataObjectAssociationImpl.java | 45 - .../spss/api/impl/XPathFilter2TransformImpl.java | 43 - .../moa/spss/api/impl/XPathFilterImpl.java | 64 -- .../moa/spss/api/impl/XPathTransformImpl.java | 59 -- .../moa/spss/api/impl/XSLTransformImpl.java | 37 - .../xmlbind/CreateXMLSignatureRequestParser.java | 288 ------ .../xmlbind/CreateXMLSignatureResponseBuilder.java | 119 --- .../moa/spss/api/xmlbind/ProfileParser.java | 285 ------ .../moa/spss/api/xmlbind/RequestParserUtils.java | 147 --- .../moa/spss/api/xmlbind/ResponseBuilderUtils.java | 213 ----- .../moa/spss/api/xmlbind/TransformParser.java | 251 ------ .../xmlbind/VerifyCMSSignatureRequestParser.java | 169 ---- .../xmlbind/VerifyCMSSignatureResponseBuilder.java | 101 --- .../xmlbind/VerifyXMLSignatureRequestParser.java | 275 ------ .../xmlbind/VerifyXMLSignatureResponseBuilder.java | 300 ------- .../xmlsign/CreateSignatureEnvironmentProfile.java | 30 - .../CreateSignatureEnvironmentProfileExplicit.java | 30 - .../CreateSignatureEnvironmentProfileID.java | 20 - .../moa/spss/api/xmlsign/CreateSignatureInfo.java | 25 - .../spss/api/xmlsign/CreateSignatureLocation.java | 23 - .../moa/spss/api/xmlsign/CreateTransformsInfo.java | 27 - .../api/xmlsign/CreateTransformsInfoProfile.java | 28 - .../CreateTransformsInfoProfileExplicit.java | 26 - .../api/xmlsign/CreateTransformsInfoProfileID.java | 18 - .../api/xmlsign/CreateXMLSignatureRequest.java | 26 - .../api/xmlsign/CreateXMLSignatureResponse.java | 20 - .../xmlsign/CreateXMLSignatureResponseElement.java | 29 - .../moa/spss/api/xmlsign/DataObjectInfo.java | 48 - .../moa/spss/api/xmlsign/ErrorResponse.java | 24 - .../api/xmlsign/SignatureEnvironmentResponse.java | 20 - .../moa/spss/api/xmlsign/SingleSignatureInfo.java | 32 - .../api/xmlverify/ManifestRefsCheckResult.java | 24 - .../api/xmlverify/ManifestRefsCheckResultInfo.java | 19 - .../moa/spss/api/xmlverify/ReferenceInfo.java | 19 - .../spss/api/xmlverify/ReferencesCheckResult.java | 23 - .../api/xmlverify/ReferencesCheckResultInfo.java | 25 - .../xmlverify/SignatureManifestCheckParams.java | 26 - .../moa/spss/api/xmlverify/SupplementProfile.java | 28 - .../api/xmlverify/SupplementProfileExplicit.java | 19 - .../spss/api/xmlverify/SupplementProfileID.java | 18 - .../moa/spss/api/xmlverify/TransformParameter.java | 40 - .../api/xmlverify/TransformParameterBinary.java | 21 - .../spss/api/xmlverify/TransformParameterHash.java | 26 - .../spss/api/xmlverify/TransformParameterURI.java | 12 - .../spss/api/xmlverify/VerifySignatureInfo.java | 27 - .../api/xmlverify/VerifySignatureLocation.java | 13 - .../api/xmlverify/VerifyTransformsInfoProfile.java | 28 - .../VerifyTransformsInfoProfileExplicit.java | 25 - .../xmlverify/VerifyTransformsInfoProfileID.java | 18 - .../api/xmlverify/VerifyXMLSignatureRequest.java | 55 -- .../api/xmlverify/VerifyXMLSignatureResponse.java | 60 -- 134 files changed, 8195 deletions(-) delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/Configurator.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/SPSSFactory.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/SignatureCreationService.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/Base64Transform.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/CheckResult.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/Content.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentBinary.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentReference.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentXML.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/ElementSelector.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/MetaInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/SignerInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/Transform.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathTransform.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java (limited to 'spss.server/src/at/gv/egovernment/moa/spss/api') diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/Configurator.java b/spss.server/src/at/gv/egovernment/moa/spss/api/Configurator.java deleted file mode 100644 index a0efa8924..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/Configurator.java +++ /dev/null @@ -1,60 +0,0 @@ -package at.gv.egovernment.moa.spss.api; - -import org.apache.commons.discovery.tools.DiscoverClass; - -import at.gv.egovernment.moa.spss.MOAException; - -/** - * Configures the SP/SS API. - * - * Also handles dynamic configuration updates. - * - * @author Patrick Peck - * @version $Id$ - */ -public abstract class Configurator { - - /** The default implementation class. */ - private static final String DEFAULT_IMPLEMENTATION = - "at.gv.egovernment.moa.spss.server.init.ConfiguratorImpl"; - - /** The single instance of this class. */ - private static Configurator instance = null; - - public static synchronized Configurator getInstance() { - if (instance == null) { - try { - DiscoverClass discover = new DiscoverClass(); - instance = - (Configurator) discover.newInstance( - Configurator.class, - DEFAULT_IMPLEMENTATION); - } catch (Exception e) { - // this can not happen since we provide a valid default - // implementation - } - } - return instance; - } - - /** - * Initialize the SP/SS configuration. - * - * Only a single call to this method will have an effect. Use - * update() for reflecting changes in the configuration instead. - * - * @throws MOAException An error occurred updating the SP/SS configuration. - */ - public abstract void init() throws MOAException; - - /** - * Update the SP/SS configuration. - * - * This will only have an effect after the system has been initialized once - * using init(). - * - * @throws MOAException An error occurred updating the SP/SS configuration. - */ - public abstract void update() throws MOAException; - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/SPSSFactory.java b/spss.server/src/at/gv/egovernment/moa/spss/api/SPSSFactory.java deleted file mode 100644 index 178a45273..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/SPSSFactory.java +++ /dev/null @@ -1,993 +0,0 @@ -package at.gv.egovernment.moa.spss.api; - -import java.io.InputStream; -import java.math.BigInteger; -import java.security.cert.X509Certificate; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import org.apache.commons.discovery.tools.DiscoverClass; - -import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent; -import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement; -import at.gv.egovernment.moa.spss.api.common.CheckResult; -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.common.MetaInfo; -import at.gv.egovernment.moa.spss.api.common.SignerInfo; -import at.gv.egovernment.moa.spss.api.common.Transform; -import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial; -import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; -import at.gv.egovernment.moa.spss.api.common.XPathFilter; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse; -import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse; -import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse; -import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams; -import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile; -import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest; -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. - * - * @author Patrick Peck - * @version $Id$ - */ -public abstract class SPSSFactory { - - /** The default implementation of this class. */ - private static final String DEFAULT_IMPLEMENTATION = - "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); - } catch (Exception e) { - // this can not happen since we provide a valid default - // implementation - } - } - return instance; - } - - // - // Factory methods for creating XML signatures - // - - /** - * 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. - * - * @pre keyIdentifier != null && keyIdentifier.length() > 0 - * @pre singleSignatureInfos != null - * @pre forall Object o in singleSignatureInfos | - * o instanceof at.gv.egovernment.moa.spss.api.common.SingleSignatureInfo - * @post return != null - */ - public abstract CreateXMLSignatureRequest createCreateXMLSignatureRequest( - 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 securityLayerConform If true, a Security Layer conform - * 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 - * @post return != null - */ - public abstract SingleSignatureInfo createSingleSignatureInfo( - List dataObjectInfos, - CreateSignatureInfo createSignatureInfo, boolean securityLayerConform); - - /** - * 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. - * @return The DataObjectInfo containing the above data. - * - * @pre DataObjectInfo.STRUCTURE_DETACHED.equals(structure) || - * DataObjectInfo.STRUCTURE_ENVELOPING.equals(structure) - * @pre dataObject != null - * @pre createTransformsInfoProfile != null - * @post return != null - */ - public abstract DataObjectInfo createDataObjectInfo( - String structure, - boolean childOfManifest, - Content dataObject, - CreateTransformsInfoProfile createTransformsInfoProfile); - - /** - * Create a new CreateTransformsInfoProfile object containing a - * reference to a locally stored profile. - * - * @param profileID The profile ID to resolve during signature creation. - * @return The CreateTransformsInfoProfile containing the given - * 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. - * @return The CreateTransformsInfoProfile containing the above - * data. - * - * @pre transformsInfo != null - * @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); - - /** - * 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. - * @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 finalDataMetaInfo != null - * @post return != null - */ - public abstract CreateTransformsInfo createCreateTransformsInfo( - 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. - * @return The CreateSignatureInfo containing the above data. - * - * @pre createSignatureEnvironment != null - * @pre createSignatureEnvironmentProfile != null - * @post return != null - */ - public abstract CreateSignatureInfo createCreateSignatureInfo( - Content createSignatureEnvironment, - CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile); - - /** - * 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. - * - * @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. - * - * @param createSignatureLocation The location where the signature will be - * inserted. - * @param supplements Additional information about the signature environment. - * @return The CreateSignatureEnvironmentProfile containing the - * above data. - * - * @pre createSignatureLocation != null - * @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); - - /** - * 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 namespaceDeclarations The namespace prefix to URI mapping to apply - * 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); - - /** - * 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. - * - * @pre responseElements != null && responseElements.size() > 0 - * @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 SignatureEnvironmentResponse object. - * - * @param signatureEnvironment The signature environment containing the - * signature. - * @return The SignatureEnvironmentResponse containing the - * signatureEnvironment. - * - * @pre signatureEnvironment != null - * @post return != null - */ - 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 - */ - public abstract ErrorResponse createErrorResponse(int code, String info); - - // - // Factory methods for verifying CMS signatures - // - - /** - * 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. - * - * @pre signatories != null && signatories.length > 0 - * @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); - - /** - * 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. - * @return The new CMSDataObject containing the data. - * - * @pre referenceURI != null - * @pre content != null - * @post return != null - */ - public abstract CMSDataObject createCMSDataObject( - MetaInfo metaInfo, - CMSContent content); - - /** - * 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. - * - * @pre referenceURI != null - * @post return != null - */ - public abstract CMSContent createCMSContent(String referenceURI); - - /** - * 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. - * - * @pre binaryContent != null - * @post return != null - */ - public abstract CMSContent createCMSContent(InputStream binaryContent); - - /** - * 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 - * @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 singature 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 - * @post return != null - */ - public abstract VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement( - SignerInfo signerInfo, - CheckResult signatureCheck, - CheckResult certificateCheck); - - // - // Factory methods for verifying XML signatures - // - - /** - * 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 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. - * - * @pre verifySignatureInfo != null - * @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); - - /** - * 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. - * @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); - - /** - * Create a new VerifySignatureLocation object. - * - * @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. - * @return The new VerifySignatureLocation containing the above - * data. - * - * @pre xPathExpression != null - * @pre namespaceDeclarations != null - * @post return != null - */ - public abstract VerifySignatureLocation createVerifySignatureLocation( - String xPathExpression, - Map namespaceDeclarations); - - /** - * 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 - */ - public abstract SupplementProfile createSupplementProfile(String profileID); - - /** - * Create a new SupplementProfile object by providing the profile - * data explicitly. - * - * @param supplementProfile The profile data. - * @return The SupplementProfile containing the profile data. - */ - public abstract SupplementProfile createSupplementProfile(XMLDataObjectAssociation supplementProfile); - - /** - * 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. - * - * @pre referenceInfos != null && referenceInfos.size() > 0 - * @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); - - /** - * 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 - * @post return != null - */ - public abstract ReferenceInfo createReferenceInfo(List verifyTransformsInfoProfiles); - - /** - * 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. - * - * @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. - * @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 - * @post return != null - */ - public abstract VerifyTransformsInfoProfile createVerifyTransformsInfoProfile( - List transforms, - List transformParameters); - - /** - * 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. - * - * @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. - * @return The TransformParameter containig the binary data. - * - * @pre URI != null - * @pre binary != null - * @post return != null - */ - public abstract TransformParameter createTransformParameter( - 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. - * @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); - - /** - * 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. - * @return The VerifyXMLSignatureResponse containing the above - * 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 signatureCheck != null - * @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); - - /** - * 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); - - /** - * 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. - * - * @post return != null - */ - public abstract ReferencesCheckResultInfo createReferencesCheckResultInfo( - 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. - * - * @pre code >= 0 - * @post return != null - */ - public abstract ManifestRefsCheckResult createManifestRefsCheckResult( - 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 referringSigReference The index of the reference in the signature. - * @return The ManifestRefsCheckResultInfo containing the - * above data. - * - * @pre referringSigReference > 0 - * @post return != null - */ - public abstract ManifestRefsCheckResultInfo createManifestRefsCheckResultInfo( - NodeList anyOtherInfo, - int[] failedReferences, - int referringSigReference); - - // - // Factory methods for common objects - // - - /** - * 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 - */ - public abstract Content createContent(String referenceURI); - - /** - * Create a new Content object containing 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); - - /** - * Create a new Content object containing XML data. - * - * @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 - */ - public abstract Content createContent(NodeList xmlData, String referenceURI); - - /** - * 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. - * - * @pre content != null - * @pre content.getContentType() == Content.CONTENT_XML || - * content.getContentType() == Contetn.CONTENT_BINARY - * @pre content.getReference() != null - * @post return != null - */ - public abstract XMLDataObjectAssociation createXMLDataObjectAssociation( - MetaInfo metaInfo, - Content content); - - /** - * Create a new MetaInfo object. - * - * @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. - * @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 - */ - public abstract MetaInfo createMetaInfo( - String mimeType, - String description, - NodeList otherInfo); - - /** - * 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 - */ - public abstract Transform createCanonicalizationTransform(String algorithmURI); - - /** - * 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. - * @return The new ExclusiveCanonicalizationTransform - * - * @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 - * @post return != null - */ - public abstract Transform createExclusiveCanonicalizationTransform( - 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 - * 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. - * @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. - * @return The XPathTransform containing the above data. - * - * @pre xPathExpression != null - * @pre namespaceDeclarations != null - * @post return != null - */ - public abstract Transform createXPathTransform( - String xPathExpression, - Map namespaceDeclarations); - - /** - * 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 - * @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. - * @return The XPathFilter containing the above data. - * - * @pre XPathFilter.SUBTRACT_TYPE.equals(filterType) || - * XPathFilter.INTERSECT_TYPE.equals(filterType) || - * XPathFilter.UNION_TYPE.equals(filterType) - * @pre xPathExpression != null - * @pre namespaceDeclarations != null - * @post return != null - */ - public abstract XPathFilter createXPathFilter( - 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 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. - * @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 publicAuthority, - String publicAuthorityID); - - /** - * Create a new X509IssuerSerial object. - * - * @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); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/SignatureCreationService.java b/spss.server/src/at/gv/egovernment/moa/spss/api/SignatureCreationService.java deleted file mode 100644 index a84ca2a83..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/SignatureCreationService.java +++ /dev/null @@ -1,57 +0,0 @@ -package at.gv.egovernment.moa.spss.api; - -import at.gv.egovernment.moa.spss.MOAException; - -import org.apache.commons.discovery.tools.DiscoverClass; - - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse; - -/** - * Interface providing functions for signature creation. - * - * @author Patrick Peck - * @version $Id$ - */ -public abstract class SignatureCreationService { - - /** The default implementation class. */ - private static final String DEFAULT_IMPLEMENTATION = - "at.gv.egovernment.moa.spss.server.invoke.SignatureCreationServiceImpl"; - - /** The single instance of this class. */ - private static SignatureCreationService instance = null; - - /** - * Get an instance of the SignatureCreationService. - * - * @return A concrete instance of the SignatureCreationService. - */ - public static synchronized SignatureCreationService getInstance() { - if (instance == null) { - try { - DiscoverClass discover = new DiscoverClass(); - instance = - (SignatureCreationService) discover.newInstance( - SignatureCreationService.class, - DEFAULT_IMPLEMENTATION); - } catch (Exception e) { - // this can not happen since we provide a valid default - // implementation - } - } - return instance; - } - - /** - * Create an XML signature. - * - * @param request Information on how to create the signature. - * @return A CreateXMLSignatureResponse containing the - * signature. - * @throws MOAException Error in server side MOA module. - */ - public abstract CreateXMLSignatureResponse createXMLSignature(CreateXMLSignatureRequest request) - throws MOAException; -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java b/spss.server/src/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java deleted file mode 100644 index d0fcb029a..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java +++ /dev/null @@ -1,69 +0,0 @@ -package at.gv.egovernment.moa.spss.api; - -import org.apache.commons.discovery.tools.DiscoverClass; - -import at.gv.egovernment.moa.spss.MOAException; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse; - -/** - * Interface providing functions for verifying signatures. - * - * @author Patrick Peck - * @version $Id$ - */ -public abstract class SignatureVerificationService { - - /** The default implementation class. */ - private static final String DEFAULT_IMPLEMENTATION = - "at.gv.egovernment.moa.spss.server.invoke.SignatureVerificationServiceImpl"; - - /** The single instance of this class. */ - private static SignatureVerificationService instance = null; - - /** - * Get an instance of the SignatureVerificationService. - * - * @return A concrete instance of the - * SignatureVerificationService. - */ - public static synchronized SignatureVerificationService getInstance() { - if (instance == null) { - try { - DiscoverClass discover = new DiscoverClass(); - instance = - (SignatureVerificationService) discover.newInstance( - SignatureVerificationService.class, - DEFAULT_IMPLEMENTATION); - } catch (Exception e) { - // this can not happen since we provide a valid default - // implementation - } - } - return instance; - } - - /** - * Verify a CMS signature. - * - * @param request Detailed information on the verification that should be - * performed. - * @return A VerifyCMSSignatureResponse object that contains - * information about the performed verification. - * @throws MOAException Error in server side MOA module. - */ - public abstract VerifyCMSSignatureResponse verifyCMSSignature(VerifyCMSSignatureRequest request) - throws MOAException; - /** - * Verfiy an XML Signature. - * - * @param request information on the verification that should be performed. - * @return A VerifyXMLSignatureResponse object that contains - * information about the performed verification. - * @throws MOAException Error in server side MOA module. - */ - public abstract VerifyXMLSignatureResponse verifyXMLSignature(VerifyXMLSignatureRequest request) - throws MOAException; -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java deleted file mode 100644 index b4ecb3937..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.gv.egovernment.moa.spss.api.cmsverify; - -/** - * Base class for objects containing CMS content. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CMSContent { - /** - * Indicates that this object contains a reference to the CMS content. - */ - public static final int REFERENCE_CONTENT = 0; - /** - * Indicates that this object contains the CMS content explicitly. - */ - public static final int EXPLICIT_CONTENT = 1; - - /** - * Gets the type of the contained content. - * - * @return The type of content, either REFERENCE_CONTENT or - * EXPLICIT_CONTENT. - */ - public int getContentType(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java deleted file mode 100644 index 58c2b0259..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java +++ /dev/null @@ -1,19 +0,0 @@ -package at.gv.egovernment.moa.spss.api.cmsverify; - -import java.io.InputStream; - -/** - * Encapsulates binary CMS content. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CMSContentExcplicit extends CMSContent { - /** - * Gets the content as a stream. - * - * @return A stream containing the binary content. - */ - public InputStream getBinaryContent(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java deleted file mode 100644 index 7c4e6d913..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java +++ /dev/null @@ -1,17 +0,0 @@ -package at.gv.egovernment.moa.spss.api.cmsverify; - -/** - * Encapsulates CMS content that is referenced by an URI. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CMSContentReference extends CMSContent { - /** - * Gets the reference URI from wher the content can be retrieved. - * - * @return The reference URI. - */ - public String getReference(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java deleted file mode 100644 index 37f6fd396..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.cmsverify; - -import at.gv.egovernment.moa.spss.api.common.MetaInfo; - -/** - * A data object used for verification of CMS signatures. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CMSDataObject { - /** - * Gets the meta information of the content. - * - * @return An object containig the meta information. - */ - public MetaInfo getMetaInfo(); - /** - * Gets the actual content of the data object. - * - * @return The actual content. - */ - public CMSContent getContent(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java deleted file mode 100644 index 6d1f389af..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java +++ /dev/null @@ -1,52 +0,0 @@ -package at.gv.egovernment.moa.spss.api.cmsverify; - -import java.io.InputStream; -import java.util.Date; - -/** - * Object that encapsulates a request to verify a CMS signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifyCMSSignatureRequest { - /** - * Indicates, that signature checks for all signatories must be returned. - */ - public static int[] ALL_SIGNATORIES = new int[] { -1 }; - /** - * Gets the positions of signatories whose signature must be verified. - * - * @return The positions of signatories. - */ - public int[] getSignatories(); - /** - * Gets the date and time for which the signature verification has to - * be performed. - * - * @return Date and time for which the signature verification has - * to be performed. - */ - public Date getDateTime(); - /** - * Gets the binary CMS signature. - * - * @return An InputStream from which the binary CMS signature - * can be read. - */ - public InputStream getCMSSignature(); - /** - * Gets the data object necessary for the verification. - * - * @return The data object necessary for verification. - */ - public CMSDataObject getDataObject(); - /** - * Gets the profile ID of trusted certificates to be used for signature - * verification. - * - * @return The profile ID of trusted certificates. - */ - public String getTrustProfileId(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java deleted file mode 100644 index 5f2e6d255..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package at.gv.egovernment.moa.spss.api.cmsverify; - -import java.util.List; - - -/** - * Object that encapsulates the response on a request to verify a CMS - * signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifyCMSSignatureResponse { - /** - * Gets the response elements. - * - * @return The response elements. - */ - public List getResponseElements(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java deleted file mode 100644 index 49ddb9419..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java +++ /dev/null @@ -1,32 +0,0 @@ -package at.gv.egovernment.moa.spss.api.cmsverify; - -import at.gv.egovernment.moa.spss.api.common.CheckResult; -import at.gv.egovernment.moa.spss.api.common.SignerInfo; - -/** - * Contains detailed information about the verification of a signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifyCMSSignatureResponseElement { - /** - * Gets a SignerInfo element according to CMS. - * - * @return The SignerInfo element according to CMS. - */ - public SignerInfo getSignerInfo(); - /** - * Gets the result of the signature verification. - * - * @return The result of the signature verification. - */ - public CheckResult getSignatureCheck(); - /** - * Gets the result of the certificate verification. - * - * @return The result of the certificate verification. - */ - public CheckResult getCertificateCheck(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Base64Transform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Base64Transform.java deleted file mode 100644 index 94785727d..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Base64Transform.java +++ /dev/null @@ -1,13 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -/** - * A Transform performing a Base64 decoding. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface Base64Transform extends Transform { - /** Algorithm URI of the Base64 Transform type. */ - public static final String BASE64_DECODING = - "http://www.w3.org/2000/09/xmldsig#base64"; -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java deleted file mode 100644 index 352461e52..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java +++ /dev/null @@ -1,17 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import at.gv.egovernment.moa.util.Constants; - -/** - * A canonicalization type of Transform. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface CanonicalizationTransform extends Transform { - /** Algorithm URI of canonical XML. */ - public static final String CANONICAL_XML = Constants.C14N_URI; - /** Algorithm URI of canonical XML with comments. */ - public static final String CANONICAL_XML_WITH_COMMENTS = - Constants.C14N_WITH_COMMENTS_URI; -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/CheckResult.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/CheckResult.java deleted file mode 100644 index 974483d82..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/CheckResult.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import org.w3c.dom.NodeList; - -/** - * Object encapsulating the result of a signature verification. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CheckResult { - /** - * Gets the result code. - * - * @return The result code. - */ - public int getCode(); - /** - * Gets descriptive information. - * - * @return Descriptive information. - */ - public NodeList getInfo(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Content.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Content.java deleted file mode 100644 index 173e9d395..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Content.java +++ /dev/null @@ -1,37 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -/** - * Encapsulates content data. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface Content { - /** - * Indicates that this object contains a URI reference to some content. - */ - public static final int REFERENCE_CONTENT = 0; - /** - * Indicates that this object contains binary content. - */ - public static final int BINARY_CONTENT = 1; - /** - * Indicates that this object contains XML content. - */ - public static final int XML_CONTENT = 2; - - /** - * Gets the type of content contained in this object. - * - * @return The type of content, either BINARY_CONTENT or - * XML_CONTENT - */ - public int getContentType(); - /** - * Gets the reference to the content data (a URI). - * - * @return The reference to the content data. - */ - public String getReference(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentBinary.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentBinary.java deleted file mode 100644 index 664afa406..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentBinary.java +++ /dev/null @@ -1,21 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import java.io.InputStream; - -/** - * Encapsulates binary content. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface ContentBinary extends Content { - /** - * Get the binary content. - * - * @return An InputStream from which the binary content can - * be read. - */ - public InputStream getBinaryContent(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentReference.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentReference.java deleted file mode 100644 index c10f0c2f8..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentReference.java +++ /dev/null @@ -1,11 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -/** - * Content containing a reference to content data. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface ContentReference extends Content { - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentXML.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentXML.java deleted file mode 100644 index ad5930452..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ContentXML.java +++ /dev/null @@ -1,19 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import org.w3c.dom.NodeList; - -/** - * Encapsulates arbitrary XML content. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface ContentXML extends Content { - /** - * Gets the XML content stored in this object. - * - * @return The XML content. - */ - public NodeList getXMLContent(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ElementSelector.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ElementSelector.java deleted file mode 100644 index 862cb84da..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ElementSelector.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import java.util.Map; - -/** - * A class containing data for selecting single elements using an XPath - * expression. - * - * Derived classes are used to point to the CreateSignatureLocation - * and the VerifySignatureLocation. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface ElementSelector { - /** - * Gets the XPath expression pointing to a single element. - * - * @return The XPath expression to select the signature parent element. - */ - public String getXPathExpression(); - /** - * Gets the namespace prefix to URI mapping to use when evaluating the XPath. - * - * @return The namespace prefix to URI mapping. - */ - public Map getNamespaceDeclarations(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java deleted file mode 100644 index f951e35c0..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java +++ /dev/null @@ -1,15 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -/** - * An enveloped signature type of Transform. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface EnvelopedSignatureTransform extends Transform { - /** - * Algorithm URI of the enveloped signature type of Transform. - */ - public static final String ENVELOPED_SIGNATURE = - "http://www.w3.org/2000/09/xmldsig#enveloped-signature"; -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java deleted file mode 100644 index 369270259..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java +++ /dev/null @@ -1,27 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import java.util.List; - -import at.gv.egovernment.moa.util.Constants; - -/** - * An exclusive canonicalization type of Transform. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface ExclusiveCanonicalizationTransform extends Transform { - /** Algorithm URI of exclusive canonical XML. */ - public static final String EXCLUSIVE_CANONICAL_XML = Constants.EXC_C14N_URI; - /** Algorithm URI of exclusive canonical XML with comments. */ - public static final String EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS = - Constants.EXC_C14N_WITH_COMMENTS_URI; - - /** - * Sets the namespace prefixes that are handled in the same manner as in - * canonical XML. - * - * @return The inclusive namespace prefixes. - */ - public List getInclusiveNamespacePrefixes(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/MetaInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/MetaInfo.java deleted file mode 100644 index fea0a1b42..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/MetaInfo.java +++ /dev/null @@ -1,31 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import org.w3c.dom.NodeList; - -/** - * Object encapsulating descriptive meta information. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface MetaInfo { - /** - * Gets the mime type of the associated object. - * - * @return The mimetype of the associated object. - */ - public String getMimeType(); - /** - * Gets the descriptive information (URI). - * - * @return URI referencing the descriptive information. - */ - public String getDescription(); - /** - * Gets the elemental informations. - * - * @return The elemental informations. - */ - public NodeList getAnyElements(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/SignerInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/SignerInfo.java deleted file mode 100644 index c3b4aaadc..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/SignerInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import java.security.cert.X509Certificate; - - -/** - * Contains information about the signer. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface SignerInfo { - /** - * Gets the signer certificate. - * - * @return The signer certificate. - */ - public X509Certificate getSignerCertificate(); - /** - * Checks, whether the certificate contained in this object is qualified. - * - * @return true, if the certificate is qualified, otherwise - * false. - */ - public boolean isQualifiedCertificate(); - /** - * Checks, whether the certificate contained in this object is a - * public authority certificate. - * - * @return true, if the certificate is a public authority - * certificate, otherwise false. - */ - public boolean isPublicAuthority(); - /** - * Gets the public authority ID, if the certificate contained in this - * object is from a public authority. - * - * @return The public authority ID. - */ - public String getPublicAuhtorityID(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Transform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/Transform.java deleted file mode 100644 index 49a4e7c35..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/Transform.java +++ /dev/null @@ -1,16 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -/** - * Base class for XMLDsig Transform elements. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface Transform { - /** - * Gets the algorithm URI of this Transform. - * - * @return The algorithm URI of this Transform. - */ - public String getAlgorithmURI(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java deleted file mode 100644 index d2ea88968..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import java.math.BigInteger; - -/** - * Contains an X.509 issuer distinguished name/serial number pair. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface X509IssuerSerial { - /** - * Gets the issuer distinguished name. - * - * @return The issuer distinguished name. - */ - public String getX509IssuerName(); - /** - * Gets the issuer serial number. - * - * @return The issuer serial number. - */ - public BigInteger getX509SerialNumber(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java deleted file mode 100644 index e1e034222..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - - -/** - * Object encapsulating arbitrary content and optional descriptive meta - * information. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface XMLDataObjectAssociation { - /** - * Gets descriptive meta information. - * - * @return The descriptive meta information. - */ - public MetaInfo getMetaInfo(); - /** - * Gets the actual content. - * - * @return The content of this association. - */ - public Content getContent(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter.java deleted file mode 100644 index 247776ce0..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter.java +++ /dev/null @@ -1,38 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import java.util.Map; - -/** - * An XPath expression set operation. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface XPathFilter { - /** Subtract this filter's node set from the resulting node set. */ - public static final String SUBTRACT_TYPE = "subtract"; - /** Intersect this filter's node set with the resulting node set. */ - public static final String INTERSECT_TYPE = "intersect"; - /** Compute the union of this filter's node set and the resulting node set. */ - public static final String UNION_TYPE = "union"; - - /** - * Gets the type of this XPathFilter. - * - * @return The type of this XPathFilter. - */ - public String getFilterType(); - /** - * Gets the XPath expression for selecting the nodes. - * - * @return The XPath expression for selecting the nodes. - */ - public String getXPathExpression(); - /** - * Gets The namespace prefix to URI mapping used during evaluation of the - * XPath expression. - * - * @return The namespace prefix to URI mapping. - */ - public Map getNamespaceDeclarations(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java deleted file mode 100644 index 335d37dbf..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import java.util.List; - -/** - * An XPath type of Transform containing multiple filters for - * performing set operations on XPath selections. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface XPathFilter2Transform extends Transform { - /** Algorithm URI for the XPath Filter2 Transform. */ - public static final String XPATH_FILTER2 = - "http://www.w3.org/2002/06/xmldsig-filter2"; - - /** - * Gets the XPathFilters contained in this - * XPathFilter2Transform. - * - * @return The XPathFilters. - */ - public List getFilters(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathTransform.java deleted file mode 100644 index f1cc1a2bc..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XPathTransform.java +++ /dev/null @@ -1,30 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import java.util.Map; - -/** - * A Transform performing an XPath selection. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface XPathTransform extends Transform { - /** Algorithm URI of the XPath Transform. */ - public static final String XPATH = - "http://www.w3.org/TR/1999/REC-xpath-19991116"; - - /** - * Gets the XPath expression used for selection. - * - * @return The XPath expression used for selection. - */ - public String getXPathExpression(); - /** - * Gets The namespace prefix to URI mapping used during evaluation of the - * XPath expression. - * - * @return The namespace prefix to URI mapping. - */ - public Map getNamespaceDeclarations(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java b/spss.server/src/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java deleted file mode 100644 index 7f44bb060..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java +++ /dev/null @@ -1,23 +0,0 @@ -package at.gv.egovernment.moa.spss.api.common; - -import org.w3c.dom.Element; - -/** - * A Transform containing an XSLT stylesheet. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface XSLTTransform extends Transform { - /** Algorithm URI for the XSLT type of Transform. */ - public static final String XSLT = - "http://www.w3.org/TR/1999/REC-xslt-19991116"; - - /** - * Gets the XSLT stylesheet element used for the transformation. - * - * @return The XSLT stylesheet element used for the transformation. - */ - public Element getStylesheet(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java deleted file mode 100644 index 4af075da2..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.Base64Transform; - -/** - * Default implementation of Base64Transform. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class Base64TransformImpl - extends TransformImpl - implements Base64Transform { - - /** - * Create a new Base64TransformImpl object. - */ - public Base64TransformImpl() { - setAlgorithmURI(BASE64_DECODING); - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java deleted file mode 100644 index dd700cf21..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.io.InputStream; - -import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentExcplicit; - -/** - * Default implementation of CMSContentExplicit. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CMSContentExplicitImpl implements CMSContentExcplicit { - - /** The binary content, as a stream. */ - private InputStream binaryContent; - - /** - * Sets the binary content as a stream. - * - * @param content The binary content as a stream. - */ - public void setBinaryContent(InputStream content) { - this.binaryContent = content; - } - - public InputStream getBinaryContent() { - return binaryContent; - } - - /** - * Gets the type of content. - * - * @return EXPLICIT_CONTENT - */ - public int getContentType() { - return EXPLICIT_CONTENT; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java deleted file mode 100644 index f9c080a0d..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentReference; - -/** - * Default implementation of CMSContentReference. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CMSContentReferenceImpl implements CMSContentReference { - - /** The reference pointing to the actual data. */ - private String reference; - - /** - * Sets the reference URI. - * - * @param referenceURI The URI pointing to the content data. - */ - public void setReference(String referenceURI) { - this.reference = referenceURI; - } - - public String getReference() { - return reference; - } - - /** - * Gets the content type. - * - * @return REFERENCE_CONTENT - */ - public int getContentType() { - return REFERENCE_CONTENT; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java deleted file mode 100644 index 6eec4e847..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent; -import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject; -import at.gv.egovernment.moa.spss.api.common.MetaInfo; - -/** - * Default implementation of CMLSDataObject. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CMSDataObjectImpl implements CMSDataObject { - - /** The MetaInfo associated with the CMS data object. */ - private MetaInfo metaInfo; - /** The CMSContent contained in this data object. */ - private CMSContent cmsContent; - - /** - * Sets the meta information associated with the CMS data object. - * - * @param metaInfo The meta information. - */ - public void setMetaInfo(MetaInfo metaInfo) { - this.metaInfo = metaInfo; - } - - public MetaInfo getMetaInfo() { - return metaInfo; - } - - /** - * Sets the data of this CMSDataObject. - * - * @param cmsContent The actual data of this CMSDataObject. - */ - public void setContent(CMSContent cmsContent) { - this.cmsContent = cmsContent; - } - - public CMSContent getContent() { - return cmsContent; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java deleted file mode 100644 index cf446d1b4..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.CanonicalizationTransform; - -/** - * Default implementation of CanonicalizationTransform. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CanonicalizationTransformImpl - extends TransformImpl - implements CanonicalizationTransform { - - /** - * Create a new CanonicalizationTransformImpl object. - * - * @param algorithmURI Algorithm URI of the canonicalization - * Transform type. - */ - public CanonicalizationTransformImpl(String algorithmURI) { - setAlgorithmURI(algorithmURI); - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java deleted file mode 100644 index 2acb12e51..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import org.w3c.dom.NodeList; - -import at.gv.egovernment.moa.spss.api.common.CheckResult; - -/** - * Default implementation of CheckResult. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CheckResultImpl implements CheckResult { - /** The result code. */ - private int code; - - /** Additional information. */ - private NodeList info; - - /** - * Sets a result code. - * - * @param code The result code. - */ - public void setCode(int code) { - this.code = code; - } - - /** - * @see at.gv.egovernment.moa.spss.api.CheckResult#getCode() - */ - public int getCode() { - return code; - } - - /** - * Sets a descriptive information. - * - * @param info The descriptive information. - */ - public void setInfo(NodeList info) { - this.info = info; - } - - /** - * @see at.gv.egovernment.moa.spss.api.CheckResult#getInfo() - */ - public NodeList getInfo() { - return info; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java deleted file mode 100644 index bbed6bf8b..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.io.InputStream; - -import at.gv.egovernment.moa.spss.api.common.ContentBinary; - -/** - * Default implementation of ContentBinary. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class ContentBinaryImpl extends ContentImpl implements ContentBinary { - - /** The binary content as a stream. */ - private InputStream binaryContent; - - /** - * Sets the binary content as a stream. - * - * @param binaryContent The binary content as a stream. - */ - public void setBinaryContent(InputStream binaryContent) { - this.binaryContent = binaryContent; - } - - public InputStream getBinaryContent() { - return binaryContent; - } - - /** - * Gets the type of content. - * - * @return BINARY_CONTENT - */ - public int getContentType() { - return BINARY_CONTENT; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java deleted file mode 100644 index 7f331d2cd..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.Content; - -/** - * Default base class for Content implementations. - * - * @author Patrick Peck - * @version $Id$ - */ -public abstract class ContentImpl implements Content { - /** The reference pointing to the content data. */ - private String reference; - - /** - * Sets the reference pointing to the content data. - * - * @param referenceURI The URI of the content data. - */ - public void setReference(String referenceURI) { - this.reference = referenceURI; - } - - public String getReference() { - return reference; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java deleted file mode 100644 index 50609aa0e..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.ContentReference; - -/** - * Default implementation of ContentReference. - * - * @author Patrick Peck - * @version $Id$ - */ -public class ContentReferenceImpl - extends ContentImpl - implements ContentReference { - - /** - * Gets the type of content. - * - * @return REFERENCE_CONTENT - */ - public int getContentType() { - return REFERENCE_CONTENT; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java deleted file mode 100644 index c03f5edde..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import org.w3c.dom.NodeList; - -import at.gv.egovernment.moa.spss.api.common.ContentXML; - -/** - * Default implementation of ContentXML. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class ContentXMLImpl extends ContentImpl implements ContentXML { - - /** The nodes making up the XML content. */ - private NodeList xmlContent; - - /** - * Sets the nodes making up the XML content. - * - * @param xmlContent The XML content. - */ - public void setXMLContent(NodeList xmlContent) { - this.xmlContent = xmlContent; - } - - public NodeList getXMLContent() { - return xmlContent; - } - - /** - * Gets the type of content. - * - * @return XML_CONTENT - */ - public int getContentType() { - return XML_CONTENT; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java deleted file mode 100644 index 22e4cd61d..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation; - -/** - * Default implementation of - * . - * - * @author Patrick Peck - * @version $Id$ - */ -public class CreateSignatureEnvironmentProfileExplicitImpl - implements CreateSignatureEnvironmentProfileExplicit { - - /** The insertion location of the signature to be created. */ - private CreateSignatureLocation createSignatureLocation; - - /** Supplemental information for evaluating the signature environment. */ - private List supplements; - - /** - * Sets the insertion location of the signature to be created. - * - * @param createSignatureLocation The insertion location of the signature to - * be created. - */ - public void setCreateSignatureLocation(CreateSignatureLocation createSignatureLocation) { - this.createSignatureLocation = createSignatureLocation; - } - - public CreateSignatureLocation getCreateSignatureLocation() { - return createSignatureLocation; - } - - /** - * Sets the supplemental information for evaluating the signature - * environment. - * - * @param supplements The supplemental information. - */ - public void setSupplements(List supplements) { - this.supplements = - supplements != null - ? Collections.unmodifiableList(new ArrayList(supplements)) - : null; - } - - public List getSupplements() { - return supplements; - } - - /** - * Gets the type of profile. - * - * @return EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE - */ - public int getCreateSignatureEnvironmentProfileType() { - return EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java deleted file mode 100644 index 1c7dc6439..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileID; - -/** - * Default implementation of CreateSignatureEnvironmentProfileID. - * - * @author Patrick Peck - * @version $Id$ - */ -public class CreateSignatureEnvironmentProfileIDImpl - implements CreateSignatureEnvironmentProfileID { - - /** The profile ID. */ - private String createSignatureEnvironmentProfileID; - - /** - * Sets the profile ID. - * - * @param profileID The profile ID. - */ - public void setCreateSignatureEnvironmentProfileID(String profileID) { - this.createSignatureEnvironmentProfileID = profileID; - } - - public String getCreateSignatureEnvironmentProfileID() { - return createSignatureEnvironmentProfileID; - } - - /** - * Gets the type of profile. - * - * @return ID_CREATESIGNATUREENVIRONMENTPROFILE - */ - public int getCreateSignatureEnvironmentProfileType() { - return ID_CREATESIGNATUREENVIRONMENTPROFILE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java deleted file mode 100644 index 097af7fff..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo; - -/** - * Default implementation of CreateSignatureInfo. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CreateSignatureInfoImpl implements CreateSignatureInfo { - - /** The signature environment that will contain the newly created - * signature. */ - private Content createSignatureEnvironment; - - /** Additional information about the signature environment. */ - private CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile; - - /** - * Sets the signature environment that will contain the newly created - * signature. - * - * @param createSignatureEnvironment The signature environment. - */ - public void setCreateSignatureEnvironment(Content createSignatureEnvironment) { - this.createSignatureEnvironment = createSignatureEnvironment; - } - - public Content getCreateSignatureEnvironment() { - return createSignatureEnvironment; - } - - /** - * Sets the signature environment profile containing additional information - * about the signature environment. - * - * @param profile The signature environment profile. - */ - public void setCreateSignatureEnvironmentProfile(CreateSignatureEnvironmentProfile profile) { - this.createSignatureEnvironmentProfile = profile; - } - - public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile() { - return createSignatureEnvironmentProfile; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java deleted file mode 100644 index c0b36f505..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation; - -/** - * Default implementation of CreateSignatureLocation. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CreateSignatureLocationImpl - extends ElementSelectorImpl - implements CreateSignatureLocation { - - /** The index of the newly created signature. */ - private int index; - - /** - * Sets the index of the newly created signature. - * - * @param index The index of the newly created signature. - */ - public void setIndex(int index) { - this.index = index; - } - - public int getIndex() { - return index; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java deleted file mode 100644 index ff4108248..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.common.MetaInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo; - -/** - * Default implementation of CreateTransformsInfo. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CreateTransformsInfoImpl implements CreateTransformsInfo { - /** The dsig:Transforms. */ - private List transforms; - /** Meta information about the data resulting from the transforms. */ - private MetaInfo finalDataMetaInfo; - - /** - * Sets the transforms. - * - * @param transforms The transforms. - */ - public void setTransforms(List transforms) { - this.transforms = - transforms != null - ? Collections.unmodifiableList(new ArrayList(transforms)) - : null; - } - - public List getTransforms() { - return transforms; - } - - /** - * Sets the meta information about the data resulting from the transforms. - * - * @param finalDataMetaInfo The meta information. - */ - public void setFinalDataMetaInfo(MetaInfo finalDataMetaInfo) { - this.finalDataMetaInfo = finalDataMetaInfo; - } - - public MetaInfo getFinalDataMetaInfo() { - return finalDataMetaInfo; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java deleted file mode 100644 index 508b6c083..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit; - -/** - * Default implementation of CreateTransformsInfoProfileExplicit. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CreateTransformsInfoProfileExplicitImpl - implements CreateTransformsInfoProfileExplicit { - - /** Transformation information. */ - private CreateTransformsInfo transformsInfo; - /** Additional data for the transformations. */ - private List supplements = new ArrayList(); - - /** - * Sets the transformation information. - * - * @param transformsInfo The transformation information. - */ - public void setCreateTransformsInfo(CreateTransformsInfo transformsInfo) { - this.transformsInfo = transformsInfo; - } - - public CreateTransformsInfo getCreateTransformsInfo() { - return transformsInfo; - } - - /** - * Sets the additional data for the transformations. - * - * @param supplements The additional data. - */ - public void setSupplements(List supplements) { - this.supplements = - supplements != null - ? Collections.unmodifiableList(new ArrayList(supplements)) - : null; - } - - public List getSupplements() { - return supplements; - } - - /** - * Gets the type of profile. - * - * @return EXPLICIT_CREATETRANSFORMSINFOPROFILE - */ - public int getCreateTransformsInfoProfileType() { - return EXPLICIT_CREATETRANSFORMSINFOPROFILE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java deleted file mode 100644 index 5cd1fcc48..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileID; - -/** - * Default implementation of CreateTransformsInfoProfileID. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CreateTransformsInfoProfileIDImpl - implements CreateTransformsInfoProfileID { - - /** The profile ID. */ - private String createTransformsID; - - /** - * Sets the profile ID. - * @param createTransformsID The profile ID. - */ - public void setCreateTransformsInfoProfileID(String createTransformsID) { - this.createTransformsID = createTransformsID; - } - - public String getCreateTransformsInfoProfileID() { - return createTransformsID; - } - - /** - * Gets the type of profile. - * - * @return ID_CREATETRANSFORMSINFOPROFILE - */ - public int getCreateTransformsInfoProfileType() { - return ID_CREATETRANSFORMSINFOPROFILE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java deleted file mode 100644 index 08f94cc31..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest; - -/** - * Default implementation of CreateXMLSignatureRequest. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CreateXMLSignatureRequestImpl - implements CreateXMLSignatureRequest { - - /** The identifier for selecting the private keys for creating the signature.*/ - private String keyIdentifier; - /** Information for creating a single signature. */ - private List singleSignatureInfos = new ArrayList(); - - /** - * Sets the identifier for selecting the private keys for creating the - * signature. - * - * @param keyIdentifier The identifier for selecting the private keys. - */ - public void setKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - } - - public String getKeyIdentifier() { - return keyIdentifier; - } - - /** - * Sets the information for creating single signatures. - * - * @param singleSignaureInfos The information for creating single signatures. - */ - public void setSingleSignatureInfos(List singleSignaureInfos) { - this.singleSignatureInfos = - singleSignaureInfos != null - ? Collections.unmodifiableList(new ArrayList(singleSignaureInfos)) - : null; - } - - public List getSingleSignatureInfos() { - return singleSignatureInfos; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java deleted file mode 100644 index 590258e30..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse; - -/** - * Default implementation of CreateXMLSignatureResponse. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class CreateXMLSignatureResponseImpl - implements CreateXMLSignatureResponse { - - /** The elements contained in the response. */ - private List responseElements = new ArrayList(); - - /** - * Sets the elements contained in the response. - * - * @param responseElements The response elements. - */ - public void setResponseElements(List responseElements) { - this.responseElements = - responseElements != null - ? Collections.unmodifiableList(new ArrayList(responseElements)) - : null; - } - - public List getResponseElements() { - return responseElements; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java deleted file mode 100644 index 8ab2241de..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo; - -/** - * Default implementation of DataObjectInfo. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class DataObjectInfoImpl implements DataObjectInfo { - /** The signature structure type. */ - private String stucture; - /** Whether a reference will be placed in the signature itself or in the - * manifest */ - private boolean childOfManifest; - /** The data object to be signed. */ - private Content dataObject; - /** The profile containing additional information for the transformations. */ - private CreateTransformsInfoProfile createTransformsInfoProfile; - - /** - * Sets the signature structure type. - * - * @param structure The signature structure type. - */ - public void setStructure(String structure) { - this.stucture = structure; - } - - public String getStructure() { - return stucture; - } - - /** - * Sets whether a reference will be placed in the signature itself or in the - * manifest. - * - * @param childOfManifest Whether to put the reference in the signature of - * in the manifest. - */ - public void setChildOfManifest(boolean childOfManifest) { - this.childOfManifest = childOfManifest; - } - - public boolean isChildOfManifest() { - return childOfManifest; - } - - /** - * Sets the data object to be signed. - * - * @param dataObject The data object to be signed. - */ - public void setDataObject(Content dataObject) { - this.dataObject = dataObject; - } - - public Content getDataObject() { - return dataObject; - } - - /** - * Sets additional information for the transformations. - * - * @param profile The profile containing additional information for the - * transformations. - */ - public void setCreateTransformsInfoProfile(CreateTransformsInfoProfile profile) { - this.createTransformsInfoProfile = profile; - } - - public CreateTransformsInfoProfile getCreateTransformsInfoProfile() { - return createTransformsInfoProfile; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java deleted file mode 100644 index e460bd584..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.HashMap; -import java.util.Map; - -import at.gv.egovernment.moa.spss.api.common.ElementSelector; - -/** - * Default implementation of ElementSelector. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class ElementSelectorImpl implements ElementSelector { - /** The XPath expression pointing to the element. */ - private String xPathExpression; - /** The namespace declarations to apply for evaluating the XPath */ - private Map namespaceDeclarations = new HashMap(); - - /** - * Sets the XPath expression pointing to the element. - * - * @param xPathExpression XPath expression pointing to the element. - */ - public void setXPathExpression(String xPathExpression) { - this.xPathExpression = xPathExpression; - } - - public String getXPathExpression() { - return xPathExpression; - } - - /** - * Sets namespace declarations to apply for evaluating the XPath. - * - * @param namespaceDeclarations The namespace declarations to apply for - * evaluating the XPath. - */ - public void setNamespaceDeclarations(Map namespaceDeclarations) { - this.namespaceDeclarations = namespaceDeclarations; - } - - public Map getNamespaceDeclarations() { - return namespaceDeclarations; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java deleted file mode 100644 index a1be3d86a..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.EnvelopedSignatureTransform; - -/** - * Default implementation of EnvelopedSignatureTransform. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class EnvelopedSignatureTransformImpl - extends TransformImpl - implements EnvelopedSignatureTransform { - - /** - * Create a EnvelopedSignatureTransformImpl. - */ - public EnvelopedSignatureTransformImpl() { - setAlgorithmURI(ENVELOPED_SIGNATURE); - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java deleted file mode 100644 index d7047ab44..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse; - -/** - * Default implementation of ErrorResponse. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class ErrorResponseImpl implements ErrorResponse { - /** The error code. */ - private int code; - /** Verbose error message. */ - private String info; - - /** - * Sets the error code. - * - * @param code The error code. - */ - public void setErrorCode(int code) { - this.code = code; - } - - public int getErrorCode() { - return code; - } - - /** - * Sets the verbose error information. - * - * @param info The verbose error information. - */ - public void setInfo(String info) { - this.info = info; - } - - public String getInfo() { - return info; - } - - /** - * Gets the response type. - * - * @return ERROR_RESPONSE - */ - public int getResponseType() { - return ERROR_RESPONSE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java deleted file mode 100644 index bf21c8634..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform; - -/** - * Default implementation of ExclusiveCanonicalizationTransform. - * - * @author Patrick Peck - * @version $Id$ - */ -public class ExclusiveCanonicalizationTransformImpl - extends TransformImpl - implements ExclusiveCanonicalizationTransform { - - /** The namespaces to treat according to canonical XML. */ - private List inclusiveNamespacePrefixes; - - /** - * Create a ExclusiveCanonicalizationTransformImpl object. - * - * @param algorithmURI The algorithm URI identifying the transformation - * algorithm. - */ - public ExclusiveCanonicalizationTransformImpl(String algorithmURI) { - setAlgorithmURI(algorithmURI); - } - - /** - * Sets the namespaces to treat according to canonical XML. - * @param inclusiveNamespacePrefixes The namespaces to treat according to - * canonical XML. - */ - public void setInclusiveNamespacePrefixes(List inclusiveNamespacePrefixes) { - this.inclusiveNamespacePrefixes = - inclusiveNamespacePrefixes != null - ? Collections.unmodifiableList(new ArrayList(inclusiveNamespacePrefixes)) - : null; - } - - public List getInclusiveNamespacePrefixes() { - return inclusiveNamespacePrefixes; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java deleted file mode 100644 index 9174e3a46..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo; - -/** - * Default implementation of ManifestRefsCheckResult. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class ManifestRefsCheckResultImpl implements ManifestRefsCheckResult { - /** The numerical check code. */ - private int code; - /** Additional information about the check. */ - private ManifestRefsCheckResultInfo info; - - /** - * Sets the check code. - * - * @param code A numerical representation of the result of the manifest check. - */ - public void setCode(int code) { - this.code = code; - } - - public int getCode() { - return code; - } - - /** - * Sets a reference to the manifest. - * - * @param info The reference to the manifest. - */ - public void setInfo(ManifestRefsCheckResultInfo info) { - this.info = info; - } - - public ManifestRefsCheckResultInfo getInfo() { - return info; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java deleted file mode 100644 index 0071a14f3..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo; - -/** - * Default implementation of ManifestRefsCheckResultInfo. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class ManifestRefsCheckResultInfoImpl - extends ReferencesCheckResultInfoImpl - implements ManifestRefsCheckResultInfo { - - /** The position of the signature reference containing the reference to the - * manifest being described by this object.*/ - private int referringSignatureReference; - - /** - * Sets the position of the signature reference containing the reference to - * the manifest being described by this object. - * @param referringSignatureReference The position of the signature reference. - */ - public void setReferringSignatureReference(int referringSignatureReference) { - this.referringSignatureReference = referringSignatureReference; - } - - public int getReferringSignatureReference() { - return referringSignatureReference; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java deleted file mode 100644 index c435dd8fd..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import org.w3c.dom.NodeList; - -import at.gv.egovernment.moa.spss.api.common.MetaInfo; - -/** - * Default implementation of MetaInfo. - * @author Fatemeh Philippi - * @version $Id$ - */ -public class MetaInfoImpl implements MetaInfo { - /** Information about the MIME type. */ - private String mimeType; - /** URI pointing to a description of the content. */ - private String description; - /** Descriptive XML content. */ - private NodeList anyElements; - - /** - * Sets the MIME type. - * - * @param mimeType The MIME type to set. - */ - public void setMimeType(String mimeType) { - this.mimeType = mimeType; - } - - public String getMimeType() { - return mimeType; - } - - /** - * Sets the URI pointing to a description of the content. - * - * @param description The URI pointing to a description of the content. - */ - public void setDescription(String description) { - this.description = description; - } - - public String getDescription() { - return description; - } - - /** - * Sets descriptive XML content. - * - * @param anyElements The elements to set. - */ - public void setAnyElements(NodeList anyElements) { - this.anyElements = anyElements; - } - - public NodeList getAnyElements() { - return anyElements; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java deleted file mode 100644 index 923a4bce1..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo; - -/** - * Default implementation of ReferenceInfo. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class ReferenceInfoImpl implements ReferenceInfo { - /** Profile containing the transforms allowed in the signature. */ - private List verifyTransformsInfoProfiles; - - /** - * Sets the transforms profile used for verifying the transforms contained - * in the signature. - * - * @param verifyTransformsInfoProfiles The profiles containing the transforms - * allowed in the signature. - */ - public void setVerifyTransformsInfoProfiles(List verifyTransformsInfoProfiles) { - this.verifyTransformsInfoProfiles = - verifyTransformsInfoProfiles != null - ? Collections.unmodifiableList( - new ArrayList(verifyTransformsInfoProfiles)) - : null; - } - - public List getVerifyTransformsInfoProfiles() { - return verifyTransformsInfoProfiles; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java deleted file mode 100644 index 6bb4d30ac..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo; - -/** - * Default implementation of ReferencesCheckResult. - * - * @author Patrick Peck - * @version $Id$ - */ -public class ReferencesCheckResultImpl implements ReferencesCheckResult { - /** The check code. */ - private int code; - /** Additional information about the reference check. */ - private ReferencesCheckResultInfo info; - - /** - * Sets the check code. - * - * @param code A numerical representation of the result of the reference - * check. - */ - public void setCode(int code) { - this.code = code; - } - - public int getCode() { - return code; - } - - /** - * Sets additional information about the reference check. - * - * @param manifestRefsCheckResultInfo Additional information about the - * reference check. - */ - public void setInfo(ReferencesCheckResultInfo manifestRefsCheckResultInfo) { - this.info = manifestRefsCheckResultInfo; - } - - public ReferencesCheckResultInfo getInfo() { - return info; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java deleted file mode 100644 index a21b417ae..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import org.w3c.dom.NodeList; - -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo; - -/** - * Default implementation of ReferencesCheckResultInfo. - * - * @author Patrick Peck - * @version $Id$ - */ -public class ReferencesCheckResultInfoImpl - implements ReferencesCheckResultInfo { - - /** Additional information about the references check. */ - private NodeList anyOtherInfo; - /** The indexes of the failed references. */ - private int[] failedReferences = new int[0]; - - /** - * Sets additional information about the references check. - * @param anyOtherInfo Additional information about the references check. - */ - public void setAnyOtherInfo(NodeList anyOtherInfo) { - this.anyOtherInfo = anyOtherInfo; - } - - public NodeList getAnyOtherInfo() { - return anyOtherInfo; - } - - /** - * Sets the indexes of the failed references. - * - * @param failedReferences The indexes of the failed references. - */ - public void setFailedReferences(int[] failedReferences) { - this.failedReferences = failedReferences; - } - - public int[] getFailedReferences() { - return failedReferences; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java deleted file mode 100644 index ab6240f79..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java +++ /dev/null @@ -1,559 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.io.InputStream; -import java.math.BigInteger; -import java.security.cert.X509Certificate; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import at.gv.egovernment.moa.spss.api.SPSSFactory; -import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent; -import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement; -import at.gv.egovernment.moa.spss.api.common.CheckResult; -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.common.MetaInfo; -import at.gv.egovernment.moa.spss.api.common.SignerInfo; -import at.gv.egovernment.moa.spss.api.common.Transform; -import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial; -import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; -import at.gv.egovernment.moa.spss.api.common.XPathFilter; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse; -import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse; -import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse; -import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams; -import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile; -import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse; - -/** - * Default implementation of SPSSFactory. - * - * @author Patrick Peck - * @version $Id$ - */ -public class SPSSFactoryImpl extends SPSSFactory { - - public CreateXMLSignatureRequest createCreateXMLSignatureRequest( - String keyIdentifier, - List singleSignatureInfos) { - CreateXMLSignatureRequestImpl createXMLSignatureRequest = - new CreateXMLSignatureRequestImpl(); - createXMLSignatureRequest.setKeyIdentifier(keyIdentifier); - createXMLSignatureRequest.setSingleSignatureInfos(singleSignatureInfos); - return createXMLSignatureRequest; - } - - public SingleSignatureInfo createSingleSignatureInfo( - List dataObjectInfos, - CreateSignatureInfo createSignatureInfo, - boolean securityLayerConform) { - SingleSignatureInfoImpl singleSignatureInfo = new SingleSignatureInfoImpl(); - singleSignatureInfo.setDataObjectInfos(dataObjectInfos); - singleSignatureInfo.setCreateSignatureInfo(createSignatureInfo); - singleSignatureInfo.setSecurityLayerConform(securityLayerConform); - return singleSignatureInfo; - } - public DataObjectInfo createDataObjectInfo( - String structure, - boolean childOfManifest, - Content dataObject, - CreateTransformsInfoProfile createTransformsInfoProfile) { - DataObjectInfoImpl dataObjectInfo = new DataObjectInfoImpl(); - dataObjectInfo.setStructure(structure); - dataObjectInfo.setChildOfManifest(childOfManifest); - dataObjectInfo.setDataObject(dataObject); - dataObjectInfo.setCreateTransformsInfoProfile(createTransformsInfoProfile); - return dataObjectInfo; - } - - public CreateTransformsInfoProfile createCreateTransformsInfoProfile(String profileID) { - - CreateTransformsInfoProfileIDImpl createTransformsInfoProfile = - new CreateTransformsInfoProfileIDImpl(); - createTransformsInfoProfile.setCreateTransformsInfoProfileID(profileID); - return createTransformsInfoProfile; - } - - public CreateTransformsInfoProfile createCreateTransformsInfoProfile( - CreateTransformsInfo transformsInfo, - List supplements) { - CreateTransformsInfoProfileExplicitImpl createTransformsInfoProfile = - new CreateTransformsInfoProfileExplicitImpl(); - createTransformsInfoProfile.setCreateTransformsInfo(transformsInfo); - createTransformsInfoProfile.setSupplements(supplements); - return createTransformsInfoProfile; - } - - public CreateTransformsInfo createCreateTransformsInfo( - List transforms, - MetaInfo finalDataMetaInfo) { - CreateTransformsInfoImpl createTransformsInfo = - new CreateTransformsInfoImpl(); - - createTransformsInfo.setTransforms(transforms); - createTransformsInfo.setFinalDataMetaInfo(finalDataMetaInfo); - return createTransformsInfo; - } - - public CreateSignatureInfo createCreateSignatureInfo( - Content createSignatureEnvironment, - CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile) { - CreateSignatureInfoImpl createSignatureInfo = new CreateSignatureInfoImpl(); - createSignatureInfo.setCreateSignatureEnvironment( - createSignatureEnvironment); - createSignatureInfo.setCreateSignatureEnvironmentProfile( - createSignatureEnvironmentProfile); - return createSignatureInfo; - } - - public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile( - CreateSignatureLocation createSignatureLocation, - List supplements) { - CreateSignatureEnvironmentProfileExplicitImpl createSignatureEnvironmentProfile = - new CreateSignatureEnvironmentProfileExplicitImpl(); - createSignatureEnvironmentProfile.setCreateSignatureLocation( - createSignatureLocation); - createSignatureEnvironmentProfile.setSupplements(supplements); - return createSignatureEnvironmentProfile; - } - - public CreateSignatureLocation createCreateSignatureLocation( - String signatureLocationXPath, - int signatureLocationIndex, - Map namespaceDeclarations) { - CreateSignatureLocationImpl createSignatureLocation = - new CreateSignatureLocationImpl(); - createSignatureLocation.setIndex(signatureLocationIndex); - createSignatureLocation.setNamespaceDeclarations(namespaceDeclarations); - createSignatureLocation.setXPathExpression(signatureLocationXPath); - return createSignatureLocation; - } - - public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(String profileID) { - CreateSignatureEnvironmentProfileIDImpl createSignatureEnvironmentProfile = - new CreateSignatureEnvironmentProfileIDImpl(); - createSignatureEnvironmentProfile.setCreateSignatureEnvironmentProfileID( - profileID); - return createSignatureEnvironmentProfile; - } - - public CreateXMLSignatureResponse createCreateXMLSignatureResponse(List responseElements) { - CreateXMLSignatureResponseImpl createXMLSignatureResponse = - new CreateXMLSignatureResponseImpl(); - createXMLSignatureResponse.setResponseElements(responseElements); - return createXMLSignatureResponse; - } - - public SignatureEnvironmentResponse createSignatureEnvironmentResponse(Element signatureEnvironment) { - SignatureEnvironmentResponseImpl signatureEnvironmentResponse = - new SignatureEnvironmentResponseImpl(); - signatureEnvironmentResponse.setSignatureEnvironment(signatureEnvironment); - return signatureEnvironmentResponse; - } - - public ErrorResponse createErrorResponse(int code, String info) { - ErrorResponseImpl errorResponse = new ErrorResponseImpl(); - errorResponse.setErrorCode(code); - errorResponse.setInfo(info); - return errorResponse; - } - - public VerifyCMSSignatureRequest createVerifyCMSSignatureRequest( - int[] signatories, - Date dateTime, - InputStream cmsSignature, - CMSDataObject dataObject, - String trustProfileID) { - VerifyCMSSignatureRequestImpl verifyCMSSignatureRequest = - new VerifyCMSSignatureRequestImpl(); - verifyCMSSignatureRequest.setDateTime(dateTime); - verifyCMSSignatureRequest.setCMSSignature(cmsSignature); - verifyCMSSignatureRequest.setDataObject(dataObject); - verifyCMSSignatureRequest.setTrustProfileId(trustProfileID); - verifyCMSSignatureRequest.setSignatories(signatories); - return verifyCMSSignatureRequest; - } - - public CMSDataObject createCMSDataObject( - MetaInfo metaInfo, - CMSContent content) { - - CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl(); - cmsDataObject.setMetaInfo(metaInfo); - cmsDataObject.setContent(content); - - return cmsDataObject; - } - - public CMSContent createCMSContent(InputStream binaryContent) { - CMSContentExplicitImpl cmsContent = new CMSContentExplicitImpl(); - - cmsContent.setBinaryContent(binaryContent); - return cmsContent; - } - - public CMSContent createCMSContent(String referenceURI) { - CMSContentReferenceImpl cmsContent = new CMSContentReferenceImpl(); - - cmsContent.setReference(referenceURI); - return cmsContent; - } - - - public CMSDataObject createCMSDataObject( - MetaInfo metaInfo, - String referenceURI) { - CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl(); - CMSContentReferenceImpl cmsContent = new CMSContentReferenceImpl(); - cmsDataObject.setMetaInfo(metaInfo); - cmsContent.setReference(referenceURI); - return cmsDataObject; - } - - public VerifyCMSSignatureResponse createVerifyCMSSignatureResponse(List responseElements) { - VerifyCMSSinatureResponseImpl verifyCMSSignatureResponse = - new VerifyCMSSinatureResponseImpl(); - verifyCMSSignatureResponse.setResponseElements(responseElements); - return verifyCMSSignatureResponse; - } - - public VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement( - SignerInfo signerInfo, - CheckResult signatureCheck, - CheckResult certificateCheck) { - VerifyCMSSignatureResponseElementImpl verifyCMSSignatureResponseElement = - new VerifyCMSSignatureResponseElementImpl(); - verifyCMSSignatureResponseElement.setSignerInfo(signerInfo); - verifyCMSSignatureResponseElement.setSignatureCheck(signatureCheck); - verifyCMSSignatureResponseElement.setCertificateCheck(certificateCheck); - return verifyCMSSignatureResponseElement; - } - - public VerifyXMLSignatureRequest createVerifyXMLSignatureRequest( - Date dateTime, - VerifySignatureInfo verifySignatureInfo, - List supplementProfiles, - SignatureManifestCheckParams signatureManifestParams, - boolean returnHashInputData, - String trustProfileID) { - VerifyXMLSignatureRequestImpl verifyXMLSignatureRequest = - new VerifyXMLSignatureRequestImpl(); - verifyXMLSignatureRequest.setDateTime(dateTime); - verifyXMLSignatureRequest.setSignatureInfo(verifySignatureInfo); - verifyXMLSignatureRequest.setSupplementProfiles(supplementProfiles); - verifyXMLSignatureRequest.setSignatureManifestCheckParams( - signatureManifestParams); - verifyXMLSignatureRequest.setReturnHashInputData(returnHashInputData); - verifyXMLSignatureRequest.setTrustProfileId(trustProfileID); - return verifyXMLSignatureRequest; - } - - public VerifySignatureInfo createVerifySignatureInfo( - Content verifySignatureEnvironment, - VerifySignatureLocation verifySignatureLocation) { - VerifySignatureInfoImpl verifySignatureInfo = new VerifySignatureInfoImpl(); - verifySignatureInfo.setVerifySignatureEnvironment( - verifySignatureEnvironment); - verifySignatureInfo.setVerifySignatureLocation(verifySignatureLocation); - return verifySignatureInfo; - } - - public VerifySignatureLocation createVerifySignatureLocation( - String xPathExpression, - Map namespaceDeclarations) { - VerifySignatureLocationImpl verifySignatureLocation = - new VerifySignatureLocationImpl(); - verifySignatureLocation.setXPathExpression(xPathExpression); - verifySignatureLocation.setNamespaceDeclarations(namespaceDeclarations); - return verifySignatureLocation; - } - - public SupplementProfile createSupplementProfile(String profileID) { - SupplementProfileIDImpl supplementProfileID = new SupplementProfileIDImpl(); - supplementProfileID.setSupplementProfileID(profileID); - return supplementProfileID; - } - - public SupplementProfile createSupplementProfile(XMLDataObjectAssociation supplementProfile) { - SupplementProfileExplicitImpl supplementProfileExplicit = - new SupplementProfileExplicitImpl(); - supplementProfileExplicit.setSupplementProfile(supplementProfile); - return supplementProfileExplicit; - } - - public SignatureManifestCheckParams createSignatureManifestCheckParams( - List referenceInfos, - boolean returnReferenceInputData) { - SignatureManifestCheckParamsImpl signatureManifestCheckParams = - new SignatureManifestCheckParamsImpl(); - signatureManifestCheckParams.setReferenceInfos(referenceInfos); - signatureManifestCheckParams.setReturnReferenceInputData( - returnReferenceInputData); - return signatureManifestCheckParams; - } - - public ReferenceInfo createReferenceInfo(List verifyTransformsInfoProfiles) { - ReferenceInfoImpl referenceInfo = new ReferenceInfoImpl(); - referenceInfo.setVerifyTransformsInfoProfiles(verifyTransformsInfoProfiles); - return referenceInfo; - } - - public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile( - List transforms, - List transformParameters) { - VerifyTransformsInfoProfileExplicitImpl verifyTransformsInfoProfile = - new VerifyTransformsInfoProfileExplicitImpl(); - - verifyTransformsInfoProfile.setTransforms(transforms); - verifyTransformsInfoProfile.setTransformParameters(transformParameters); - - return verifyTransformsInfoProfile; - } - - public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(String profileID) { - VerifyTransformsInfoProfileIDImpl verifyTransformsInfoProfile = - new VerifyTransformsInfoProfileIDImpl(); - verifyTransformsInfoProfile.setVerifyTransformsInfoProfileID(profileID); - return verifyTransformsInfoProfile; - } - - - public TransformParameter createTransformParameter(String URI, String digestMethod, byte[] digestValue) { - TransformPatameterHashImpl transformParameter = - new TransformPatameterHashImpl(); - transformParameter.setURI(URI); - transformParameter.setDigestMethod(digestMethod); - transformParameter.setDigestValue(digestValue); - return transformParameter; - } - - public TransformParameter createTransformParameter( - String URI, - InputStream binaryData) { - TransformParameterBinaryImpl transformParameter = - new TransformParameterBinaryImpl(); - transformParameter.setURI(URI); - transformParameter.setBinaryContent(binaryData); - return transformParameter; - } - - public TransformParameter createTransformParameter(String URI) { - TransformParameterURIImpl transformParameter = - new TransformParameterURIImpl(); - transformParameter.setURI(URI); - return transformParameter; - } - - public VerifyXMLSignatureResponse createVerifyXMLSignatureResponse( - SignerInfo signerInfo, - List hashInputDatas, - List referenceInputDatas, - ReferencesCheckResult signatureCheck, - ReferencesCheckResult signatureManifestCheck, - List xmlDsigManifestChecks, - CheckResult certificateCheck) { - VerifyXMLSignatureResponseImpl verifyXMLSignatureResponse = - new VerifyXMLSignatureResponseImpl(); - verifyXMLSignatureResponse.setSignerInfo(signerInfo); - verifyXMLSignatureResponse.setHashInputDatas(hashInputDatas); - verifyXMLSignatureResponse.setReferenceInputDatas(referenceInputDatas); - verifyXMLSignatureResponse.setSignatureCheck(signatureCheck); - verifyXMLSignatureResponse.setSignatureManifestCheck( - signatureManifestCheck); - verifyXMLSignatureResponse.setXMLDsigManifestChecks(xmlDsigManifestChecks); - verifyXMLSignatureResponse.setCertificateCheck(certificateCheck); - return verifyXMLSignatureResponse; - } - - public ReferencesCheckResult createReferencesCheckResult( - int code, - ReferencesCheckResultInfo info) { - ReferencesCheckResultImpl referencesCheckResult = - new ReferencesCheckResultImpl(); - referencesCheckResult.setCode(code); - referencesCheckResult.setInfo(info); - return referencesCheckResult; - } - - public ReferencesCheckResultInfo createReferencesCheckResultInfo( - NodeList anyOtherInfo, - int[] failedReferences) { - ReferencesCheckResultInfoImpl referencesCheckResultInfo = - new ReferencesCheckResultInfoImpl(); - referencesCheckResultInfo.setAnyOtherInfo(anyOtherInfo); - referencesCheckResultInfo.setFailedReferences(failedReferences); - return referencesCheckResultInfo; - } - - public ManifestRefsCheckResult createManifestRefsCheckResult( - int code, - ManifestRefsCheckResultInfo info) { - ManifestRefsCheckResultImpl manifestRefsCheckResult = - new ManifestRefsCheckResultImpl(); - manifestRefsCheckResult.setCode(code); - manifestRefsCheckResult.setInfo(info); - return manifestRefsCheckResult; - } - - public ManifestRefsCheckResultInfo createManifestRefsCheckResultInfo( - NodeList anyOtherInfo, - int[] failedReferences, - int referringSigReference) { - ManifestRefsCheckResultInfoImpl manifestRefsCheckResultInfo = - new ManifestRefsCheckResultInfoImpl(); - manifestRefsCheckResultInfo.setAnyOtherInfo(anyOtherInfo); - manifestRefsCheckResultInfo.setReferringSignatureReference( - referringSigReference); - manifestRefsCheckResultInfo.setFailedReferences(failedReferences); - return manifestRefsCheckResultInfo; - } - - public Content createContent(InputStream binaryData, String referenceURI) { - ContentBinaryImpl content = new ContentBinaryImpl(); - content.setBinaryContent(binaryData); - content.setReference(referenceURI); - return content; - } - - public Content createContent(String referenceURI) { - ContentReferenceImpl content = new ContentReferenceImpl(); - content.setReference(referenceURI); - return content; - } - - public Content createContent(NodeList xmlData, String referenceURI) { - ContentXMLImpl content = new ContentXMLImpl(); - content.setXMLContent(xmlData); - content.setReference(referenceURI); - return content; - } - - public XMLDataObjectAssociation createXMLDataObjectAssociation( - MetaInfo metaInfo, - Content xmlContent) { - XMLDataObjectAssociationImpl xmlDataObjectAssociation = - new XMLDataObjectAssociationImpl(); - xmlDataObjectAssociation.setMetaInfo(metaInfo); - xmlDataObjectAssociation.setContent(xmlContent); - return xmlDataObjectAssociation; - } - - public MetaInfo createMetaInfo( - String mimeType, - String description, - NodeList otherInfo) { - MetaInfoImpl metaInfo = new MetaInfoImpl(); - metaInfo.setMimeType(mimeType); - metaInfo.setDescription(description); - metaInfo.setAnyElements(otherInfo); - return metaInfo; - } - - public Transform createCanonicalizationTransform(String algorithmURI) { - CanonicalizationTransformImpl transform = new CanonicalizationTransformImpl(algorithmURI); - return transform; - } - - public Transform createExclusiveCanonicalizationTransform(String algorithmURI, List inclusiveNamespacePrefixes) { - ExclusiveCanonicalizationTransformImpl transform = new ExclusiveCanonicalizationTransformImpl(algorithmURI); - transform.setInclusiveNamespacePrefixes(inclusiveNamespacePrefixes); - return transform; - } - - public Transform createBase64Transform() { - Base64TransformImpl transform = new Base64TransformImpl(); - return transform; - } - - public Transform createEnvelopedSignatureTransform() { - EnvelopedSignatureTransformImpl transform = - new EnvelopedSignatureTransformImpl(); - return transform; - } - - public Transform createXSLTTransform(Element styleSheet) { - XSLTransformImpl transform = new XSLTransformImpl(); - transform.setStylesheet(styleSheet); - return transform; - } - - public Transform createXPathTransform( - String xPathExpression, - Map namespaceDeclarations) { - XPathTransformImpl transform = new XPathTransformImpl(); - transform.setXPathExpression(xPathExpression); - transform.setNamespaceDelcarations(namespaceDeclarations); - return transform; - } - - public Transform createXPathFilter2Transform(List xPathFilters) { - XPathFilter2TransformImpl transform = new XPathFilter2TransformImpl(); - transform.setFilters(xPathFilters); - return transform; - } - - public XPathFilter createXPathFilter( - String filterType, - String xPathExpression, - Map namespaceDeclarations) { - XPathFilterImpl xPathFilter = new XPathFilterImpl(); - xPathFilter.setFilterType(filterType); - xPathFilter.setXPathExpression(xPathExpression); - xPathFilter.setNamespaceDelcarations(namespaceDeclarations); - return xPathFilter; - } - - public CheckResult createCheckResult(int code, NodeList info) { - CheckResultImpl checkResult = new CheckResultImpl(); - checkResult.setCode(code); - checkResult.setInfo(info); - return checkResult; - } - - public SignerInfo createSignerInfo( - X509Certificate signerCertificate, - boolean qualifiedCertificate, - boolean publicAuthority, - String publicAuthorityID) { - SignerInfoImpl signerInfo = new SignerInfoImpl(); - signerInfo.setSignerCertificate(signerCertificate); - signerInfo.setQualifiedCertificate(qualifiedCertificate); - signerInfo.setPublicAuthority(publicAuthority); - signerInfo.setPublicAuhtorityID(publicAuthorityID); - return signerInfo; - } - - public X509IssuerSerial createX509IssuerSerial( - String issuerName, - BigInteger serialNumber) { - X509IssuerSerialImpl x509IssuerSerial = new X509IssuerSerialImpl(); - x509IssuerSerial.setX509IssuerName(issuerName); - x509IssuerSerial.setX509SerialNumber(serialNumber); - return x509IssuerSerial; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java deleted file mode 100644 index 57d30ad3b..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import org.w3c.dom.Element; - -import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse; - -/** - * Default implementation of SignatureEnvironmentResponse. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class SignatureEnvironmentResponseImpl - implements SignatureEnvironmentResponse { - - /** The signature environment containing the XML signature. */ - private Element signatureEnvironment; - - /** - * Sets the XML structure which contains the signature. - * - * @param signatureEnvironment A general XML structure containing the signature. - */ - public void setSignatureEnvironment(Element signatureEnvironment) { - this.signatureEnvironment = signatureEnvironment; - } - - public Element getSignatureEnvironment() { - return signatureEnvironment; - } - - /** - * Gets the type of CreateXMLSignatureResponseElement. - * - * @return SIGNATURE_ENVIRONMENT_RESPONSE - */ - public int getResponseType() { - return SIGNATURE_ENVIRONMENT_RESPONSE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java deleted file mode 100644 index 5924f8447..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams; - -/** - * Default implementation of SignatureManifestCheckParams. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class SignatureManifestCheckParamsImpl - implements SignatureManifestCheckParams { - - /** Referential information. */ - private List referenceInfos; - /** Whether to return the signature source data. */ - private boolean returnReferenceInputData = true; - - /** - * Sets the referantial information. - * - * @param referenceInfos The referential information. - */ - public void setReferenceInfos(List referenceInfos) { - this.referenceInfos = - referenceInfos != null - ? Collections.unmodifiableList(new ArrayList(referenceInfos)) - : null; - } - - public List getReferenceInfos() { - return referenceInfos; - } - - /** - * Sets whether to return signature source data. - * - * @param returnReferenceInputData Whether to return signature source data. - */ - public void setReturnReferenceInputData(boolean returnReferenceInputData) { - this.returnReferenceInputData = returnReferenceInputData; - } - - public boolean getReturnReferenceInputData() { - return returnReferenceInputData; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java deleted file mode 100644 index 277f1a008..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.security.cert.X509Certificate; - -import at.gv.egovernment.moa.spss.api.common.SignerInfo; - -/** - * Default implementation of SignerInfo. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class SignerInfoImpl implements SignerInfo { - - /** The signer certificate. */ - private X509Certificate signerCertificate; - /** Determines, whether signerCertificate is a qualified - * certificate. */ - private boolean qualifiedCertificate; - /** Determines, whether signerCertificate is from a public - * authority. */ - private boolean publicAuthority; - /** The public authority ID of the signerCertificate. */ - private String publicAuthorityID; - - /** - * Sets the signer certificate. - * - * @param signerCertificate The signer certificate. - */ - public void setSignerCertificate(X509Certificate signerCertificate) { - this.signerCertificate = signerCertificate; - } - - public X509Certificate getSignerCertificate() { - return signerCertificate; - } - - /** - * Sets, whether the certificate contained in this object is qualified or not. - * - * @param qualifiedCertificate Is true, if the certificate is - * qualified, otherwise false. - */ - public void setQualifiedCertificate(boolean qualifiedCertificate) { - this.qualifiedCertificate = qualifiedCertificate; - } - - public boolean isQualifiedCertificate() { - return qualifiedCertificate; - } - - /** - * Sets, whether the certificate contained in this object is an - * e-government certificate or not. - * - * @param publicAuthority Is true, if the certificate is - * public authority certificate, otherwise false. - */ - public void setPublicAuthority(boolean publicAuthority) { - this.publicAuthority = publicAuthority; - } - - public boolean isPublicAuthority() { - return publicAuthority; - } - - /** - * Sets the public authority ID of the signer certificate. - * - * @param publicAuhtorityID The public authority ID of the signer certificate. - */ - public void setPublicAuhtorityID(String publicAuhtorityID) { - this.publicAuthorityID = publicAuhtorityID; - } - - public String getPublicAuhtorityID() { - return publicAuthorityID; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java deleted file mode 100644 index b50a65c68..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo; - -/** - * @author Fatemeh Philippi - * @version $Id$ - */ -public class SingleSignatureInfoImpl implements SingleSignatureInfo { - - private List dataObjectInfos = new ArrayList(); - - private CreateSignatureInfo createSignatureInfo; - - private boolean securityLayerConform = true; - - public void setDataObjectInfos(List dataObjectInfos) { - this.dataObjectInfos = - dataObjectInfos != null - ? Collections.unmodifiableList(new ArrayList(dataObjectInfos)) - : null; - } - - public List getDataObjectInfos() { - return dataObjectInfos; - } - - public void setCreateSignatureInfo(CreateSignatureInfo createSignatureInfo) { - this.createSignatureInfo = createSignatureInfo; - } - - public CreateSignatureInfo getCreateSignatureInfo() { - return createSignatureInfo; - } - - public void setSecurityLayerConform(boolean securityLayerConform) { - this.securityLayerConform = securityLayerConform; - } - - public boolean isSecurityLayerConform() { - return securityLayerConform; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java deleted file mode 100644 index 78723fec2..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; -import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileExplicit; - -/** - * Default implementation of SupplementProfileExplicit. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class SupplementProfileExplicitImpl implements SupplementProfileExplicit { - - /** Supplemental information for verifying a signature. */ - private XMLDataObjectAssociation supplement; - - /** - * Sets the supplemental information for verifying a signature. - * - * @param supplement The supplemental information for verifying a signature. - */ - public void setSupplementProfile(XMLDataObjectAssociation supplement) { - this.supplement = supplement; - } - - public XMLDataObjectAssociation getSupplementProfile() { - return supplement; - } - - /** - * Gets the type of SupplementProfile. - * - * @return EXPLICIT_SUPPLEMENTPROFILE - */ - public int getSupplementProfileType() { - return EXPLICIT_SUPPLEMENTPROFILE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java deleted file mode 100644 index 320827fad..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileID; - -/** - * Default implementation of SupplementProfileID. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class SupplementProfileIDImpl implements SupplementProfileID { - /** The profile ID. */ - private String profileID; - - /** - * Sets the SupplementProfile profile ID. - * - * @param profileID The profile ID. - */ - public void setSupplementProfileID(String profileID) { - this.profileID = profileID; - } - - public String getSupplementProfileID() { - return profileID; - } - - /** - * Gets the type of SupplementProfile. - * - * @return ID_SUPPLEMENTPROFILE - */ - public int getSupplementProfileType() { - return ID_SUPPLEMENTPROFILE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java deleted file mode 100644 index 51c7a543f..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.Transform; - -/** - * @author Fatemeh Philippi - * @version $Id$ - */ -public class TransformImpl implements Transform { - /** The URI identifying the transformation algorithm. */ - private String algorithmURI; - - /** - * Sets the URI identifying the transformation algorithm. - * - * @param algorithmURI The URI identifying the transformation algorithm. - */ - public void setAlgorithmURI(String algorithmURI) { - this.algorithmURI = algorithmURI; - } - - public String getAlgorithmURI() { - return algorithmURI; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java deleted file mode 100644 index 2901fb1bb..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.io.InputStream; - -import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterBinary; - -/** - * Default implementation of TransformParameterBinary. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class TransformParameterBinaryImpl - extends TransformParameterImpl - implements TransformParameterBinary { - - /** The binary content as a stream. */ - private InputStream binaryContent; - - /** - * Sets the binary content as a stream. - * - * @param binaryContent The binary content as a stream. - */ - public void setBinaryContent(InputStream binaryContent) { - this.binaryContent = binaryContent; - } - - public InputStream getBinaryContent() { - return binaryContent; - } - - /** - * Gets the TransformParameter type. - * - * @return BINARY_TRANSFORMPARAMETER - */ - public int getTransformParameterType() { - return BINARY_TRANSFORMPARAMETER; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java deleted file mode 100644 index 9fe60638e..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -/** - * Default base implementation of TransformParameter. - * - * @author Patrick Peck - * @version $Id$ - */ -public abstract class TransformParameterImpl { - /** An URI identifying the TransformParameter. */ - private String uri; - - /** - * Sets the URI identifying the TransformParameter. - * @param uri The URI identifying the TransformParameter. - */ - public void setURI(String uri) { - this.uri = uri; - } - - public String getURI() { - return uri; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java deleted file mode 100644 index 25449504c..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterURI; - -/** - * Default implementation of TransformParameterURI. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class TransformParameterURIImpl - extends TransformParameterImpl - implements TransformParameterURI { - - /** - * Gets the type of TransformParameter. - * - * @return URI_TRANSFORMPARAMETER - */ - public int getTransformParameterType() { - return URI_TRANSFORMPARAMETER; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java deleted file mode 100644 index a7843e68c..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterHash; - -/** - * Default implementation of TransformParameterHash - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class TransformPatameterHashImpl - extends TransformParameterImpl - implements TransformParameterHash { - - /** The method used to calculate the digest value. */ - private String digestMethod; - /** The digest value. */ - private byte[] digestValue; - - /** - * Sets method used to calculate the digest value. - * @param digestMethod The method used to calculate the digest value. - */ - public void setDigestMethod(String digestMethod) { - this.digestMethod = digestMethod; - } - - public String getDigestMethod() { - return digestMethod; - } - - /** - * Sets the digest value. - * - * @param digestValue The digest value. - */ - public void setDigestValue(byte[] digestValue) { - this.digestValue = digestValue; - } - - public byte[] getDigestValue() { - return digestValue; - } - - /** - * Gets the type of TransformParameter. - * - * @return HASH_TRANSFORMPARAMETER - */ - public int getTransformParameterType() { - return HASH_TRANSFORMPARAMETER; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java deleted file mode 100644 index a3c37aaef..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.io.InputStream; -import java.util.Date; - -import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest; - -/** - * Default implementation of VerifyCMSSignatureRequest. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifyCMSSignatureRequestImpl - implements VerifyCMSSignatureRequest { - - /** The indexes of the signatories whose signature should be verified. */ - private int[] signatories; - /** The profile ID of trusted certificates. */ - private String trustProfileId; - /** The data object necessary for signature verification. */ - private CMSDataObject dataObject; - /** The CMS signature to verify. */ - private InputStream cmsSignature; - /** The date for which to verify the signature. */ - private Date dateTime; - - /** - * Sets the indexes of the signatories whose signature should be verified. - * - * @param signatories The indexes of the signatories whose signature should be - * verified. - */ - public void setSignatories(int[] signatories) { - this.signatories = signatories; - } - - public int[] getSignatories() { - return signatories; - } - - /** - * Sets the date for which to verify the signature. - * - * @param dateTime The date for which to verify the signature. - */ - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - public Date getDateTime() { - return dateTime; - } - - /** - * Sets the CMS signature to verify. - * @param signature The CMS signature to verify. - */ - public void setCMSSignature(InputStream signature) { - this.cmsSignature = signature; - - } - - public InputStream getCMSSignature() { - return cmsSignature; - } - - /** - * Sets the data object necessary for signature verification. - * @param dataObject The data object necessary for signature verification. - */ - public void setDataObject(CMSDataObject dataObject) { - this.dataObject = dataObject; - } - - public CMSDataObject getDataObject() { - return dataObject; - } - - /** - * Sets the profile ID of trusted certificates. - * @param trustProfileId The profile ID of trusted certificates. - */ - public void setTrustProfileId(String trustProfileId) { - this.trustProfileId = trustProfileId; - } - - public String getTrustProfileId() { - return trustProfileId; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java deleted file mode 100644 index 40dc04683..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement; -import at.gv.egovernment.moa.spss.api.common.CheckResult; -import at.gv.egovernment.moa.spss.api.common.SignerInfo; - -/** - * Default implementation of VerifyCMSSignatureResponseElement. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifyCMSSignatureResponseElementImpl - implements VerifyCMSSignatureResponseElement { - - /** Information about the signer certificate. */ - private SignerInfo signerInfo; - /** Information about the signature check. */ - private CheckResult signatureCheck; - /** Information about the certificate check. */ - private CheckResult certificateCheck; - - /** - * Sets a SignerInfo element according to CMS. - * - * @param signerInfo The SignerInfo element according to CMS. - */ - public void setSignerInfo(SignerInfo signerInfo) { - this.signerInfo = signerInfo; - } - - public SignerInfo getSignerInfo() { - return signerInfo; - } - - /** - * Sets a result of the signature verification. - * - * @param signatureCheck The result of the signature verification. - */ - public void setSignatureCheck(CheckResult signatureCheck) { - this.signatureCheck = signatureCheck; - } - - public CheckResult getSignatureCheck() { - return signatureCheck; - } - - /** - * Sets a result of the certificate verification. - * - * @param certificateCheck The result of the certificate verification. - */ - public void setCertificateCheck(CheckResult certificateCheck) { - this.certificateCheck = certificateCheck; - } - - public CheckResult getCertificateCheck() { - return certificateCheck; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java deleted file mode 100644 index f258380e0..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse; - -/** - * Default implementation of VerifyCMSSignatureResponse. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifyCMSSinatureResponseImpl - implements VerifyCMSSignatureResponse { - - /** The elements contained in the response. */ - private List responseElements; - - /** - * Sets the elements contained in the response. - * - * @param responseElements The elements contained in the response. - */ - public void setResponseElements(List responseElements) { - this.responseElements = - responseElements != null - ? Collections.unmodifiableList(new ArrayList(responseElements)) - : null; - } - - public List getResponseElements() { - return responseElements; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java deleted file mode 100644 index 2653e2fd2..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation; - -/** - * Default implementation of VerifySignatureInfo. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifySignatureInfoImpl implements VerifySignatureInfo { - /** The location of the signature to be verified. */ - private VerifySignatureLocation verifySignatureLocation; - /** The environment containing the signature to be verified. */ - private Content verifySignatureEnvironment; - - /** - * Sets the location of the signature to be verified. - * - * @param verifySignatureLocation The location of the signature to be - * verified. - */ - public void setVerifySignatureLocation(VerifySignatureLocation verifySignatureLocation) { - this.verifySignatureLocation = verifySignatureLocation; - } - - public VerifySignatureLocation getVerifySignatureLocation() { - return verifySignatureLocation; - } - - /** - * Sets the signature environment containing the signature to be verified. - * - * @param verifySignatureEnvironment The signature environment containing the - * signature to be verified. - */ - public void setVerifySignatureEnvironment(Content verifySignatureEnvironment) { - this.verifySignatureEnvironment = verifySignatureEnvironment; - } - - public Content getVerifySignatureEnvironment() { - return verifySignatureEnvironment; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java deleted file mode 100644 index 933e42987..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java +++ /dev/null @@ -1,15 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation; - -/** - * Default implementation of VerifySignatureLocation. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifySignatureLocationImpl - extends ElementSelectorImpl - implements VerifySignatureLocation { - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java deleted file mode 100644 index 594f9c246..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo; - -/** - * Default implementation of . - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifyTransformsDataImpl implements ReferenceInfo { - /** Information about the transformations contained in the signature. */ - private List verifyTransformsInfoProfiles; - - /** - * Sets the information about the transformations contained in the signature. - * - * @param verifyTransformsInfoProfiles The profiles containing transformation - * information. - */ - public void setVerifyTransformsInfoProfiles(List verifyTransformsInfoProfiles) { - this.verifyTransformsInfoProfiles = - verifyTransformsInfoProfiles != null - ? Collections.unmodifiableList( - new ArrayList(verifyTransformsInfoProfiles)) - : null; - } - - public List getVerifyTransformsInfoProfiles() { - return verifyTransformsInfoProfiles; - } -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java deleted file mode 100644 index d9a864499..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit; - -/** - * Default implementation of VerifyTransformsInfoProfileExplicit. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifyTransformsInfoProfileExplicitImpl - implements VerifyTransformsInfoProfileExplicit { - - /** The transforms contained in this profile. */ - private List transforms; - /** Additional information for the transforms. */ - private List transformParameters = new ArrayList(); - - /** - * Sets the transforms contained in this profile. - * - * @param transforms The transforms contained in this profile. - */ - public void setTransforms(List transforms) { - this.transforms = - transforms != null - ? Collections.unmodifiableList(new ArrayList(transforms)) - : null; - } - - public List getTransforms() { - return transforms; - } - - /** - * Sets additional information for the transforms. - * - * @param transformParameters Additional information for the transforms. - */ - public void setTransformParameters(List transformParameters) { - this.transformParameters = new ArrayList(transformParameters); - } - - public List getTransformParameters() { - return transformParameters; - } - - /** - * Gets the type of VerifyTransformsInfoProfile. - * - * @return EXPLICIT_VERIFYTRANSFORMSINFOPROFILE - */ - public int getVerifyTransformsInfoProfileType() { - return EXPLICIT_VERIFYTRANSFORMSINFOPROFILE; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java deleted file mode 100644 index fb1f10cea..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileID; - -/** - * Default implementation of VerifyTransformsInfoProfileID. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifyTransformsInfoProfileIDImpl implements VerifyTransformsInfoProfileID { - - /** The profile ID. */ - private String verifyTransformsInfoProfileID; - - /** - * Sets the profile ID. - * - * @param profileID The profile ID. - */ - public void setVerifyTransformsInfoProfileID(String profileID) { - this.verifyTransformsInfoProfileID = profileID; - } - - public String getVerifyTransformsInfoProfileID() { - return verifyTransformsInfoProfileID; - } - - /** - * Gets the type of VerifyTransformsInfoProfile. - * - * @return ID_VERIFYTRANSFORMSINFOPROFILE - */ - public int getVerifyTransformsInfoProfileType() { - return ID_VERIFYTRANSFORMSINFOPROFILE; - } - -} \ No newline at end of file diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java deleted file mode 100644 index 26d7def4c..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest; - -/** - * Default implementation of VerifyXMLSignatureRequest. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifyXMLSignatureRequestImpl - implements VerifyXMLSignatureRequest { - /** Date and time for signature verification. */ - private Date dateTime; - /** The signature to be verified. */ - private VerifySignatureInfo verifySignatureInfo; - /** Supplemental information about the singature. */ - private List supplementProfiles; - /** Additional parameters for checking the signature manifest. */ - private SignatureManifestCheckParams signatureManifestCheckParams; - /** Whether to return the hash input data. */ - private boolean returnHashInputData; - /** The profile ID of the trust profile containing the trusted certificates. - */ - private String trustProfileId; - - /** - * Sets the date and time for signature verification. - * - * @param dateTime The date and time for signature verification. - */ - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - public Date getDateTime() { - return dateTime; - } - - /** - * Sets the signature to be verified. - * - * @param signatureInfo The signature to be verified. - */ - public void setSignatureInfo(VerifySignatureInfo signatureInfo) { - this.verifySignatureInfo = signatureInfo; - } - - public VerifySignatureInfo getSignatureInfo() { - return verifySignatureInfo; - } - - /** - * Sets supplemental information about the singature. - * @param supplementProfiles - */ - public void setSupplementProfiles(List supplementProfiles) { - this.supplementProfiles = - supplementProfiles != null - ? Collections.unmodifiableList(new ArrayList(supplementProfiles)) - : null; - } - - public List getSupplementProfiles() { - return supplementProfiles; - } - - /** - * Sets supplemental information about the singature. - * @param params Supplemental information about the singature. - */ - public void setSignatureManifestCheckParams(SignatureManifestCheckParams params) { - this.signatureManifestCheckParams = params; - } - - public SignatureManifestCheckParams getSignatureManifestCheckParams() { - return signatureManifestCheckParams; - } - - /** - * Sets whether to return hash input data. - * - * @param returnSignedData Whether to return hash input data. - */ - public void setReturnHashInputData(boolean returnSignedData) { - this.returnHashInputData = returnSignedData; - } - - public boolean getReturnHashInputData() { - return returnHashInputData; - } - - /** - * Sets the profile ID of trusted certificates. - * - * @param trustProfileId The profile ID of trusted certificates. - */ - public void setTrustProfileId(String trustProfileId) { - this.trustProfileId = trustProfileId; - } - - public String getTrustProfileId() { - return trustProfileId; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java deleted file mode 100644 index f163013c1..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.common.CheckResult; -import at.gv.egovernment.moa.spss.api.common.SignerInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse; - -/** - * @author Fatemeh Philippi - * @version $Id$ - */ -public class VerifyXMLSignatureResponseImpl - implements VerifyXMLSignatureResponse { - - /** Information about the signer certificate. */ - private SignerInfo signerInfo; - /** The hash input data objects. */ - private List hashInputDatas = new ArrayList(); - /** The reference input data objects. */ - private List referenceInputDatas = new ArrayList(); - /** Information about the signature check. */ - private ReferencesCheckResult signatureCheck; - /** Information about the signature manifest check. */ - private ReferencesCheckResult signatureManifestCheck; - /** Information about the XMLDsig manifest check. */ - private List xmlDsigManifestChecks = new ArrayList(); - /** Information about the certificate check. */ - private CheckResult certificateCheck; - - /** - * Sets information about the signer certificate. - * - * @param signerInfo Information about the signer certificate. - */ - public void setSignerInfo(SignerInfo signerInfo) { - this.signerInfo = signerInfo; - } - - public SignerInfo getSignerInfo() { - return signerInfo; - } - - /** - * Sets data signed by the signatory. - * - * @param hashInputDatas The signed datas. - */ - public void setHashInputDatas(List hashInputDatas) { - this.hashInputDatas = - hashInputDatas != null - ? Collections.unmodifiableList(new ArrayList(hashInputDatas)) - : null; - } - - public List getHashInputDatas() { - return hashInputDatas; - } - - /** - * Sets the source data elements. - * - * @param referenceInputDatas The source data elements. - */ - public void setReferenceInputDatas(List referenceInputDatas) { - this.referenceInputDatas = - referenceInputDatas != null - ? Collections.unmodifiableList(new ArrayList(referenceInputDatas)) - : null; - } - - public List getReferenceInputDatas() { - return referenceInputDatas; - } - - /** - * Sets the result of the signature verification. - * - * @param signatureCheck The result of the signature verification. - */ - public void setSignatureCheck(ReferencesCheckResult signatureCheck) { - this.signatureCheck = signatureCheck; - } - - public ReferencesCheckResult getSignatureCheck() { - return signatureCheck; - } - - /** - * Sets the result of the signature manifest verification. - * - * @param signatureManifestCheck The result of the signature manifest verification. - */ - public void setSignatureManifestCheck(ReferencesCheckResult signatureManifestCheck) { - this.signatureManifestCheck = signatureManifestCheck; - } - - public ReferencesCheckResult getSignatureManifestCheck() { - return signatureManifestCheck; - } - - /** - * Sets the result of the certification verification. - * - * @param certificateCheck The result of the certificate verification. - */ - public void setCertificateCheck(CheckResult certificateCheck) { - this.certificateCheck = certificateCheck; - } - - public CheckResult getCertificateCheck() { - return certificateCheck; - } - - /** - * Sets the XMLDSigManifestChecks. - * - * @param xmlDsigManifestChecks The XMLDSigManifestChecks. - */ - public void setXMLDsigManifestChecks(List xmlDsigManifestChecks) { - this.xmlDsigManifestChecks = - xmlDsigManifestChecks != null - ? Collections.unmodifiableList(new ArrayList(xmlDsigManifestChecks)) - : null; - } - - public List getXMLDsigManifestChecks() { - return xmlDsigManifestChecks; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java deleted file mode 100644 index e6d644fd9..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.math.BigInteger; - -import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial; - -/** - * Default implementation of X509IssuerSerial. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class X509IssuerSerialImpl implements X509IssuerSerial { - /** The certificate serial number. */ - private BigInteger x509SerialNumber; - /** The certificate issuer DN. */ - private String x509IssuerName; - - /** - * Sets the issuer distinguished name. - * - * @param x509IssuerName The issuer distinguished name. - */ - public void setX509IssuerName(String x509IssuerName) { - this.x509IssuerName = x509IssuerName; - } - - public String getX509IssuerName() { - return x509IssuerName; - } - - /** - * Sets the certificate serial number. - * - * @param x509SerialNumber The issuer serial number. - */ - public void setX509SerialNumber(BigInteger x509SerialNumber) { - this.x509SerialNumber = x509SerialNumber; - } - - public BigInteger getX509SerialNumber() { - return x509SerialNumber; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java deleted file mode 100644 index b603c3367..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.common.MetaInfo; -import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; - -/** - * Default implementation of XMLDataObjectAssociation. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class XMLDataObjectAssociationImpl implements XMLDataObjectAssociation { - - /** Meta information about the Content object. */ - private MetaInfo metaInfo; - /** The actual data contained in this object. */ - private Content content; - - /** - * Sets meta information about the Content object. - * @param metaInfo Meta information about the Content object. - */ - public void setMetaInfo(MetaInfo metaInfo) { - this.metaInfo = metaInfo; - } - - public MetaInfo getMetaInfo() { - return metaInfo; - } - - /** - * Sets the actual data contained in this object. - * - * @param content The actual data contained in this object. - */ - public void setContent(Content content) { - this.content = content; - } - - public Content getContent() { - return content; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java deleted file mode 100644 index a96a8f161..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.ArrayList; -import java.util.List; - -import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform; - -/** - * Default implementation of XPathFilter2Transform. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class XPathFilter2TransformImpl - extends TransformImpl - implements XPathFilter2Transform { - - /** The XPath filters. */ - private List filters; - - /** - * Create a new XPathFilter2TransformImpl object. - */ - public XPathFilter2TransformImpl() { - setAlgorithmURI(XPATH_FILTER2); - } - - /** - * Sets the XPath filters contained in this - * XPathFilter2Transform. - * - * @param filters The XPath filters contained in this - * XPathFilter2Transform. - */ - public void setFilters(List filters) { - this.filters = new ArrayList(filters); - } - - public List getFilters() { - return filters; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java deleted file mode 100644 index 72d91bc58..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.HashMap; -import java.util.Map; - -import at.gv.egovernment.moa.spss.api.common.XPathFilter; - -/** - * Default implementation of XPathFilter. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class XPathFilterImpl implements XPathFilter { - /** The type of filter. */ - private String filterType; - /** The XPath expression of the filter. */ - private String xPathExpression; - /** The namespace prefix to URI mapping to while evaluating the XPath - * expression. */ - private Map namespaceDeclarations = new HashMap(); - - /** - * Sets the type of filter. - * - * @param filterType The type of filter. - */ - public void setFilterType(String filterType) { - this.filterType = filterType; - } - - public String getFilterType() { - return filterType; - } - - /** - * Sets the XPath expression of the filter. - * - * @param xPathExpression The XPath expression of the filter. - */ - public void setXPathExpression(String xPathExpression) { - this.xPathExpression = xPathExpression; - } - - public String getXPathExpression() { - return xPathExpression; - } - - /** - * Sets the namespace prefix to URI mapping to while evaluating the XPath - * expression. - * - * @param namespaceDeclarations The namespace prefix to URI mapping to while - * evaluating the XPath expression. - */ - public void setNamespaceDelcarations(Map namespaceDeclarations) { - this.namespaceDeclarations = namespaceDeclarations; - } - - public Map getNamespaceDeclarations() { - return namespaceDeclarations; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java deleted file mode 100644 index 1c9817ecc..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import java.util.HashMap; -import java.util.Map; - -import at.gv.egovernment.moa.spss.api.common.XPathTransform; - -/** - * Default implementation of XPathTransform. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class XPathTransformImpl - extends TransformImpl - implements XPathTransform { - - /** The XPath expression to evaluate. */ - private String xPathExpression; - /** The namespace prefix to URI mapping to while evaluating the XPath - * expression. */ - private Map namespaceDeclarations = new HashMap(); - - /** - * Create a new XPathTransformImpl object. - */ - public XPathTransformImpl() { - setAlgorithmURI(XPATH); - } - - /** - * Sets the XPath expression to evaluate. - * - * @param xPathExpression The XPath expression to evaluate. - */ - public void setXPathExpression(String xPathExpression) { - this.xPathExpression = xPathExpression; - } - - public String getXPathExpression() { - return xPathExpression; - } - - /** - * Sets the namespace prefix to URI mapping to while evaluating the XPath - * expression. - * - * @param namespaceDeclarations The namespace prefix to URI mapping to while - * evaluating the XPath expression. - */ - public void setNamespaceDelcarations(Map namespaceDeclarations) { - this.namespaceDeclarations = namespaceDeclarations; - } - - public Map getNamespaceDeclarations() { - return namespaceDeclarations; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java deleted file mode 100644 index c6ddc0fd6..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package at.gv.egovernment.moa.spss.api.impl; - -import org.w3c.dom.Element; - -import at.gv.egovernment.moa.spss.api.common.XSLTTransform; - -/** - * Default implementation of XSLTTransform. - * - * @author Fatemeh Philippi - * @version $Id$ - */ -public class XSLTransformImpl extends TransformImpl implements XSLTTransform { - /** The XSLT stylesheet to apply. */ - private Element styleSheet; - - /** - * Create a new XSLTransformImpl object. - */ - public XSLTransformImpl() { - setAlgorithmURI(XSLT); - } - - /** - * Sets the XSLT stylesheet to apply. - * - * @param styleSheet The XSLT stylesheet to apply. - */ - public void setStylesheet(Element styleSheet) { - this.styleSheet = styleSheet; - } - - public Element getStylesheet() { - return styleSheet; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java deleted file mode 100644 index 319d3ac9d..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java +++ /dev/null @@ -1,288 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.util.ArrayList; -import java.util.List; - -import org.w3c.dom.Element; -import org.w3c.dom.traversal.NodeIterator; - -import at.gv.egovernment.moa.util.BoolUtils; -import at.gv.egovernment.moa.util.Constants; -import at.gv.egovernment.moa.util.DOMUtils; -import at.gv.egovernment.moa.util.XPathUtils; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.api.SPSSFactory; -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest; -import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo; - -/** - * A parser to parse CreateXMLSignatureRequest DOM trees into - * CreateXMLSignatureRequest API objects. - * - * @author Patrick Peck - * @version $Id$ - */ -public class CreateXMLSignatureRequestParser { - - // - // XPath expresssions to select elements in the CreateXMLSignatureRequest - // - private static final String MOA = Constants.MOA_PREFIX + ":"; - private static final String KEY_IDENTIFIER_XPATH = - "/" + MOA + "CreateXMLSignatureRequest/" + MOA + "KeyIdentifier"; - private static final String SINGLE_SIGNATURE_INFO_XPATH = - "/" + MOA + "CreateXMLSignatureRequest/" + MOA + "SingleSignatureInfo"; - private static final String DATA_OBJECT_INFO_XPATH = MOA + "DataObjectInfo"; - private static final String DATA_OBJECT_XPATH = MOA + "DataObject"; - private static final String CREATE_SIGNATURE_INFO_XPATH = - MOA + "CreateSignatureInfo"; - private static final String CREATE_TRANSFORMS_INFO_PROFILE_XPATH = - (MOA + "CreateTransformsInfoProfile | ") - + (MOA + "CreateTransformsInfoProfileID"); - private static final String CREATE_SIGNATURE_ENVIRONMENT_XPATH = - MOA + "CreateSignatureEnvironment"; - private static final String CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH = - (MOA + "CreateSignatureEnvironmentProfile | ") - + (MOA + "CreateSignatureEnvironmentProfileID"); - private static final String SL_CONFORM_ATTR_NAME = "SecurityLayerConformity"; - - /** The factory to create API objects. */ - private SPSSFactory factory; - - /** - * Create a new CreateXMLSignatureRequestParser. - */ - public CreateXMLSignatureRequestParser() { - this.factory = SPSSFactory.getInstance(); - } - - /** - * Parse a CreateXMLSignatureRequest DOM element, as defined - * by the MOA schema. - * - * @param requestElem The CreateXMLSignatureRequest to parse. The - * request must have been successfully parsed against the schema for this - * method to succeed. - * @return A CreateXMLSignatureRequest API object containing - * the data from the DOM element. - * @throws MOAApplicationException An error occurred parsing the request. - */ - public CreateXMLSignatureRequest parse(Element requestElem) - throws MOAApplicationException { - - List singleSignatureInfos = parseSingleSignatureInfos(requestElem); - String keyIdentifier = - XPathUtils.getElementValue(requestElem, KEY_IDENTIFIER_XPATH, null); - - return factory.createCreateXMLSignatureRequest( - keyIdentifier, - singleSignatureInfos); - } - - /** - * Parse all SingleSignatureInfo elements of the - * CreateXMLSignatureRequest. - * - * @param requestElem The CreateXMLSignatureRequest to parse. - * @return A List of SingleSignatureInfo API - * objects. - * @throws MOAApplicationException An error occurred parsing on of the - * SingleSignatureInfo elements. - */ - private List parseSingleSignatureInfos(Element requestElem) - throws MOAApplicationException { - - List singleSignatureInfos = new ArrayList(); - NodeIterator sigInfoElems = - XPathUtils.selectNodeIterator(requestElem, SINGLE_SIGNATURE_INFO_XPATH); - Element sigInfoElem; - - while ((sigInfoElem = (Element) sigInfoElems.nextNode()) != null) { - singleSignatureInfos.add(parseSingleSignatureInfo(sigInfoElem)); - } - - return singleSignatureInfos; - } - - /** - * Parse a SingleSignatureInfo DOM element. - * - * @param sigInfoElem The SingleSignatureInfo DOM element to - * parse. - * @return A SingleSignatureInfo API object containing the - * information of sigInfoElem. - * @throws MOAApplicationException An error occurred parsing the - * SingleSignatureInfo. - */ - private SingleSignatureInfo parseSingleSignatureInfo(Element sigInfoElem) - throws MOAApplicationException { - - List dataObjectInfos = parseDataObjectInfos(sigInfoElem); - CreateSignatureInfo createSignatureInfo = - parseCreateSignatureInfo(sigInfoElem); - boolean securityLayerConform; - - if (sigInfoElem.hasAttribute(SL_CONFORM_ATTR_NAME)) { - securityLayerConform = - BoolUtils.valueOf(sigInfoElem.getAttribute(SL_CONFORM_ATTR_NAME)); - } else { - securityLayerConform = true; - } - - return factory.createSingleSignatureInfo( - dataObjectInfos, - createSignatureInfo, - securityLayerConform); - } - - /** - * Parse the DataObjectInfo DOM elements contained in the given - * SingleSignatureInfo DOM element. - * - * @param sigInfoElem The SingleSignatureInfo DOM element - * whose DataObjectInfos to parse. - * @return A List of DataObjectInfo API objects - * containing the data from the DataObjectInfo DOM elements. - * @throws MOAApplicationException An error occurred parsing one of the - * DataObjectInfos. - */ - private List parseDataObjectInfos(Element sigInfoElem) - throws MOAApplicationException { - - List dataObjectInfos = new ArrayList(); - NodeIterator dataObjInfoElems = - XPathUtils.selectNodeIterator(sigInfoElem, DATA_OBJECT_INFO_XPATH); - Element dataObjInfoElem; - - while ((dataObjInfoElem = (Element) dataObjInfoElems.nextNode()) != null) { - dataObjectInfos.add(parseDataObjectInfo(dataObjInfoElem)); - } - return dataObjectInfos; - } - - /** - * Parse a DataObjectInfo DOM element. - * - * @param dataObjInfoElem The DataObjectInfo DOM element to - * parse. - * @return A DataObjectInfo API element containing the data - * from dataObjInfoElem. - * @throws MOAApplicationException An error occurred parsing the - * DataObjectInfo. - */ - private DataObjectInfo parseDataObjectInfo(Element dataObjInfoElem) - throws MOAApplicationException { - - String structure = dataObjInfoElem.getAttribute("Structure"); - Element dataObjectElem = - (Element) XPathUtils.selectSingleNode(dataObjInfoElem, DATA_OBJECT_XPATH); - Content dataObject = RequestParserUtils.parseContent(dataObjectElem); - CreateTransformsInfoProfile createTransformsInfoProfile = - parseCreateTransformsInfoProfile(dataObjInfoElem); - boolean childOfManifest; - - if (dataObjInfoElem.hasAttribute("ChildOfManifest")) { - childOfManifest = - BoolUtils.valueOf(dataObjInfoElem.getAttribute("ChildOfManifest")); - } else { - childOfManifest = false; - } - - return factory.createDataObjectInfo( - structure, - childOfManifest, - dataObject, - createTransformsInfoProfile); - } - - /** - * Parse a CreateTransformsInfoProfile DOM element. - * - * @param dataObjInfoElem The DataObjectInfo DOM element - * containing the CreateTransformsInfoProfile. - * @return The CreateTransformsInfoProfile API object containing - * the profile found in dataObjInfoElem. - * @throws MOAApplicationException An error occurred parsing the - * CreateTransformsInfoProfile. - */ - private CreateTransformsInfoProfile parseCreateTransformsInfoProfile(Element dataObjInfoElem) - throws MOAApplicationException { - - Element profileElem = - (Element) XPathUtils.selectSingleNode( - dataObjInfoElem, - CREATE_TRANSFORMS_INFO_PROFILE_XPATH); - - if ("CreateTransformsInfoProfile".equals(profileElem.getLocalName())) { - ProfileParser profileParser = new ProfileParser(); - return profileParser.parseCreateTransformsInfoProfile(profileElem); - - } else { - String profileID = DOMUtils.getText(profileElem); - return factory.createCreateTransformsInfoProfile(profileID); - } - } - - /** - * Parse the CreateSignatureInfo DOM element contained in - * a SingleSignatureInfo. - * - * @param sigInfoElem The SingleSignatureInfo DOM element - * containing the CreateSignatureInfo to be parsed. - * @return A CreateSignatureInfo API object containing the - * data from the CreateSignatureInfo DOM element, or - * null, if none was found. - */ - private CreateSignatureInfo parseCreateSignatureInfo(Element sigInfoElem) { - Element createInfoElem = - (Element) XPathUtils.selectSingleNode( - sigInfoElem, - CREATE_SIGNATURE_INFO_XPATH); - - if (createInfoElem != null) { - Element environmentElem = - (Element) XPathUtils.selectSingleNode( - createInfoElem, - CREATE_SIGNATURE_ENVIRONMENT_XPATH); - Content environment = RequestParserUtils.parseContent(environmentElem); - CreateSignatureEnvironmentProfile environmentProfile = - parseCreateSignatureEnvironmentProfile(createInfoElem); - - return factory.createCreateSignatureInfo(environment, environmentProfile); - } else { - return null; - } - } - - /** - * Parse the CreateSignatureEnvironmentProfile contained in - * the given CreateSignatureInfo DOM element. - * - * @param createInfoElem CreateSignatureInfo DOM element to - * parse. - * @return The CreateSignatureEnvironmentProfile contained - * in the given CreateSignatureInfo DOM element.. - */ - private CreateSignatureEnvironmentProfile parseCreateSignatureEnvironmentProfile(Element createInfoElem) { - Element profileElem = - (Element) XPathUtils.selectSingleNode( - createInfoElem, - CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH); - - if ("CreateSignatureEnvironmentProfile" - .equals(profileElem.getLocalName())) { - ProfileParser profileParser = new ProfileParser(); - return profileParser.parseCreateSignatureEnvironmentProfile(profileElem); - } else { - String profileID = DOMUtils.getText(profileElem); - return factory.createCreateSignatureEnvironmentProfile(profileID); - } - } - -} \ No newline at end of file diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java deleted file mode 100644 index eec9c4882..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.util.Iterator; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -import at.gv.egovernment.moa.util.Constants; - -import at.gv.egovernment.moa.spss.MOASystemException; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponseElement; -import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse; -import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse; - -/** - * Convert a CreateXMLSignatureResponse API object into its - * XML representation, according to the MOA XML schema. - * - * @author Patrick Peck - * @version $Id$ - */ -public class CreateXMLSignatureResponseBuilder { - private static final String MOA_NS_URI = Constants.MOA_NS_URI; - - /** The XML document containing the response element. */ - private Document responseDoc; - /** The response CreateXMLSignatureResponse DOM element. */ - private Element responseElem; - - /** - * Create a new CreateXMLSignatureResponseBuilder: - * - * @throws MOASystemException An error occurred setting up the resulting - * XML document. - */ - public CreateXMLSignatureResponseBuilder() throws MOASystemException { - responseDoc = - ResponseBuilderUtils.createResponse("CreateXMLSignatureResponse"); - responseElem = responseDoc.getDocumentElement(); - } - - /** - * Build a document containing a CreateXMLSignatureResponse - * DOM element being the XML representation of the given - * CreateXMLSignatureResponse API object. - * - * @param response The CreateXMLSignatureResponse to convert - * to XML. - * @return A document containing the CreateXMLSignatureResponse - * DOM element. - */ - public Document build(CreateXMLSignatureResponse response) { - Iterator iter; - - for (iter = response.getResponseElements().iterator(); iter.hasNext();) { - CreateXMLSignatureResponseElement responseElement = - (CreateXMLSignatureResponseElement) iter.next(); - - switch (responseElement.getResponseType()) { - case CreateXMLSignatureResponseElement.SIGNATURE_ENVIRONMENT_RESPONSE : - SignatureEnvironmentResponse envResponse = - (SignatureEnvironmentResponse) responseElement; - addSignatureEnvironment(envResponse); - break; - - case CreateXMLSignatureResponseElement.ERROR_RESPONSE : - ErrorResponse errorResponse = (ErrorResponse) responseElement; - addErrorResponse(errorResponse); - break; - } - - } - - return responseDoc; - } - - /** - * Add a SignatureEnvironment element to the response. - * - * @param envResponse The content to put under the - * SignatureEnvironment element. This should either be a - * dsig:Signature element (in case of a detached signature) or - * the signature environment containing the signature (in case of - * an enveloping signature). - */ - private void addSignatureEnvironment(SignatureEnvironmentResponse envResponse) { - Element content = envResponse.getSignatureEnvironment(); - Node importedSignature = responseDoc.importNode(content, true); - Element signatureEnvironment = - responseDoc.createElementNS(MOA_NS_URI, "SignatureEnvironment"); - signatureEnvironment.appendChild(importedSignature); - responseElem.appendChild(signatureEnvironment); - } - - /** - * Add a ErrorResponse element to the response. - * - * @param errorResponse The API object containing the information to put into - * the ErrorResponse DOM element. - */ - private void addErrorResponse(ErrorResponse errorResponse) { - Element errorElem = - responseDoc.createElementNS(MOA_NS_URI, "ErrorResponse"); - Element errorCodeElem = - responseDoc.createElementNS(MOA_NS_URI, "ErrorCode"); - Element infoElem = responseDoc.createElementNS(MOA_NS_URI, "Info"); - String errorCodeStr = Integer.toString(errorResponse.getErrorCode()); - - errorCodeElem.appendChild(responseDoc.createTextNode(errorCodeStr)); - errorElem.appendChild(errorCodeElem); - infoElem.appendChild(responseDoc.createTextNode(errorResponse.getInfo())); - errorElem.appendChild(errorCodeElem); - errorElem.appendChild(infoElem); - responseElem.appendChild(errorElem); - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java deleted file mode 100644 index 66c08e0ab..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java +++ /dev/null @@ -1,285 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.w3c.dom.Element; -import org.w3c.dom.traversal.NodeIterator; - -import at.gv.egovernment.moa.util.Base64Utils; -import at.gv.egovernment.moa.util.Constants; -import at.gv.egovernment.moa.util.DOMUtils; -import at.gv.egovernment.moa.util.XPathUtils; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.api.SPSSFactory; -import at.gv.egovernment.moa.spss.api.common.MetaInfo; -import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo; -import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile; -import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile; -import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile; - -/** - * Parse the various profile elements contained in the MOA web service requests - * and given as separate files in the MOA configuration. - * - * The profiles parsed must be schema valid according to the MOA XML schema. - * - * @author Patrick Peck - * @version $Id$ - */ -public class ProfileParser { - - // - // XPath expressions to select parts of the profiles - // - private static final String MOA = Constants.MOA_PREFIX + ":"; - private static final String DSIG = Constants.DSIG_PREFIX + ":"; - private static final String CREATE_TRANSFORMS_XPATH = - MOA + "CreateTransformsInfo/" + DSIG + "Transforms"; - private static final String FINAL_DATA_META_INFO_XPATH = - MOA + "CreateTransformsInfo/" + MOA + "FinalDataMetaInfo"; - private static final String CREATE_SIGNATURE_LOCATION_XPATH = - MOA + "CreateSignatureLocation"; - private static final String SUPPLEMENT_XPATH = MOA + "Supplement"; - private static final String VERIFY_TRANSFORMS_XPATH = DSIG + "Transforms"; - private static final String TRANSFORM_PARAMETER_XPATH = - MOA + "TransformParameter"; - private static final String TRANSFORM_PARAMETER_CONTENT_XPATH = - MOA + "Base64Content | " + MOA + "Hash"; - private static final String DIGEST_METHOD_XPATH = DSIG + "DigestMethod"; - private static final String DIGEST_VALUE_XPATH = DSIG + "DigestValue"; - - /** The factory used to create API objects. */ - private SPSSFactory factory = SPSSFactory.getInstance(); - - /** - * Parse a CreateTransformsInfoProfile DOM element. - * - * @param profileElem The CreateTransformsInfoProfile element - * to parse. - * @return The CreateTransformsInfoProfile API object containing - * the data from the profileElem. - * @throws MOAApplicationException An error occurred parsing the DOM element. - */ - public CreateTransformsInfoProfile parseCreateTransformsInfoProfile(Element profileElem) - throws MOAApplicationException { - CreateTransformsInfo createTransformsInfo = - parseCreateTransformsInfo(profileElem); - List supplements = parseSupplements(profileElem); - - return factory.createCreateTransformsInfoProfile( - createTransformsInfo, - supplements); - } - - /** - * Parse the CreateTransformsInfo DOM element contained in a - * CreateTransformsInfoProfile. - * - * @param profileElem The CreateTransformsInfoProfile DOM - * element containing the CreateTransformsInfo. - * @return The CreateTransformsInfo API object containinig the - * data from the CreateTransformsInfo DOM element. - * @throws MOAApplicationException An error occurred parsing the - * CreateTransformsInfo DOM element. - */ - private CreateTransformsInfo parseCreateTransformsInfo(Element profileElem) - throws MOAApplicationException { - - Element transformsElem = - (Element) XPathUtils.selectSingleNode( - profileElem, - CREATE_TRANSFORMS_XPATH); - Element metaInfoElem = - (Element) XPathUtils.selectSingleNode( - profileElem, - FINAL_DATA_META_INFO_XPATH); - MetaInfo finalDataMetaInfo; - List transforms; - - // parse the dsig:Transforms - if (transformsElem != null) { - TransformParser transformsParser = new TransformParser(); - transforms = transformsParser.parseTransforms(transformsElem); - } else { - transforms = null; - } - - // parse the meta info - finalDataMetaInfo = RequestParserUtils.parseMetaInfo(metaInfoElem); - - return factory.createCreateTransformsInfo(transforms, finalDataMetaInfo); - } - - /** - * Parse a CreateSignatureEnvironmentProfile DOM element. - * - * @param profileElem The CreateSignatureEnvironmentProfile - * DOM element to parse. - * @return The CreateSignatureEnvironmentProfile API object - * containing the data from the profileElem. - */ - public CreateSignatureEnvironmentProfile parseCreateSignatureEnvironmentProfile(Element profileElem) { - CreateSignatureLocation createSignatureLocation = - parseCreateSignatureLocation(profileElem); - List supplements = parseSupplements(profileElem); - - return factory.createCreateSignatureEnvironmentProfile( - createSignatureLocation, - supplements); - } - - /** - * Parse a CreateSignatureLocation DOM element contained in - * a CreateSignatureEnvironmentProfile. - * - * @param profileElem The CreateSignatureEnvironmentProfile DOM - * element containing the CreateSignatureLocation. - * @return The CreateSignatureLocation API object containing - * the data from the CreateSignatureLocation DOM element. - */ - private CreateSignatureLocation parseCreateSignatureLocation(Element profileElem) { - Element locationElem = - (Element) XPathUtils.selectSingleNode( - profileElem, - CREATE_SIGNATURE_LOCATION_XPATH); - String xPathExpression = DOMUtils.getText(locationElem); - Map namespaceDeclarations = DOMUtils.getNamespaceDeclarations(locationElem); - String indexStr = locationElem.getAttribute("Index"); - int index = Integer.parseInt(indexStr); - - return factory.createCreateSignatureLocation( - xPathExpression, - index, - namespaceDeclarations); - } - - /** - * Parse all Supplement DOM elements contained in a given - * parent DOM element. - * - * @param supplementsParentElem The DOM element being the parent of the - * Supplements. - * @return A List of Supplement API objects - * containing the data from the Supplement DOM elements. - */ - private List parseSupplements(Element supplementsParentElem) { - List supplements = new ArrayList(); - NodeIterator supplementElems = - XPathUtils.selectNodeIterator(supplementsParentElem, SUPPLEMENT_XPATH); - Element supplementElem; - - while ((supplementElem = (Element) supplementElems.nextNode()) != null) { - XMLDataObjectAssociation supplement = - RequestParserUtils.parseXMLDataObjectAssociation(supplementElem); - supplements.add(supplement); - } - return supplements; - } - - /** - * Parse a SupplementProfile DOM element. - * - * @param profileElem The SupplementProfile DOM element to parse. - * @return The SupplementProfile API object containing the - * data from the SupplementProfile DOM element. - */ - public SupplementProfile parseSupplementProfile(Element profileElem) { - XMLDataObjectAssociation supplementProfile = - RequestParserUtils.parseXMLDataObjectAssociation(profileElem); - - return factory.createSupplementProfile(supplementProfile); - } - - /** - * Parse a VerifyTransformsInfoProfile DOM element. - * - * @param profileElem The VerifyTransformsInfoProfile DOM - * element to parse. - * @return A VerifyTransformsInfoProfile API object containing - * the information from the VerifyTransformsInfoProfile DOM - * element. - * @throws MOAApplicationException An error occurred parsing the - * VerifyTransformsInfoProfile. - */ - public VerifyTransformsInfoProfile parseVerifyTransformsInfoProfile(Element profileElem) - throws MOAApplicationException { - Element transformsElem = - (Element) XPathUtils.selectSingleNode( - profileElem, - VERIFY_TRANSFORMS_XPATH); - List transforms = null; - NodeIterator paramElems = - XPathUtils.selectNodeIterator(profileElem, TRANSFORM_PARAMETER_XPATH); - Element paramElem; - List transformParameters = new ArrayList(); - - // parse the dsig:Transforms - if (transformsElem != null) { - TransformParser transformsParser = new TransformParser(); - transforms = transformsParser.parseTransforms(transformsElem); - } - - // parse the TransformParameter elements - while ((paramElem = (Element) paramElems.nextNode()) != null) { - transformParameters.add(parseTransformParameter(paramElem)); - } - - return factory.createVerifyTransformsInfoProfile( - transforms, - transformParameters); - } - - /** - * Parse a TransformParameter DOM element. - * - * @param paramElem The TransformParameter DOM element to - * parse. - * @return The TransformParameter API object containing the - * information from the TransformParameter DOM element. - * @throws MOAApplicationException An error occurred parsing the - * TransformParameter DOM element. - */ - private TransformParameter parseTransformParameter(Element paramElem) - throws MOAApplicationException { - String uri = paramElem.getAttribute("URI"); - Element contentElem = - (Element) XPathUtils.selectSingleNode( - paramElem, - TRANSFORM_PARAMETER_CONTENT_XPATH); - - if (contentElem == null) { - return factory.createTransformParameter(uri); - } else if ("Base64Content".equals(contentElem.getLocalName())) { - String base64Str = DOMUtils.getText(contentElem); - InputStream binaryContent = Base64Utils.decodeToStream(base64Str, true); - - return factory.createTransformParameter(uri, binaryContent); - } else { // "Hash".equals(contentElem.getLocalName()) - String digestMethodStr = - XPathUtils.getElementValue(contentElem, DIGEST_METHOD_XPATH, ""); - String digestValueStr = - XPathUtils.getElementValue(contentElem, DIGEST_VALUE_XPATH, ""); - byte[] digestValue = null; - - try { - digestValue = Base64Utils.decode(digestValueStr, true); - } catch (IOException e) { - throw new MOAApplicationException("2270", null); - } - return factory.createTransformParameter( - uri, - digestMethodStr, - digestValue); - } - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java deleted file mode 100644 index 0fff949b1..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java +++ /dev/null @@ -1,147 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.text.ParseException; -import java.util.Date; - -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import at.gv.egovernment.moa.util.Base64Utils; -import at.gv.egovernment.moa.util.Constants; -import at.gv.egovernment.moa.util.DOMUtils; -import at.gv.egovernment.moa.util.DateTimeUtils; -import at.gv.egovernment.moa.util.XPathUtils; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.api.SPSSFactory; -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.common.MetaInfo; -import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; - -/** - * Utility methods for parsing XML requests definied in the MOA XML schema. - * - * @author Patrick Peck - * @version $Id$ - */ -public class RequestParserUtils { - // - // XPath expressions for parsing parts of a request - // - private static final String MOA = Constants.MOA_PREFIX + ":"; - private static final String REFERENCE_ATTR_NAME = "Reference"; - private static final String MIME_TYPE_XPATH = MOA + "MimeType"; - private static final String DESCRIPTION_XPATH = MOA + "Description"; - private static final String XML_ASSOC_CONTENT_XPATH = MOA + "Content"; - private static final String CONTENT_XPATH = - MOA + "Base64Content | " + MOA + "XMLContent"; - private static final String ANY_OTHER_XPATH = - "*[namespace-uri() != \"" + Constants.MOA_NS_URI + "\"]"; - - /** - * Parse a XMLDataObjectAssociationType kind of DOM element. - * - * @param assocElem The XMLDataObjectAssociationType kind of - * DOM elmeent to parse. - * @return The XMLDataObjectAssociation API object containing - * the data from the XMLDataObjectAssociationType DOM element. - */ - public static XMLDataObjectAssociation parseXMLDataObjectAssociation(Element assocElem) { - SPSSFactory factory = SPSSFactory.getInstance(); - MetaInfo metaInfo = parseMetaInfo(assocElem); - Element contentElem = - (Element) XPathUtils.selectSingleNode(assocElem, XML_ASSOC_CONTENT_XPATH); - Content content = parseContent(contentElem); - - return factory.createXMLDataObjectAssociation(metaInfo, content); - } - - /** - * Parse a MetaInfoType kind of DOM element. - * - * @param metaInfoElem The MetaInfoType kind of DOM element. - * @return The MetaInfo API object containing the data from - * the metaInfoElem. - */ - public static MetaInfo parseMetaInfo(Element metaInfoElem) { - SPSSFactory factory = SPSSFactory.getInstance(); - String mimeType = - XPathUtils.getElementValue(metaInfoElem, MIME_TYPE_XPATH, null); - String description = - XPathUtils.getElementValue(metaInfoElem, DESCRIPTION_XPATH, null); - NodeList anyOther = - XPathUtils.selectNodeList(metaInfoElem, ANY_OTHER_XPATH); - - return factory.createMetaInfo(mimeType, description, anyOther); - } - - /** - * Parse a ContentOptionalRefType or - * ContentRequiredRefType kind of DOM element. - * @param contentParentElem The DOM element being the parent of the - * content element. - * @return The Content API object containing the data from - * the given DOM element. - */ - public static Content parseContent(Element contentParentElem) { - SPSSFactory factory = SPSSFactory.getInstance(); - String referenceURI = - contentParentElem.hasAttribute(REFERENCE_ATTR_NAME) - ? contentParentElem.getAttribute(REFERENCE_ATTR_NAME) - : null; - Element contentElem = - (Element) XPathUtils.selectSingleNode(contentParentElem, CONTENT_XPATH); - - if (contentElem == null) { - return factory.createContent(referenceURI); - } - - if ("Base64Content".equals(contentElem.getLocalName())) { - String base64String = DOMUtils.getText(contentElem); - return factory.createContent( - Base64Utils.decodeToStream(base64String, true), - referenceURI); - } else { // "XMLContent".equals(contentElem.getLocalName()) - return factory.createContent(contentElem.getChildNodes(), referenceURI); - } - } - - /** - * Get the signing time from a Verfiy(CMS|XML)SignatureRequest. - * - * @param requestElem A Verify(CMS|XML)SignatureRequest DOM - * element. - * @param dateTimeXPath The XPath to lookup the DateTime element - * within the request. - * @return Date The date and time corresponding to the DateTime - * element in the request. If no DateTime element exists in the - * request, null is returned. - * @throws MOAApplicationException An error occurred during a parsing the - * DateTime element or creating the return value. - */ - public static Date parseDateTime(Element requestElem, String dateTimeXPath) - throws MOAApplicationException { - - Element dateTimeElem; - String dateTimeText; - - // select the DateTime element - dateTimeElem = - (Element) XPathUtils.selectSingleNode(requestElem, dateTimeXPath); - - // parse a date from the element value - if (dateTimeElem != null) { - dateTimeText = DOMUtils.getText(dateTimeElem); - try { - return DateTimeUtils.parseDateTime(dateTimeText); - } catch (ParseException e) { - throw new MOAApplicationException( - "1104", - new Object[] { dateTimeText }); - } - } else { - return null; - } - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java deleted file mode 100644 index cc3e73e41..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java +++ /dev/null @@ -1,213 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.io.IOException; -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.DOMImplementation; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import iaik.utils.RFC2253NameParser; -import iaik.utils.RFC2253NameParserException; - -import at.gv.egovernment.moa.util.Base64Utils; -import at.gv.egovernment.moa.util.Constants; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.MOASystemException; - -/** - * Utility methods used by the verious ResponseBuilder classes. - * - * @author Patrick Peck - * @version $Id$ - */ -class ResponseBuilderUtils { - // - // shortcuts to various XML namespace constants - // - private static final String MOA_NS_URI = Constants.MOA_NS_URI; - private static final String SL11 = Constants.SL11_PREFIX + ":"; - private static final String SL11_NS_URI = Constants.SL11_NS_URI; - private static final String DSIG = Constants.DSIG_PREFIX + ":"; - private static final String DSIG_NS_URI = Constants.DSIG_NS_URI; - private static final String XMLNS_NS_URI = Constants.XMLNS_NS_URI; - - /** - * Create a response element with all the namespaces set. - * - * @param responseName The name of the response root element. - * @return A DOM document containing the response root element and predefined - * MOA, DSIG and XML namespace declarations. - * @throws MOASystemException An error building the response document. - */ - public static Document createResponse(String responseName) - throws MOASystemException { - - try { - DocumentBuilder docBuilder = - DocumentBuilderFactory.newInstance().newDocumentBuilder(); - DOMImplementation impl = docBuilder.getDOMImplementation(); - Document response; - Element root; - String attrValue; - - response = impl.createDocument(MOA_NS_URI, responseName, null); - root = response.getDocumentElement(); - - // add namespace prefix declarations - root.setAttributeNS(XMLNS_NS_URI, "xmlns", MOA_NS_URI); - attrValue = "xmlns:" + Constants.DSIG_PREFIX; - root.setAttributeNS(XMLNS_NS_URI, attrValue, DSIG_NS_URI); - - return response; - } catch (ParserConfigurationException e) { - throw new MOASystemException("2200", null, e); - } - } - - /** - * Add a SignerInfo element to the response. - * - * @param response The response document, in order to create new elements in - * it. - * @param root The root element into which the SignerInfo element - * will be inserted. - * @param cert The signer certificate to add. - * @param isQualified Indicates, whether cert is a qualified - * certificate. - * @param isPublicAuthority Indicates, whether cert is - * certificate owned by a public authority. - * @param publicAuthorityID Information about the public authority owning - * cert. Must not be null, if - * isPublicAuthority ! = null. - * @throws MOAApplicationException An error occurred reading data from the - * certificate. - */ - public static void addSignerInfo( - Document response, - Element root, - X509Certificate cert, - boolean isQualified, - boolean isPublicAuthority, - String publicAuthorityID) - throws MOAApplicationException { - - Element signerInfoElem = response.createElementNS(MOA_NS_URI, "SignerInfo"); - Element x509DataElem = - response.createElementNS(DSIG_NS_URI, DSIG + "X509Data"); - Element x509IssuerSerialElem = - response.createElementNS(DSIG_NS_URI, DSIG + "X509IssuerSerial"); - Element x509IssuerElem = - response.createElementNS(DSIG_NS_URI, DSIG + "X509IssuerName"); - String issuer = cert.getIssuerDN().getName(); - Element x509SerialNumberElem = - response.createElementNS(DSIG_NS_URI, DSIG + "X509SerialNumber"); - String serialNumber = cert.getSerialNumber().toString(); - Element x509SubjectNameElem = - response.createElementNS(DSIG_NS_URI, DSIG + "X509SubjectName"); - Element x509CertificateElem = - response.createElementNS(DSIG_NS_URI, DSIG + "X509Certificate"); - Element qualifiedCertificateElem = - isQualified - ? response.createElementNS(SL11_NS_URI, SL11 + "QualifiedCertificate") - : null; - Element publicAuthorityElem = - isPublicAuthority - ? response.createElementNS(MOA_NS_URI, "PublicAuthority") - : null; - Element codeElem = - publicAuthorityID != null - ? response.createElementNS(MOA_NS_URI, "Code") - : null; - - // fill in text - x509IssuerElem.appendChild(response.createTextNode(issuer)); - x509SerialNumberElem.appendChild(response.createTextNode(serialNumber)); - try { - RFC2253NameParser parser = - new RFC2253NameParser(cert.getSubjectDN().getName()); - String subjectRfc2253 = parser.parse().getRFC2253String(); - x509SubjectNameElem.appendChild(response.createTextNode(subjectRfc2253)); - } catch (RFC2253NameParserException e) { - x509SubjectNameElem.appendChild( - response.createTextNode(cert.getSubjectDN().getName())); - } - try { - x509CertificateElem.appendChild( - response.createTextNode(Base64Utils.encode(cert.getEncoded()))); - } catch (CertificateEncodingException e) { - throw new MOAApplicationException("2245", null, e); - } catch (IOException e) { - throw new MOAApplicationException("2245", null, e); - } - - // build structure - x509DataElem.appendChild(x509SubjectNameElem); - x509IssuerSerialElem.appendChild(x509IssuerElem); - x509IssuerSerialElem.appendChild(x509SerialNumberElem); - x509DataElem.appendChild(x509IssuerSerialElem); - x509DataElem.appendChild(x509CertificateElem); - if (isQualified) { - String attrValue = "xmlns:" + Constants.SL11_PREFIX; - qualifiedCertificateElem.setAttributeNS( - XMLNS_NS_URI, - attrValue, - SL11_NS_URI); - x509DataElem.appendChild(qualifiedCertificateElem); - } - if (isPublicAuthority) { - x509DataElem.appendChild(publicAuthorityElem); - if (publicAuthorityID != null) { - codeElem.appendChild(response.createTextNode(publicAuthorityID)); - publicAuthorityElem.appendChild(codeElem); - } - } - signerInfoElem.appendChild(x509DataElem); - root.appendChild(signerInfoElem); - } - - /** - * Add an element containing Code and Info - * subelements. - * - * @param response The response document, in order to create new elements in - * it. - * @param root The root element into which to insert the newly created - * element. - * @param elementName The name of the newly created element. - * @param code The content of the Code subelement. - * @param info The content of the Info subelement. - */ - public static void addCodeInfoElement( - Document response, - Element root, - String elementName, - int code, - NodeList info) { - - Element codeInfoElem = response.createElementNS(MOA_NS_URI, elementName); - Element codeElem = response.createElementNS(MOA_NS_URI, "Code"); - Element infoElem; - int i; - - codeElem.appendChild(response.createTextNode(Integer.toString(code))); - codeInfoElem.appendChild(codeElem); - if (info != null) { - infoElem = response.createElementNS(MOA_NS_URI, "Info"); - - for (i = 0; i < info.getLength(); i++) { - infoElem.appendChild(info.item(i).cloneNode(true)); - } - codeInfoElem.appendChild(infoElem); - } - root.appendChild(codeInfoElem); - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java deleted file mode 100644 index 84f377826..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java +++ /dev/null @@ -1,251 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.StringTokenizer; - -import org.w3c.dom.Element; -import org.w3c.dom.traversal.NodeIterator; - -import at.gv.egovernment.moa.util.Constants; -import at.gv.egovernment.moa.util.DOMUtils; -import at.gv.egovernment.moa.util.XPathUtils; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.api.SPSSFactory; -import at.gv.egovernment.moa.spss.api.common.Base64Transform; -import at.gv.egovernment.moa.spss.api.common.CanonicalizationTransform; -import at.gv.egovernment.moa.spss.api.common.EnvelopedSignatureTransform; -import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform; -import at.gv.egovernment.moa.spss.api.common.Transform; -import at.gv.egovernment.moa.spss.api.common.XPathFilter; -import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform; -import at.gv.egovernment.moa.spss.api.common.XPathTransform; -import at.gv.egovernment.moa.spss.api.common.XSLTTransform; - -/** - * A parser to parse XMLDsig Transform DOM elements into their - * MOA SPSS API representation. - * - * @author Patrick Peck - * @version $Id$ - */ -public class TransformParser { - // - // XPath expressions for selecting information from the DOM tree - // - private static final String DSIG = Constants.DSIG_PREFIX + ":"; - private static final String DSIG_FILTER2 = - Constants.DSIG_FILTER2_PREFIX + ":"; - private static final String XSLT = Constants.XSLT_PREFIX + ":"; - private static final String EC = Constants.DSIG_EC_PREFIX + ":"; - private static final String TRANSFORM_XPATH = DSIG + "Transform"; - private static final String XPATH_XPATH = DSIG + "XPath"; - private static final String XSLT_ELEMENT_XPATH = XSLT + "stylesheet"; - private static final String XPATH2_XPATH = - (DSIG_FILTER2 + "XPath[@Filter=\"intersect\"] | ") - + (DSIG_FILTER2 + "XPath[@Filter=\"subtract\"] | ") - + (DSIG_FILTER2 + "XPath[@Filter=\"union\"]"); - private static final String INCLUSIVE_NAMESPACES_XPATH = - EC + "InclusiveNamespaces"; - - /** - * The SPSSFactory to use for creating new API objects. - */ - private SPSSFactory factory = SPSSFactory.getInstance(); - - /** - * Parse an XMLDsig Transforms DOM element. - * - * @param transformsElem The Transforms DOM element to parse. - * @return A List of Transform API objects - * containing the data from the individual Transform DOM - * elements. - * @throws MOAApplicationException An error occurred parsing the - * Transforms DOM element. - */ - public List parseTransforms(Element transformsElem) - throws MOAApplicationException { - List transforms = new ArrayList(); - NodeIterator transformElems = - XPathUtils.selectNodeIterator(transformsElem, TRANSFORM_XPATH); - Element transformElem; - Transform transform; - - while ((transformElem = (Element) transformElems.nextNode()) != null) { - transform = parseTransform(transformElem); - transforms.add(transform); - } - - return transforms; - } - - /** - * Parse an XMLDsig Transform DOM element. - * - * @param transformElem Transform DOM element to parse. - * @return The Transform API object containing the data - * from the Transform DOM element. - * @throws MOAApplicationException An error occurred parsing the - * Transform DOM element. - */ - public Transform parseTransform(Element transformElem) - throws MOAApplicationException { - - String algorithmUri = transformElem.getAttribute("Algorithm"); - - if (CanonicalizationTransform.CANONICAL_XML.equals(algorithmUri) - || CanonicalizationTransform.CANONICAL_XML_WITH_COMMENTS.equals( - algorithmUri)) { - return factory.createCanonicalizationTransform(algorithmUri); - } else if ( - ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML.equals( - algorithmUri) - || ExclusiveCanonicalizationTransform - .EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS - .equals( - algorithmUri)) { - return parseExclusiveC14nTransform(algorithmUri, transformElem); - } else if (Base64Transform.BASE64_DECODING.equals(algorithmUri)) { - return factory.createBase64Transform(); - } else if ( - EnvelopedSignatureTransform.ENVELOPED_SIGNATURE.equals(algorithmUri)) { - return factory.createEnvelopedSignatureTransform(); - } else if (XPathTransform.XPATH.equals(algorithmUri)) { - return parseXPathTransform(transformElem); - } else if (XPathFilter2Transform.XPATH_FILTER2.equals(algorithmUri)) { - return parseXPathFilter2Transform(transformElem); - } else if (XSLTTransform.XSLT.equals(algorithmUri)) { - return parseXSLTTransform(transformElem); - } else { - throw new MOAApplicationException("1108", new Object[] { algorithmUri }); - } - } - - /** - * Parse an exclusive canonicalization type of transform. - * - * @param algorithmUri The algorithm URI of the canonicalization algorithm. - * @param transformElem The Transform DOM element to parse. - * @return An ExclusiveCanonicalizationTransform API object - * containing the data from the transformElem. - * @throws MOAApplicationException An error occurred parsing the - * transformElem. - */ - private Transform parseExclusiveC14nTransform( - String algorithmUri, - Element transformElem) - throws MOAApplicationException { - - Element inclusiveNamespacesElem = - (Element) XPathUtils.selectSingleNode( - transformElem, - INCLUSIVE_NAMESPACES_XPATH); - - if (inclusiveNamespacesElem == null) { - throw new MOAApplicationException("2217", null); - } else { - StringTokenizer tokenizer = - new StringTokenizer(inclusiveNamespacesElem.getAttribute("PrefixList")); - List inclusiveNamespaces = new ArrayList(); - - while (tokenizer.hasMoreTokens()) { - inclusiveNamespaces.add(tokenizer.nextToken()); - } - - return factory.createExclusiveCanonicalizationTransform( - algorithmUri, - inclusiveNamespaces); - } - } - - /** - * Parse an XPath type of Transform. - * - * @param transformElem The Transform DOM element to parse. - * @return The Transform API object representation of the - * Transform DOM element. - * @throws MOAApplicationException An error occurred parsing the - * Transform DOM element. - */ - private Transform parseXPathTransform(Element transformElem) - throws MOAApplicationException { - Element xPathElem = - (Element) XPathUtils.selectSingleNode(transformElem, XPATH_XPATH); - Map nsDecls; - - if (xPathElem == null) { - throw new MOAApplicationException("2202", null); - } - - nsDecls = DOMUtils.getNamespaceDeclarations(xPathElem); - nsDecls.remove(""); - - return factory.createXPathTransform(DOMUtils.getText(xPathElem), nsDecls); - } - - /** - * Parse an XPathFilter2 type of Transform. - * - * @param transformElem The Transform DOM element to parse. - * @return The Transform API object representation of the - * Transform DOM element. - * @throws MOAApplicationException An error occurred parsing the - * Transform DOM element. - */ - private Transform parseXPathFilter2Transform(Element transformElem) - throws MOAApplicationException { - List filters = new ArrayList(); - NodeIterator iter = - XPathUtils.selectNodeIterator(transformElem, XPATH2_XPATH); - Element filterElem; - - while ((filterElem = (Element) iter.nextNode()) != null) { - String filterAttr = filterElem.getAttribute("Filter"); - String filterType; - String expression; - Map nsDecls; - - if (filterAttr.equals("intersect")) { - filterType = XPathFilter.INTERSECT_TYPE; - } else if (filterAttr.equals("subtract")) { - filterType = XPathFilter.SUBTRACT_TYPE; - } else { - filterType = XPathFilter.UNION_TYPE; - } - - expression = DOMUtils.getText(filterElem); - nsDecls = DOMUtils.getNamespaceDeclarations(filterElem); - nsDecls.remove(""); - filters.add(factory.createXPathFilter(filterType, expression, nsDecls)); - } - if (filters.size() == 0) { - throw new MOAApplicationException("2216", null); - } - - return factory.createXPathFilter2Transform(filters); - } - - /** - * Parse an XSLT type of Transform. - * - * @param transformElem The Transform DOM element to parse. - * @return The Transform API object representation of the - * Transform DOM element. - * @throws MOAApplicationException An error occurred parsing the - * Transform DOM element. - */ - private Transform parseXSLTTransform(Element transformElem) - throws MOAApplicationException { - Element xsltElem = - (Element) XPathUtils.selectSingleNode(transformElem, XSLT_ELEMENT_XPATH); - - if (xsltElem == null) { - throw new MOAApplicationException("2215", null); - } - - return factory.createXSLTTransform(xsltElem); - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java deleted file mode 100644 index 74d14b7cc..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java +++ /dev/null @@ -1,169 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.StringTokenizer; - -import org.w3c.dom.Element; - -import at.gv.egovernment.moa.util.Base64Utils; -import at.gv.egovernment.moa.util.CollectionUtils; -import at.gv.egovernment.moa.util.Constants; -import at.gv.egovernment.moa.util.DOMUtils; -import at.gv.egovernment.moa.util.XPathUtils; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.api.SPSSFactory; -import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent; -import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest; -import at.gv.egovernment.moa.spss.api.common.MetaInfo; - -/** - * A parser to parse VerifyCMSSignatureRequest DOM trees into - * VerifyCMSSignatureRequest API objects. - * - * @author Patrick Peck - * @version $Id$ - */ -public class VerifyCMSSignatureRequestParser { - - // - // XPath expressions for selecting parts of the DOM message - // - private static final String MOA = Constants.MOA_PREFIX + ":"; - private static final String DATE_TIME_XPATH = MOA + "DateTime"; - private static final String CMS_SIGNATURE_XPATH = MOA + "CMSSignature"; - private static final String TRUST_PROFILE_ID_XPATH = MOA + "TrustProfileID"; - private static final String DATA_OBJECT_XPATH = MOA + "DataObject"; - private static final String META_INFO_XPATH = MOA + "MetaInfo"; - private static final String CONTENT_XPATH = MOA + "Content"; - private static final String BASE64_CONTENT_XPATH = MOA + "Base64Content"; - - /** The SPSSFactory for creating new API objects. */ - private SPSSFactory factory = SPSSFactory.getInstance(); - - /** - * Parse a VerifyCMSSignatureRequest DOM element, as defined - * by the MOA schema. - * - * @param requestElem The VerifyCMSSignatureRequest to parse. The - * request must have been successfully parsed against the schema for this - * method to succeed. - * @return A VerifyCMSSignatureRequest API objects containing - * the data from the DOM element. - * @throws MOAApplicationException An error occurred parsing the request. - */ - public VerifyCMSSignatureRequest parse(Element requestElem) - throws MOAApplicationException { - - int[] signatories = parseSignatories(requestElem); - Date dateTime = - RequestParserUtils.parseDateTime(requestElem, DATE_TIME_XPATH); - String cmsSignatureStr = - XPathUtils.getElementValue(requestElem, CMS_SIGNATURE_XPATH, ""); - CMSDataObject dataObject = parseDataObject(requestElem); - String trustProfileID = - XPathUtils.getElementValue(requestElem, TRUST_PROFILE_ID_XPATH, null); - InputStream cmsSignature = - Base64Utils.decodeToStream(cmsSignatureStr, true); - - return factory.createVerifyCMSSignatureRequest( - signatories, - dateTime, - cmsSignature, - dataObject, - trustProfileID); - } - - /** - * Parse the Signatories attribute contained in the - * VerifyCMSSignatureRequest DOM element. - * - * @param requestElem The VerifyCMSSignatureRequest DOM element. - * @return The signatories contained in the given - * VerifyCMSSignatureRequest DOM element. - */ - private int[] parseSignatories(Element requestElem) { - String signatoriesStr = requestElem.getAttribute("Signatories"); - - if ("all".equals(signatoriesStr)) { - return VerifyCMSSignatureRequest.ALL_SIGNATORIES; - } else { - StringTokenizer tokenizer = new StringTokenizer(signatoriesStr); - List signatoriesList = new ArrayList(); - int[] signatories; - - // put the signatories into a List - while (tokenizer.hasMoreTokens()) { - try { - signatoriesList.add(new Integer(tokenizer.nextToken())); - } catch (NumberFormatException e) { - // this cannot occur if the request has been validated - } - } - - // convert the List into an int array - signatories = CollectionUtils.toIntArray(signatoriesList); - - return signatories; - } - } - - /** - * Parse a the DataObject DOM element contained in a given - * VerifyCMSSignatureRequest DOM element. - * - * @param requestElem The VerifyCMSSignatureRequest DOM element - * to parse. - * @return The CMSDataObject API object containing the data - * from the DataObject DOM element. - */ - private CMSDataObject parseDataObject(Element requestElem) { - Element dataObjectElem = - (Element) XPathUtils.selectSingleNode(requestElem, DATA_OBJECT_XPATH); - - if (dataObjectElem != null) { - Element metaInfoElem = - (Element) XPathUtils.selectSingleNode(dataObjectElem, META_INFO_XPATH); - MetaInfo metaInfo = null; - Element contentElem = - (Element) XPathUtils.selectSingleNode(dataObjectElem, CONTENT_XPATH); - CMSContent content = parseContent(contentElem); - - if (metaInfoElem != null) { - metaInfo = RequestParserUtils.parseMetaInfo(metaInfoElem); - } - - return factory.createCMSDataObject(metaInfo, content); - } else { - return null; - } - - } - - /** - * Parse the content contained in a CMSContentBaseType kind of - * DOM element. - * - * @param contentElem The CMSContentBaseType kind of element to - * parse. - * @return A CMSDataObject API object containing the data - * from the given DOM element. - */ - private CMSContent parseContent(Element contentElem) { - Element base64ContentElem = - (Element) XPathUtils.selectSingleNode(contentElem, BASE64_CONTENT_XPATH); - - if (base64ContentElem != null) { - String base64Str = DOMUtils.getText(base64ContentElem); - InputStream binaryContent = Base64Utils.decodeToStream(base64Str, true); - return factory.createCMSContent(binaryContent); - } else { - return factory.createCMSContent( - contentElem.getAttribute("Reference")); - } - } -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java deleted file mode 100644 index 3fc8f223d..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.util.Iterator; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.MOASystemException; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse; -import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement; -import at.gv.egovernment.moa.spss.api.common.CheckResult; -import at.gv.egovernment.moa.spss.api.common.SignerInfo; - -/** - * Convert a VerifyCMSSignatureResponse API object into its - * XML representation, according to the MOA XML schema. - * - * @author Patrick Peck - * @version $Id$ - */ -public class VerifyCMSSignatureResponseBuilder { - /** The XML document containing the response element. */ - private Document responseDoc; - /** The response VerifyCMSSignatureResponse DOM element. */ - private Element responseElem; - - /** - * Create a new VerifyCMSSignatureResponseBuilder: - * - * @throws MOASystemException An error occurred setting up the resulting - * XML document. - */ - public VerifyCMSSignatureResponseBuilder() throws MOASystemException { - responseDoc = - ResponseBuilderUtils.createResponse("VerifyCMSSignatureResponse"); - responseElem = responseDoc.getDocumentElement(); - } - - /** - * Build a document containing a VerifyCMSSignatureResponse - * DOM element being the XML representation of the given - * VerifyCMSSignatureResponse API object. - * - * @param response The VerifyCMSSignatureResponse to convert - * to XML. - * @return A document containing the VerifyCMSSignatureResponse - * DOM element. - * @throws MOAApplicationException An error occurred building the response. - */ - public Document build(VerifyCMSSignatureResponse response) - throws MOAApplicationException { - - Iterator iter; - - for (iter = response.getResponseElements().iterator(); iter.hasNext();) { - VerifyCMSSignatureResponseElement responseElement = - (VerifyCMSSignatureResponseElement) iter.next(); - addResponseElement(responseElement); - } - - return responseDoc; - } - - /** - * Add an element to the response. - * - * @param responseElement The element to add to the response. - * @throws MOAApplicationException An error occurred adding the element. - */ - private void addResponseElement(VerifyCMSSignatureResponseElement responseElement) - throws MOAApplicationException { - - SignerInfo signerInfo = responseElement.getSignerInfo(); - CheckResult signatureCheck = responseElement.getSignatureCheck(); - CheckResult certCheck = responseElement.getCertificateCheck(); - - ResponseBuilderUtils.addSignerInfo( - responseDoc, - responseElem, - signerInfo.getSignerCertificate(), - signerInfo.isQualifiedCertificate(), - signerInfo.isPublicAuthority(), - signerInfo.getPublicAuhtorityID()); - - ResponseBuilderUtils.addCodeInfoElement( - responseDoc, - responseElem, - "SignatureCheck", - signatureCheck.getCode(), - signatureCheck.getInfo()); - - ResponseBuilderUtils.addCodeInfoElement( - responseDoc, - responseElem, - "CertificateCheck", - certCheck.getCode(), - certCheck.getInfo()); - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java deleted file mode 100644 index e736af522..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java +++ /dev/null @@ -1,275 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import org.w3c.dom.Element; -import org.w3c.dom.traversal.NodeIterator; - -import at.gv.egovernment.moa.util.BoolUtils; -import at.gv.egovernment.moa.util.Constants; -import at.gv.egovernment.moa.util.DOMUtils; -import at.gv.egovernment.moa.util.XPathUtils; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.api.SPSSFactory; -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams; -import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest; - -/** - * @author Patrick Peck - * @version $Id$ - */ -public class VerifyXMLSignatureRequestParser { - - // - // XPath expressions for parsing parts of the request - // - private static final String MOA = Constants.MOA_PREFIX + ":"; - private static final String DATE_TIME_XPATH = MOA + "DateTime"; - private static final String RETURN_HASH_INPUT_DATA_XPATH = - MOA + "ReturnHashInputData"; - private static final String TRUST_PROFILE_ID_XPATH = MOA + "TrustProfileID"; - private static final String VERIFY_SIGNATURE_ENVIRONMENT_XPATH = - MOA + "VerifySignatureInfo/" + MOA + "VerifySignatureEnvironment"; - private static final String VERIFY_SIGNATURE_LOCATION_XPATH = - MOA + "VerifySignatureInfo/" + MOA + "VerifySignatureLocation"; - private static final String SUPPLEMENT_PROFILE_XPATH = - MOA + "SupplementProfile | " + MOA + "SupplementProfileID"; - private static final String SIGNATURE_MANIFEST_CHECK_PARAMS_XPATH = - MOA + "SignatureManifestCheckParams"; - private static final String VERIFY_TRANSFORMS_INFO_PROFILE_XPATH = - (MOA + "VerifyTransformsInfoProfile | ") - + (MOA + "VerifyTransformsInfoProfileID"); - private static final String REFERENCE_INFO_XPATH = MOA + "ReferenceInfo"; - - /** The SPSSFactory for creating new API objects. */ - private SPSSFactory factory = SPSSFactory.getInstance(); - - - /** - * Parse a VerifyXMLSignatureRequest DOM element, as defined - * by the MOA schema. - * - * @param requestElem The VerifyXMLSignatureRequest to parse. The - * request must have been successfully parsed against the schema for this - * method to succeed. - * @return A VerifyXMLSignatureRequest API object containing - * the data from the DOM element. - * @throws MOAApplicationException An error occurred parsing the request. - */ - public VerifyXMLSignatureRequest parse(Element requestElem) - throws MOAApplicationException { - - Date dateTime = - RequestParserUtils.parseDateTime(requestElem, DATE_TIME_XPATH); - VerifySignatureInfo verifySignatureInfo = - parseVerifySignatureInfo(requestElem); - List supplementProfiles = parseSupplementProfiles(requestElem); - SignatureManifestCheckParams signatureManifestCheckParams = - parseSignatureManifestCheckParams(requestElem); - boolean returnHashInputData = - XPathUtils.selectSingleNode(requestElem, RETURN_HASH_INPUT_DATA_XPATH) - != null; - String trustProfileID = - XPathUtils.getElementValue(requestElem, TRUST_PROFILE_ID_XPATH, null); - - return factory.createVerifyXMLSignatureRequest( - dateTime, - verifySignatureInfo, - supplementProfiles, - signatureManifestCheckParams, - returnHashInputData, - trustProfileID); - } - - /** - * Parse the VerifySignatureInfo DOM element contained in - * the VerifyXMLSignatureRequest DOM element. - * - * @param requestElem The VerifyXMLSignatureRequest DOM element - * containing the VerifySignatureInfo DOM element. - * @return The VerifySignatureInfo API object containing the - * data from the DOM element. - */ - private VerifySignatureInfo parseVerifySignatureInfo(Element requestElem) { - Element verifySignatureEnvironmentElem = - (Element) XPathUtils.selectSingleNode( - requestElem, - VERIFY_SIGNATURE_ENVIRONMENT_XPATH); - Content verifySignatureEnvironment = - RequestParserUtils.parseContent(verifySignatureEnvironmentElem); - VerifySignatureLocation verifySignatureLocation = - parseVerifySignatureLocation(requestElem); - - return factory.createVerifySignatureInfo( - verifySignatureEnvironment, - verifySignatureLocation); - } - - /** - * Parse the VerifySignatureLocation DOM element contained - * in the given VerifyXMLSignatureRequest DOM element. - * - * @param requestElem The VerifyXMLSignatureRequst DOM element. - * @return The VerifySignatureLocation API object containing the - * data from the DOM element. - */ - private VerifySignatureLocation parseVerifySignatureLocation(Element requestElem) { - Element locationElem = - (Element) XPathUtils.selectSingleNode( - requestElem, - VERIFY_SIGNATURE_LOCATION_XPATH); - String xPathExpression = DOMUtils.getText(locationElem); - Map namespaceDeclarations = DOMUtils.getNamespaceDeclarations(locationElem); - - return factory.createVerifySignatureLocation( - xPathExpression, - namespaceDeclarations); - } - - /** - * Parse the supplement profiles contained in the given - * VerifyXMLSignatureRequest DOM element. - * - * @param requestElem The VerifyXMLSignatureRequest DOM element. - * @return A List of SupplementProfile API objects - * containing the data from the SupplementProfile DOM elements. - */ - private List parseSupplementProfiles(Element requestElem) { - List supplementProfiles = new ArrayList(); - NodeIterator profileElems = - XPathUtils.selectNodeIterator(requestElem, SUPPLEMENT_PROFILE_XPATH); - Element profileElem; - - while ((profileElem = (Element) profileElems.nextNode()) != null) { - SupplementProfile profile; - - if ("SupplementProfile".equals(profileElem.getLocalName())) { - ProfileParser profileParser = new ProfileParser(); - profile = profileParser.parseSupplementProfile(profileElem); - } else { - String profileID = DOMUtils.getText(profileElem); - profile = factory.createSupplementProfile(profileID); - } - supplementProfiles.add(profile); - } - return supplementProfiles; - } - - /** - * Parse the SignatureManifestCheckParams DOM element contained - * in the given VerifyXMLSignatureRequest DOM element. - * @param requestElem The VerifyXMLSignatureRequest DOM element. - * @return The SignatureManifestCheckParams API object containing - * the data from the SignatureManifestCheckParams DOM element. - * @throws MOAApplicationException An error occurred parsing the - * SignatureManifestCheckParams DOM element. - */ - private SignatureManifestCheckParams parseSignatureManifestCheckParams(Element requestElem) - throws MOAApplicationException { - Element paramsElem = - (Element) XPathUtils.selectSingleNode( - requestElem, - SIGNATURE_MANIFEST_CHECK_PARAMS_XPATH); - - if (paramsElem != null) { - String returnReferenceInputDataStr = - paramsElem.getAttribute("ReturnReferenceInputData"); - boolean returnReferencInputData = - BoolUtils.valueOf(returnReferenceInputDataStr); - List referenceInfos = parseReferenceInfos(paramsElem); - - return factory.createSignatureManifestCheckParams( - referenceInfos, - returnReferencInputData); - } else { - return null; - } - } - - /** - * Parse the ReferenceInfo DOM elements contained in a - * SignatureManifestCheckParams DOM element. - * - * @param paramsElem The SignatureManifestCheckParams DOM element - * containing the ReferenceInfo DOM elements. - * @return A List of RefernceInfo API objects - * containing the data from the ReferenceInfo DOM elements. - * @throws MOAApplicationException An error occurred parsing the - * ReferenceInfo DOM elements. - */ - private List parseReferenceInfos(Element paramsElem) - throws MOAApplicationException { - - List referenceInfos = new ArrayList(); - NodeIterator refInfoElems = - XPathUtils.selectNodeIterator(paramsElem, REFERENCE_INFO_XPATH); - Element refInfoElem; - - while ((refInfoElem = (Element) refInfoElems.nextNode()) != null) { - ReferenceInfo referenceInfo = parseReferenceInfo(refInfoElem); - - referenceInfos.add(referenceInfo); - } - - return referenceInfos; - } - - /** - * Parse a ReferenceInfo DOM element. - * - * @param refInfoElem The ReferenceInfo DOM element to parse. - * @return The ReferenceInfo API object containing the data - * from the given ReferenceInfo DOM element. - * @throws MOAApplicationException An error occurred parsing the - * ReferenceInfo DOM element. - */ - private ReferenceInfo parseReferenceInfo(Element refInfoElem) - throws MOAApplicationException { - List profiles = parseVerifyTransformsInfoProfiles(refInfoElem); - return factory.createReferenceInfo(profiles); - } - - /** - * Parse the VerifyTransformsInfoProfile DOM elements contained - * in a ReferenceInfo DOM element. - * - * @param refInfoElem ReferenceInfo DOM element containing - * the VerifyTransformsInfoProfile DOM elements. - * @return A List of VerifyTransformsInfoProfile - * API objects containing the profile data. - * @throws MOAApplicationException An error occurred building the - * VerifyTransformsInfoProfiles. - */ - private List parseVerifyTransformsInfoProfiles(Element refInfoElem) - throws MOAApplicationException { - - List profiles = new ArrayList(); - NodeIterator profileElems = - XPathUtils.selectNodeIterator( - refInfoElem, - VERIFY_TRANSFORMS_INFO_PROFILE_XPATH); - Element profileElem; - - while ((profileElem = (Element) profileElems.nextNode()) != null) { - if ("VerifyTransformsInfoProfile".equals(profileElem.getLocalName())) { - ProfileParser profileParser = new ProfileParser(); - profiles.add( - profileParser.parseVerifyTransformsInfoProfile(profileElem)); - } else { - String profileID = DOMUtils.getText(profileElem); - profiles.add(factory.createVerifyTransformsInfoProfile(profileID)); - } - } - return profiles; - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java deleted file mode 100644 index 56bcf63fa..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java +++ /dev/null @@ -1,300 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlbind; - -import java.io.IOException; -import java.util.Iterator; -import java.util.List; - -import org.w3c.dom.Document; -import org.w3c.dom.DocumentFragment; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import at.gv.egovernment.moa.util.Base64Utils; -import at.gv.egovernment.moa.util.Constants; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.MOASystemException; -import at.gv.egovernment.moa.spss.api.common.Content; -import at.gv.egovernment.moa.spss.api.common.ContentBinary; -import at.gv.egovernment.moa.spss.api.common.ContentXML; -import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult; -import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse; - -/** - * Convert a VerifyXMLSignatureResponse API object into its - * XML representation, according to the MOA XML schema. - * - * @author Patrick Peck - * @version $Id$ - */ -public class VerifyXMLSignatureResponseBuilder { - private static final String MOA_NS_URI = Constants.MOA_NS_URI; - - /** The XML document containing the response element. */ - private Document responseDoc; - /** The response VerifyXMLSignatureResponse DOM element. */ - private Element responseElem; - - /** - * Create a new VerifyXMLSignatureResponseBuilder: - * - * @throws MOASystemException An error occurred setting up the resulting - * XML document. - */ - public VerifyXMLSignatureResponseBuilder() throws MOASystemException { - responseDoc = - ResponseBuilderUtils.createResponse("VerifyXMLSignatureResponse"); - responseElem = responseDoc.getDocumentElement(); - } - - /** - * Build a document containing a VerifyXMLSignatureResponse - * DOM element being the XML representation of the given - * VerifyXMLSignatureResponse API object. - * - * @param response The VerifyXMLSignatureResponse to convert - * to XML. - * @return A document containing the VerifyXMLSignatureResponse - * DOM element. - * @throws MOAApplicationException An error occurred building the response. - */ - public Document build(VerifyXMLSignatureResponse response) - throws MOAApplicationException { - - Iterator iter; - List responseData; - - // add the SignerInfo - ResponseBuilderUtils.addSignerInfo( - responseDoc, - responseElem, - response.getSignerInfo().getSignerCertificate(), - response.getSignerInfo().isQualifiedCertificate(), - response.getSignerInfo().isPublicAuthority(), - response.getSignerInfo().getPublicAuhtorityID()); - - // add HashInputData elements - responseData = response.getHashInputDatas(); - if (responseData != null && !responseData.isEmpty()) { - for (iter = responseData.iterator(); iter.hasNext();) { - Content content = (Content) iter.next(); - addContent("HashInputData", content); - } - } - - // add ReferenceInputData elements - responseData = response.getReferenceInputDatas(); - if (responseData != null && !responseData.isEmpty()) { - for (iter = responseData.iterator(); iter.hasNext();) { - Content content = (Content) iter.next(); - addContent("ReferenceInputData", content); - } - } - - // add the SignatureCheck - addReferencesCheckResult("SignatureCheck", response.getSignatureCheck()); - - // add the SignatureManifestCheck - if (response.getSignatureManifestCheck() != null) { - addReferencesCheckResult( - "SignatureManifestCheck", - response.getSignatureManifestCheck()); - } - - // add the XMLDsigManifestChecks - responseData = response.getXMLDsigManifestChecks(); - if (responseData != null && !responseData.isEmpty()) { - for (iter = responseData.iterator(); iter.hasNext();) { - ManifestRefsCheckResult checkResult = - (ManifestRefsCheckResult) iter.next(); - addManifestRefsCheckResult("XMLDSIGManifestCheck", checkResult); - } - } - - // add the CertificateCheck - ResponseBuilderUtils.addCodeInfoElement( - responseDoc, - responseElem, - "CertificateCheck", - response.getCertificateCheck().getCode(), - response.getCertificateCheck().getInfo()); - - return responseDoc; - } - - /** - * Add an element of type ContentBaseType to the response. - * - * @param elementName The name of the element. - * @param content The Content to add. Based on the type of - * the Content, either a Base64Content element - * or a XMLContent subelement will be added. A - * ContentBinary of type BinaryDataObject will be - * added as a Base64Content child element. - * ContentXML will be added as XMLContent child - * element. - * @throws MOAApplicationException An error occurred adding the content. - */ - private void addContent(String elementName, Content content) - throws MOAApplicationException { - - Element contentElem = responseDoc.createElementNS(MOA_NS_URI, elementName); - - switch (content.getContentType()) { - case Content.XML_CONTENT : - ContentXML contentXml = (ContentXML) content; - NodeList nodes = contentXml.getXMLContent(); - Element xmlElem; - int i; - - xmlElem = responseDoc.createElementNS(MOA_NS_URI, "XMLContent"); - //xmlElem.setAttributeNS(XML_NS_URI, "xml:space", "preserve"); - xmlElem.setAttribute("xml:space", "preserve"); - - for (i = 0; i < nodes.getLength(); i++) { - xmlElem.appendChild(responseDoc.importNode(nodes.item(i), true)); - } - contentElem.appendChild(xmlElem); - responseElem.appendChild(contentElem); - break; - case Content.BINARY_CONTENT : - Element binaryElem = - responseDoc.createElementNS(MOA_NS_URI, "Base64Content"); - ContentBinary contentBinary = (ContentBinary) content; - String base64Str; - - try { - base64Str = Base64Utils.encode(contentBinary.getBinaryContent()); - } catch (IOException e) { - throw new MOAApplicationException("2200", null, e); - } - binaryElem.appendChild(responseDoc.createTextNode(base64Str)); - contentElem.appendChild(binaryElem); - responseElem.appendChild(contentElem); - break; - } - } - - /** - * Add a ReferencesCheckResult to the response. - * - * @param elementName The DOM element name to use. - * @param checkResult The ReferencesCheckResult to add. - */ - private void addReferencesCheckResult( - String elementName, - ReferencesCheckResult checkResult) { - - NodeList info = null; - - if (checkResult.getInfo() != null) { - DocumentFragment fragment = responseDoc.createDocumentFragment(); - NodeList anyOtherInfo = checkResult.getInfo().getAnyOtherInfo(); - int[] failedReferences = checkResult.getInfo().getFailedReferences(); - - if (anyOtherInfo != null) { - addAnyOtherInfo(fragment, checkResult.getInfo().getAnyOtherInfo()); - } - - if (failedReferences != null) { - addFailedReferences(fragment, failedReferences); - } - - info = fragment.getChildNodes(); - } - - ResponseBuilderUtils.addCodeInfoElement( - responseDoc, - responseElem, - elementName, - checkResult.getCode(), - info); - } - - - /** - * Add a ManifestRefsCheckResult to the response. - * - * @param elementName The DOM element name to use. - * @param checkResult The ManifestRefsCheckResult to add. - */ - private void addManifestRefsCheckResult( - String elementName, - ManifestRefsCheckResult checkResult) { - - DocumentFragment fragment = responseDoc.createDocumentFragment(); - NodeList anyOtherInfo = checkResult.getInfo().getAnyOtherInfo(); - int[] failedReferences = checkResult.getInfo().getFailedReferences(); - Element referringSigRefElem; - String referringSigRefStr; - - // add any other elements - if (anyOtherInfo != null) { - addAnyOtherInfo(fragment, checkResult.getInfo().getAnyOtherInfo()); - } - - // add the failed references - if (failedReferences != null) { - addFailedReferences(fragment, failedReferences); - } - - // add the ReferringSigReference - referringSigRefElem = - responseDoc.createElementNS(MOA_NS_URI, "ReferringSigReference"); - referringSigRefStr = - Integer.toString(checkResult.getInfo().getReferringSignatureReference()); - referringSigRefElem.appendChild( - responseDoc.createTextNode(referringSigRefStr)); - fragment.appendChild(referringSigRefElem); - - // add XMLDSIGManifestCheckResult to the response - ResponseBuilderUtils.addCodeInfoElement( - responseDoc, - responseElem, - elementName, - checkResult.getCode(), - fragment.getChildNodes()); - } - - /** - * Add arbitrary XML content to a DOM DocumentFragment. - * - * @param fragment The fragment to add the XML content to. - * @param anyOtherInfo The XML content to add. - */ - private void addAnyOtherInfo( - DocumentFragment fragment, - NodeList anyOtherInfo) { - - int i; - - for (i = 0; i < anyOtherInfo.getLength(); i++) { - fragment.appendChild(responseDoc.importNode(anyOtherInfo.item(i), true)); - } - } - - /** - * Add the failed references as FailedReference DOM elements to - * the fragment. - * - * @param fragment The DOM document fragment to add the - * FailedReference elements to. - * @param failedReferences The indexes of the failed references. - */ - private void addFailedReferences( - DocumentFragment fragment, - int[] failedReferences) { - Element failedReferenceElem; - int i; - - for (i = 0; i < failedReferences.length; i++) { - failedReferenceElem = - responseDoc.createElementNS(MOA_NS_URI, "FailedReference"); - failedReferenceElem.appendChild( - responseDoc.createTextNode(Integer.toString(failedReferences[i]))); - fragment.appendChild(failedReferenceElem); - } - } - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java deleted file mode 100644 index 425c410ad..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java +++ /dev/null @@ -1,30 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -/** - * Base class for signature environment profile data used in XML signature - * creation. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface CreateSignatureEnvironmentProfile { - /** - * Indicates that the profile data is given explicitly. - */ - public static int EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE = 0; - /** - * Indicates that the profile data is stored in the configuration and resolved - * using an ID. - */ - public static int ID_CREATESIGNATUREENVIRONMENTPROFILE = 1; - - /** - * Gets the type of this object. - * - * @return The type of CreateSignatureEnvironmentProfile denoted - * by this object. Either - * EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE or - * ID_CREATESIGNATUREENVIRONMENTPROFILE. - */ - public int getCreateSignatureEnvironmentProfileType(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java deleted file mode 100644 index 6aebd102b..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java +++ /dev/null @@ -1,30 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import java.util.List; - -/** - * A CreateSignatureEnvironmentProfile containing the profile - * data explicitly. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface CreateSignatureEnvironmentProfileExplicit - extends CreateSignatureEnvironmentProfile { - - /** - * Gets the location and index of where to insert the signature into the - * signature environment. - * - * @return The location and index of the signature in the signature - * environment. - */ - public CreateSignatureLocation getCreateSignatureLocation(); - /** - * Gets the supplemental information. - * - * @return The supplemental information. - */ - public List getSupplements(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java deleted file mode 100644 index 1c0d87adc..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java +++ /dev/null @@ -1,20 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -/** - * A CreateSignatureEnvironmentProfile containing a profile ID - * pointing to locally stored profile data. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface CreateSignatureEnvironmentProfileID - extends CreateSignatureEnvironmentProfile { - - /** - * Gets the profile ID. - * - * @return The profile ID. - */ - public String getCreateSignatureEnvironmentProfileID(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java deleted file mode 100644 index 5ceae4d0a..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import at.gv.egovernment.moa.spss.api.common.Content; - -/** - * Encapsulates a signature object used during signature creation. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CreateSignatureInfo { - /** - * Gets the XML structure where the signature will be inserted. - * - * @return The XML structure where the signature will be inserted. - */ - public Content getCreateSignatureEnvironment(); - /** - * Gets the supplemental data for the signature environment. - * - * @return The supplemental data for the signature envoronment. - */ - public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java deleted file mode 100644 index 81374ceaa..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java +++ /dev/null @@ -1,23 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import at.gv.egovernment.moa.spss.api.common.ElementSelector; - -/** - * Specifies where to insert the newly created signature. - * - * An XPath expression is used to select the signature parent element. An - * additional index specifies the node index after which to insert the - * signature into the parent element. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface CreateSignatureLocation extends ElementSelector { - /** - * Gets the node index, after which the signature will be inserted into the - * parent elemen. - * - * @return The index of the node after which the signature will be inserted. - */ - public int getIndex(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java deleted file mode 100644 index 94152434e..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java +++ /dev/null @@ -1,27 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import java.util.List; - -import at.gv.egovernment.moa.spss.api.common.MetaInfo; - -/** - * Encapsulates information used for the transformation of the data object. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CreateTransformsInfo { - /** - * Gets the XMLDSig transforms. - * - * @return A List of Transform objects. - */ - public List getTransforms(); - /** - * Gets meta information about the data resulting from the transformation. - * - * @return Meta information about the resulting data. - */ - public MetaInfo getFinalDataMetaInfo(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java deleted file mode 100644 index 40acfd317..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -/** - * Base class for transformation informations used in signature creation. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CreateTransformsInfoProfile { - /** - * Indicates transformation information given explicitly. - */ - public static final int EXPLICIT_CREATETRANSFORMSINFOPROFILE = 0; - /** - * Indicates transformation information given as an ID. - */ - public static final int ID_CREATETRANSFORMSINFOPROFILE = 1; - - /** - * Gets the type of profile information this object contains. - * - * @return The type of transformation information, either - * EXPLICIT_CREATETRANSFORMSINFOPROFILE or - * ID_CREATETRANSFORMSINFOPROFILE. - */ - public int getCreateTransformsInfoProfileType(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java deleted file mode 100644 index aeb74445f..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java +++ /dev/null @@ -1,26 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import java.util.List; - -/** - * Encapsulates explicit transformation informations. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CreateTransformsInfoProfileExplicit - extends CreateTransformsInfoProfile { - /** - * Gets the transformation information of the data object. - * - * @return Transformation information of the data object. - */ - public CreateTransformsInfo getCreateTransformsInfo(); - /** - * Gets the supplemental information. - * - * @return The supplemental information. - */ - public List getSupplements(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java deleted file mode 100644 index 3631ead29..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java +++ /dev/null @@ -1,18 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -/** - * Encapsulates transformation information given via an identifier. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CreateTransformsInfoProfileID - extends CreateTransformsInfoProfile { - /** - * Gets the ID of the transformation. - * - * @return The transformation profile ID. - */ - public String getCreateTransformsInfoProfileID(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java deleted file mode 100644 index b8157fdfb..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java +++ /dev/null @@ -1,26 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import java.util.List; - - -/** - * Object that encapsulates a request to create an XML Signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CreateXMLSignatureRequest { - /** - * Gets the identifier for the keys to be used for the signature. - * - * @return The identifier for the keys to be used. - */ - public String getKeyIdentifier(); - /** - * Gets the information of the singleSignatureInfo elements. - * - * @return The information of singleSignatureInfo elements. - */ - public List getSingleSignatureInfos(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java deleted file mode 100644 index 6bf54e6a5..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java +++ /dev/null @@ -1,20 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import java.util.List; - -/** - * Object that encapsulates the response on to a - * CreateXMLSignatureRequest to create an XML signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CreateXMLSignatureResponse { - /** - * Gets the response elements. - * - * @return The response elements. - */ - public List getResponseElements(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java deleted file mode 100644 index 2162d82fd..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java +++ /dev/null @@ -1,29 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -/** - * Base class for SignatureEnvironmentResponse and - * ErrorResponse elements in a - * CreateXMLSignatureResponse. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface CreateXMLSignatureResponseElement { - /** - * Indicates that this object contains a SignatureEnvironment. - */ - public static final int SIGNATURE_ENVIRONMENT_RESPONSE = 0; - /** - * Indicates that this objet contains an ErrorResponse. - */ - public static final int ERROR_RESPONSE = 1; - - /** - * Gets the type of response object. - * - * @return The type of response object, either - * SIGNATURE_ENVIRONMENT_RESPONSE or ERROR_RESPONSE. - */ - public int getResponseType(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java deleted file mode 100644 index 43d49c587..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java +++ /dev/null @@ -1,48 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import at.gv.egovernment.moa.spss.api.common.Content; - -/** - * Encapsulates information required to create a single signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface DataObjectInfo { - /** - * Indicates that a detached signature will be created. - */ - public static final String STRUCTURE_DETACHED = "detached"; - /** - * Indicates that an enveloping signature will be created. - */ - public static final String STRUCTURE_ENVELOPING = "enveloping"; - - /** - * Gets the structure of the signature. - * - * @return The structure of the signature. - */ - public String getStructure(); - /** - * Checks whether a refercence will be placed in the signature itself or - * in the manifest. - * - * @return true if a reference will be placed in the manifest, - * false if it will be placed in the signature. - */ - public boolean isChildOfManifest(); - /** - * Gets information related to a single data object. - * - * @return Information related to a single data object. - */ - public Content getDataObject(); - /** - * Gets information for the transformation of the data object. - * - * @return The transformation information. - */ - public CreateTransformsInfoProfile getCreateTransformsInfoProfile(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java deleted file mode 100644 index 30fa4fb52..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java +++ /dev/null @@ -1,24 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - - -/** - * Object containing detailed error information. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface ErrorResponse extends CreateXMLSignatureResponseElement { - /** - * Gets the error code. - * - * @return The error code. - */ - public int getErrorCode(); - /** - * Gets verbose error information. - * - * @return Verbose error information. - */ - public String getInfo(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java deleted file mode 100644 index 449349a68..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java +++ /dev/null @@ -1,20 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import org.w3c.dom.Element; - -/** - * Contains the signature if the signature creation was successful. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface SignatureEnvironmentResponse - extends CreateXMLSignatureResponseElement { - /** - * Gets the XML structure which contains the signature. - * - * @return A general XML structure containing the signature. - */ - public Element getSignatureEnvironment(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java deleted file mode 100644 index 9c74c5157..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java +++ /dev/null @@ -1,32 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlsign; - -import java.util.List; - -/** - * Encapsulates data to create a single signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface SingleSignatureInfo { - /** - * Gets the dataObjectInfo information. - * - * @return The dataObjectInfo information. - */ - public List getDataObjectInfos(); - /** - * Gets the signature object. - * - * @return The signature object used during signature creation. - */ - public CreateSignatureInfo getCreateSignatureInfo(); - /** - * Check whether a Security Layer conform signature manifest will be created. - * - * @return true, if a Security Layer conform signature manifest - * will be created, false otherwise. - */ - public boolean isSecurityLayerConform(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java deleted file mode 100644 index 1984ba349..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java +++ /dev/null @@ -1,24 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - - -/** - * Contains the results of manifest checks according to XMLDsig. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface ManifestRefsCheckResult { - /** - * Gets the check code. - * - * @return A numerical representation of the result of the manifest check. - */ - public int getCode(); - /** - * Gets the reference to the manifest. - * - * @return The reference to the manifest. - */ - public ManifestRefsCheckResultInfo getInfo(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java deleted file mode 100644 index 258840162..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java +++ /dev/null @@ -1,19 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - - -/** - * Encapsulates information referring to the manifest of the check. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface ManifestRefsCheckResultInfo extends ReferencesCheckResultInfo { - /** - * Gets the position of the signature reference containing the - * reference to the manifest being described by this object. - * - * @return The position of the signature reference. - */ - public int getReferringSignatureReference(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java deleted file mode 100644 index 4c644583b..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java +++ /dev/null @@ -1,19 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import java.util.List; - -/** - * Contains transformation parameters which are locally available. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface ReferenceInfo { - /** - * Gets the transformation info. - * - * @return The transformation info. - */ - public List getVerifyTransformsInfoProfiles(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java deleted file mode 100644 index 7b5488613..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java +++ /dev/null @@ -1,23 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -/** - * Contains information about the verification status of references contained - * in the signature. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface ReferencesCheckResult { - /** - * Gets the check code. - * - * @return A numerical representation of the result of the reference check. - */ - public int getCode(); - /** - * Gets the additional information about the result. - * - * @return Additional information about the result. - */ - public ReferencesCheckResultInfo getInfo(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java deleted file mode 100644 index be21b61c2..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import org.w3c.dom.NodeList; - -/** - * Additional information contained in a ReferencesCheckResult. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface ReferencesCheckResultInfo { - /** - * Gets the additional info of the failed dsig:reference element. - * - * @return The info elements. - */ - public NodeList getAnyOtherInfo(); - /** - * Gets the positions of the failed signature references containing the - * references to the manifests being described by this object. - * - * @return The positions of the failed signature references. - */ - public int[] getFailedReferences(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java deleted file mode 100644 index 8f0efacf3..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java +++ /dev/null @@ -1,26 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import java.util.List; - -/** - * Contains parameters used to check the signature manifest. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface SignatureManifestCheckParams { - /** - * Gets the referential information. - * - * @return The referential information. - */ - public List getReferenceInfos(); - /** - * Gets information on whether signature source data should be returned. - * - * @return true, if signature source data should be returned, - * otherwise false. - */ - public boolean getReturnReferenceInputData(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java deleted file mode 100644 index 569e691ca..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -/** - * Base class for supplementary information. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface SupplementProfile { - /** - * Indicates that this object contains explicit supplementary information. - */ - public static final int EXPLICIT_SUPPLEMENTPROFILE = 0; - /** - * Indicates that this object contains a profile id where supplementary - * information can be found. - */ - public static final int ID_SUPPLEMENTPROFILE = 1; - - /** - * Gets the type of supplementary information contained in this object. - * - * @return The type of supplementary information contained in this object, - * either EXPLICIT_SUPPLEMENT or ID_SUPPLEMENT. - */ - public int getSupplementProfileType(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java deleted file mode 100644 index 7dd37a2d1..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java +++ /dev/null @@ -1,19 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; - -/** - * Encapsulates explicit supplementary information. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface SupplementProfileExplicit extends SupplementProfile { - /** - * Gets the supplemental object. - * - * @return The supplemental object. - */ - public XMLDataObjectAssociation getSupplementProfile(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java deleted file mode 100644 index 5b5083be9..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java +++ /dev/null @@ -1,18 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -/** - * Encapsulates supplementary information stored in a profile. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface SupplementProfileID extends SupplementProfile { - /** - * Gets the id of the profile where the supplementary information can be - * found. - * - * @return The profile id. - */ - public String getSupplementProfileID(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java deleted file mode 100644 index 3e173e0cd..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java +++ /dev/null @@ -1,40 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -/** - * Object encapsulating transform parameters either as a URI, binary or - * hashed. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface TransformParameter { - /** - * Indicates that this object contains a transform parameter given as - * a URI. - */ - public static final int URI_TRANSFORMPARAMETER = 0; - /** - * Indicates that this object contains binary transform parameter. - */ - public static final int BINARY_TRANSFORMPARAMETER = 1; - /** - * Indicatest that this object contains a binary hash of the transform - * parameter. - */ - public static final int HASH_TRANSFORMPARAMETER = 2; - - /** - * Gets the type of transform parameter contained in this object. - * - * @return The type of transform parameter, being one of - * URI_TRANSFORMPARAMETER, BINARY_TRANSFORMPARAMETER - * or HASH_TRANSFORMPARAMETER. - */ - public int getTransformParameterType(); - /** - * Gets the transform parameter URI. - * - * @return The transform parameter URI. - */ - public String getURI();} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java deleted file mode 100644 index 600227dfd..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java +++ /dev/null @@ -1,21 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import java.io.InputStream; - -/** - * Encapsulates a binary transform parameter. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface TransformParameterBinary extends TransformParameter { - /** - * Gets the binary transform parameter. - * - * @return An InputStream from which the binary content can - * be read. - */ - public InputStream getBinaryContent(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java deleted file mode 100644 index ec45ea4f4..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java +++ /dev/null @@ -1,26 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - - -/** - * Contains a hash of the transform parameter. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface TransformParameterHash extends TransformParameter { - /** - * Gets the method used for calculating the digest value. - * - * @return The digest method. - */ - public String getDigestMethod(); - /** - * Gets the binary hash of the transform parameter. - * - * @return A binary representation of the hash. - */ - public byte[] getDigestValue(); - - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java deleted file mode 100644 index 4a6f0a58f..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java +++ /dev/null @@ -1,12 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -/** - * Encapsulates a transform parameter given as a URI. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface TransformParameterURI extends TransformParameter { - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java deleted file mode 100644 index 386651c47..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java +++ /dev/null @@ -1,27 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import at.gv.egovernment.moa.spss.api.common.Content; - -/** - * Encapsulates a signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifySignatureInfo { - /** - * Gets the content of the VerifySignatureEnvironment element. - * - * @return A MOAElement containing the - * VerifySignatureEnvironment in a DOM-like structure. - */ - public Content getVerifySignatureEnvironment(); - /** - * Gets the location of the signature. - * - * @return The location of the signature within the signature environment. - */ - public VerifySignatureLocation getVerifySignatureLocation(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java deleted file mode 100644 index f05e3e889..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java +++ /dev/null @@ -1,13 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import at.gv.egovernment.moa.spss.api.common.ElementSelector; - -/** - * Specifies where to find the signature to be verified. - * - * @author Patrick Peck - * @version $Id$ - */ -public interface VerifySignatureLocation extends ElementSelector { - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java deleted file mode 100644 index 909fc58a2..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -/** - * Object for explicitly specifying a transformation path. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifyTransformsInfoProfile { - /** - * Indicates that this object contains the transformation path explicitly. - */ - public static final int EXPLICIT_VERIFYTRANSFORMSINFOPROFILE = 0; - /** - * Indicatest that this object contains a transformation info id. - */ - public static final int ID_VERIFYTRANSFORMSINFOPROFILE = 1; - - /** - * Gets the type of transformation information contained in this object. - * - * @return The type of transformation information, either - * EXPLICIT_VERIFYTRANSFORMSINFOPROFILE or - * ID_VERIFYTRANSFORMSINFOPROFILE. - */ - public int getVerifyTransformsInfoProfileType(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java deleted file mode 100644 index ff19683da..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java +++ /dev/null @@ -1,25 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import java.util.List; - -/** - * Encapsulates explicit transformation information. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifyTransformsInfoProfileExplicit extends VerifyTransformsInfoProfile { - /** - * Gets the XMLDSig transforms element. - * - * @return The List of Transforms. - */ - public List getTransforms(); - /** - * Gets the transformation parameters. - * - * @return The transformation parameters. - */ - public List getTransformParameters(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java deleted file mode 100644 index 0df3664da..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java +++ /dev/null @@ -1,18 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -/** - * Encapsulates transformation info id for signature verification. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifyTransformsInfoProfileID extends VerifyTransformsInfoProfile { - /** - * Gets the identifier referencing the transformation info. - * - * @return The identifier referencing the transformation info. - */ - public String getVerifyTransformsInfoProfileID(); - -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java deleted file mode 100644 index eb71f500b..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import java.util.Date; -import java.util.List; - - -/** - * Object that encapsulates a request to verify an XML signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifyXMLSignatureRequest { - /** - * Gets the date and time for which the signature verification has to - * be performed. - * - * @return Date and time for which the signature verification has - * to be performed. - */ - public Date getDateTime(); - /** - * Gets the signature to be verified. - * - * @return The signature to be verified. - */ - public VerifySignatureInfo getSignatureInfo(); - /** - * Gets the supplemental information. - * - * @return The supplemental information. - */ - public List getSupplementProfiles(); - /** - * Gets parameters for Security Layer signature verification. - * - * @return Parameters for Security Layer signature verification. - */ - public SignatureManifestCheckParams getSignatureManifestCheckParams(); - /** - * Checks, whether actually signed data shall be returned. - * - * @return true, if signed data will be returned, - * otherwise false. - */ - public boolean getReturnHashInputData(); - /** - * Gets the profile id of the set of trusted certificates to be used for - * signature verification. - * - * @return The id of the trusted certificates. - */ - public String getTrustProfileId(); -} diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java b/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java deleted file mode 100644 index 14ac71e67..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java +++ /dev/null @@ -1,60 +0,0 @@ -package at.gv.egovernment.moa.spss.api.xmlverify; - -import java.util.List; - -import at.gv.egovernment.moa.spss.api.common.CheckResult; -import at.gv.egovernment.moa.spss.api.common.SignerInfo; - -/** - * Object that encapsulates the response on a request to verify an XML - * signature. - * - * @author Patrick Peck - * @author Stephan Grill - * @version $Id$ - */ -public interface VerifyXMLSignatureResponse { - /** - * Gets a SignerInfo element according to XMLDSig. - * - * @return A SignerInfo element according to XMLDSig. - */ - public SignerInfo getSignerInfo(); - /** - * Gets datas signed by the signatory. - * - * @return The signed datas. - */ - public List getHashInputDatas(); - /** - * Gets source datas elements. - * - * @return The source datas elements. - */ - public List getReferenceInputDatas(); - /** - * Gets the result of the signature verification. - * - * @return The result of the signature verification. - */ - public ReferencesCheckResult getSignatureCheck(); - /** - * Gets the result of the signature manifest verification. - * - * @return The result of the signature manifest verification. - */ - public ReferencesCheckResult getSignatureManifestCheck(); - /** - * Gets XMLDSigManifestCheck elements. - * - * @return The XMLDSigManifestCheck elements. - */ - public List getXMLDsigManifestChecks(); - /** - * Gets the result of the certification verification. - * - * @return The result of the certificate verification. - */ - public CheckResult getCertificateCheck(); - -} -- cgit v1.2.3