From e1535be7c97e86e40e04258cbdaf47f60e6292bf Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 7 Aug 2017 16:30:58 +0200 Subject: add PAdES conformity flag to CAdES SOAP interface. Info: additional work is required when IAIK-MOA is updated --- .../at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java | 3 ++- .../moa/spss/api/impl/SingleSignatureInfoCMSImpl.java | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java index ea8d295..b9fad4f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java @@ -124,10 +124,11 @@ public class SPSSFactoryImpl extends SPSSFactory { } public at.gv.egovernment.moa.spss.api.cmssign.SingleSignatureInfo createSingleSignatureInfoCMS( - at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo dataObjectInfo, boolean securityLayerConform) { + at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo dataObjectInfo, boolean securityLayerConform, boolean isPAdESConform) { SingleSignatureInfoCMSImpl singleSignatureInfo = new SingleSignatureInfoCMSImpl(); singleSignatureInfo.setDataObjectInfo(dataObjectInfo); singleSignatureInfo.setSecurityLayerConform(securityLayerConform); + singleSignatureInfo.setPAdESConform(isPAdESConform); return singleSignatureInfo; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoCMSImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoCMSImpl.java index cb36515..c8558dc 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoCMSImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoCMSImpl.java @@ -40,6 +40,7 @@ public class SingleSignatureInfoCMSImpl implements SingleSignatureInfo { private boolean securityLayerConform = true; + private boolean padesConform = false; public void setDataObjectInfo(DataObjectInfo dataObjectInfo) { this.dataObjectInfo = dataObjectInfo; @@ -49,9 +50,15 @@ public class SingleSignatureInfoCMSImpl implements SingleSignatureInfo { return dataObjectInfo; } + public boolean isPAdESConform() { + return padesConform; + } + public void setPAdESConform(boolean padesConform) { + this.padesConform = padesConform; + } - public void setSecurityLayerConform(boolean securityLayerConform) { +public void setSecurityLayerConform(boolean securityLayerConform) { this.securityLayerConform = securityLayerConform; } -- cgit v1.2.3 From 00e4e0cbaf7fe6b2ecb08011995f00e503981911 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 13 Feb 2018 11:27:02 +0100 Subject: add infos about signature and hash algorithms into responses --- .../egovernment/moa/spss/api/impl/InputDataBinaryImpl.java | 12 +++++++++++- .../gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java | 12 +++++++++++- .../gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java | 6 ++++-- .../api/impl/VerifyCMSSignatureResponseElementImpl.java | 13 +++++++++++++ .../moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java | 11 +++++++++++ 5 files changed, 50 insertions(+), 4 deletions(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java index 27f6f85..4b5659e 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java @@ -62,6 +62,8 @@ public class InputDataBinaryImpl implements ContentBinary, InputData */ protected int referringReferenceNumber_; + protected String hashAlg = null; + /** * Creates a new instance. * @@ -70,14 +72,17 @@ public class InputDataBinaryImpl implements ContentBinary, InputData * @param partOf see {@link InputData} * * @param referringReferenceNumber see {@link InputData} + * + * @param hashAlg see {@link InputData} */ - public InputDataBinaryImpl(Content wrapped, String partOf, int referringReferenceNumber) throws MOARuntimeException + public InputDataBinaryImpl(Content wrapped, String partOf, int referringReferenceNumber, String hashAlg) throws MOARuntimeException { if (wrapped.getContentType() != Content.BINARY_CONTENT) throw new MOARuntimeException("9901", null); wrapped_ = (ContentBinary) wrapped; partOf_ = partOf; referringReferenceNumber_ = referringReferenceNumber; + this.hashAlg = hashAlg; } /** @@ -120,4 +125,9 @@ public class InputDataBinaryImpl implements ContentBinary, InputData return referringReferenceNumber_; } +@Override +public String getHashAlgorithm() { + return this.hashAlg; +} + } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java index 432e1a2..e89976e 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java @@ -62,6 +62,8 @@ public class InputDataXMLImpl implements ContentXML, InputData */ protected int referringReferenceNumber_; + protected String hashAlg = null; + /** * Creates a new instance. * @@ -70,14 +72,17 @@ public class InputDataXMLImpl implements ContentXML, InputData * @param partOf see {@link InputData} * * @param referringReferenceNumber see {@link InputData} + * + * @param hashAlg see {@link InputData} */ - public InputDataXMLImpl(Content wrapped, String partOf, int referringReferenceNumber) + public InputDataXMLImpl(Content wrapped, String partOf, int referringReferenceNumber, String hashAlg) { if (wrapped.getContentType() != Content.XML_CONTENT) throw new MOARuntimeException("9901", null); wrapped_ = (ContentXML) wrapped; partOf_ = partOf; referringReferenceNumber_ = referringReferenceNumber; + this.hashAlg = hashAlg; } /** @@ -120,4 +125,9 @@ public class InputDataXMLImpl implements ContentXML, InputData return referringReferenceNumber_; } +@Override +public String getHashAlgorithm() { + return this.hashAlg; +} + } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java index b9fad4f..d743f16 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java @@ -283,13 +283,14 @@ public class SPSSFactoryImpl extends SPSSFactory { public VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement(SignerInfo signerInfo, CheckResult signatureCheck, CheckResult certificateCheck, List adesResult, - ExtendedCertificateCheckResult extendedCertificateCheckResult) { + ExtendedCertificateCheckResult extendedCertificateCheckResult, String usedAlgorithm) { VerifyCMSSignatureResponseElementImpl verifyCMSSignatureResponseElement = new VerifyCMSSignatureResponseElementImpl(); verifyCMSSignatureResponseElement.setSignerInfo(signerInfo); verifyCMSSignatureResponseElement.setSignatureCheck(signatureCheck); verifyCMSSignatureResponseElement.setCertificateCheck(certificateCheck); verifyCMSSignatureResponseElement.setAdESFormResults(adesResult); verifyCMSSignatureResponseElement.setExtendedCertificateCheck(extendedCertificateCheckResult); + verifyCMSSignatureResponseElement.setSignatureAlgorithm(usedAlgorithm); return verifyCMSSignatureResponseElement; } @@ -380,11 +381,12 @@ public class SPSSFactoryImpl extends SPSSFactory { public VerifyXMLSignatureResponse createVerifyXMLSignatureResponse(SignerInfo signerInfo, List hashInputDatas, List referenceInputDatas, ReferencesCheckResult signatureCheck, ReferencesCheckResult signatureManifestCheck, List xmlDsigManifestChecks, CheckResult certificateCheck, - List adesFormResults, ExtendedCertificateCheckResult extCheckResult) { + List adesFormResults, ExtendedCertificateCheckResult extCheckResult, String signatureAlgorithm) { VerifyXMLSignatureResponseImpl verifyXMLSignatureResponse = new VerifyXMLSignatureResponseImpl(); verifyXMLSignatureResponse.setSignerInfo(signerInfo); verifyXMLSignatureResponse.setHashInputDatas(hashInputDatas); verifyXMLSignatureResponse.setReferenceInputDatas(referenceInputDatas); + verifyXMLSignatureResponse.setSignatureAlgorithm(signatureAlgorithm); verifyXMLSignatureResponse.setSignatureCheck(signatureCheck); verifyXMLSignatureResponse.setSignatureManifestCheck(signatureManifestCheck); verifyXMLSignatureResponse.setXMLDsigManifestChecks(xmlDsigManifestChecks); diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java index 9b7881c..1d40627 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java @@ -51,6 +51,8 @@ public class VerifyCMSSignatureResponseElementImpl private List adesResults = null; + private String usedAlgorithm = null; + /** * Sets a SignerInfo element according to CMS. * @@ -106,5 +108,16 @@ public class VerifyCMSSignatureResponseElementImpl public ExtendedCertificateCheckResult getExtendedCertificateCheck() { return extendedResult; } + + @Override + public String getSignatureAlgorithm() { + return usedAlgorithm; + } + + public void setSignatureAlgorithm(String usedAlgorithm) { + this.usedAlgorithm = usedAlgorithm; + } + + } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java index 60ac3be..0047d44 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java @@ -70,6 +70,8 @@ public class VerifyXMLSignatureResponseImpl implements VerifyXMLSignatureRespons /** Information about the certificate check. */ private CheckResult certificateCheck; + private String signatureAlgorithm = null; + /** * Sets information about the signer certificate. * @@ -189,4 +191,13 @@ public class VerifyXMLSignatureResponseImpl implements VerifyXMLSignatureRespons return extendedResult; } + public String getSignatureAlgorithm() { + return signatureAlgorithm; + } + + public void setSignatureAlgorithm(String signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + } + + } -- cgit v1.2.3 From 9868b02903f950566206ee736bf5e9edbeeac5f3 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 7 Feb 2019 12:47:00 +0100 Subject: add additional PAdES verification information and some more small updates --- .../moa/spss/api/impl/SPSSFactoryImpl.java | 5 ++++- .../VerifyCMSSignatureResponseElementImpl.java | 23 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java index d743f16..2525a2f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java @@ -283,7 +283,8 @@ public class SPSSFactoryImpl extends SPSSFactory { public VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement(SignerInfo signerInfo, CheckResult signatureCheck, CheckResult certificateCheck, List adesResult, - ExtendedCertificateCheckResult extendedCertificateCheckResult, String usedAlgorithm) { + ExtendedCertificateCheckResult extendedCertificateCheckResult, String usedAlgorithm, Boolean coversFullDocument, + int[] byteRangeOfSignature) { VerifyCMSSignatureResponseElementImpl verifyCMSSignatureResponseElement = new VerifyCMSSignatureResponseElementImpl(); verifyCMSSignatureResponseElement.setSignerInfo(signerInfo); verifyCMSSignatureResponseElement.setSignatureCheck(signatureCheck); @@ -291,6 +292,8 @@ public class SPSSFactoryImpl extends SPSSFactory { verifyCMSSignatureResponseElement.setAdESFormResults(adesResult); verifyCMSSignatureResponseElement.setExtendedCertificateCheck(extendedCertificateCheckResult); verifyCMSSignatureResponseElement.setSignatureAlgorithm(usedAlgorithm); + verifyCMSSignatureResponseElement.setCoversFullDocument(coversFullDocument); + verifyCMSSignatureResponseElement.setByteRangeOfSignature(byteRangeOfSignature); return verifyCMSSignatureResponseElement; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java index 1d40627..3ea504b 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java @@ -53,6 +53,10 @@ public class VerifyCMSSignatureResponseElementImpl private String usedAlgorithm = null; + private Boolean coversFullDocument = null; + + private int[] byteRangeOfSignature = null; + /** * Sets a SignerInfo element according to CMS. * @@ -117,6 +121,25 @@ public class VerifyCMSSignatureResponseElementImpl public void setSignatureAlgorithm(String usedAlgorithm) { this.usedAlgorithm = usedAlgorithm; } + + @Override + public Boolean getCoversFullDocument() { + return coversFullDocument; + } + + public void setCoversFullDocument(Boolean coversFullDocument) { + this.coversFullDocument = coversFullDocument; + } + + @Override + public int[] getByteRangeOfSignature() { + return byteRangeOfSignature; + } + + public void setByteRangeOfSignature(int[] byteRangeOfSignature) { + this.byteRangeOfSignature = byteRangeOfSignature; + } + -- cgit v1.2.3 From 578ad0d6bc408edf9e6c875156054374f5fd8337 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Mon, 22 Mar 2021 18:40:26 +0100 Subject: change to EGIZ codestyle --- .../moa/spss/api/impl/AdESFormResultsImpl.java | 70 +- .../moa/spss/api/impl/Base64TransformImpl.java | 7 +- .../moa/spss/api/impl/CMSContentExplicitImpl.java | 11 +- .../moa/spss/api/impl/CMSContentReferenceImpl.java | 11 +- .../moa/spss/api/impl/CMSDataObjectImpl.java | 33 +- .../spss/api/impl/CMSSignatureResponseImpl.java | 15 +- .../api/impl/CanonicalizationTransformImpl.java | 15 +- .../moa/spss/api/impl/CheckResultImpl.java | 13 +- .../moa/spss/api/impl/ContentBinaryImpl.java | 11 +- .../egovernment/moa/spss/api/impl/ContentImpl.java | 6 +- .../moa/spss/api/impl/ContentLocRefImpl.java | 32 +- .../moa/spss/api/impl/ContentReferenceImpl.java | 10 +- .../moa/spss/api/impl/ContentXMLImpl.java | 11 +- .../api/impl/CreateCMSSignatureRequestImpl.java | 21 +- .../api/impl/CreateCMSSignatureResponseImpl.java | 14 +- ...ateSignatureEnvironmentProfileExplicitImpl.java | 29 +- .../CreateSignatureEnvironmentProfileIDImpl.java | 11 +- .../moa/spss/api/impl/CreateSignatureInfoImpl.java | 19 +- .../spss/api/impl/CreateSignatureLocationImpl.java | 10 +- .../spss/api/impl/CreateTransformsInfoImpl.java | 15 +- .../CreateTransformsInfoProfileExplicitImpl.java | 20 +- .../impl/CreateTransformsInfoProfileIDImpl.java | 10 +- .../api/impl/CreateXMLSignatureRequestImpl.java | 21 +- .../api/impl/CreateXMLSignatureResponseImpl.java | 14 +- .../moa/spss/api/impl/DataObjectInfoCMSImpl.java | 10 +- .../moa/spss/api/impl/DataObjectInfoImpl.java | 26 +- .../moa/spss/api/impl/ElementSelectorImpl.java | 13 +- .../api/impl/EnvelopedSignatureTransformImpl.java | 7 +- .../moa/spss/api/impl/ErrorResponseImpl.java | 14 +- .../ExclusiveCanonicalizationTransformImpl.java | 27 +- .../impl/ExtendedCertificateCheckResultImpl.java | 74 +- .../moa/spss/api/impl/InputDataBinaryImpl.java | 85 +- .../moa/spss/api/impl/InputDataXMLImpl.java | 80 +- .../spss/api/impl/ManifestRefsCheckResultImpl.java | 9 +- .../api/impl/ManifestRefsCheckResultInfoImpl.java | 19 +- .../moa/spss/api/impl/MetaInfoImpl.java | 17 +- .../moa/spss/api/impl/ReferenceInfoImpl.java | 20 +- .../spss/api/impl/ReferencesCheckResultImpl.java | 22 +- .../api/impl/ReferencesCheckResultInfoImpl.java | 14 +- .../moa/spss/api/impl/SPSSFactoryImpl.java | 1048 +++++++++++--------- .../api/impl/SignatureEnvironmentResponseImpl.java | 13 +- .../api/impl/SignatureManifestCheckParamsImpl.java | 19 +- .../moa/spss/api/impl/SignerInfoImpl.java | 137 +-- .../spss/api/impl/SingleSignatureInfoCMSImpl.java | 15 +- .../moa/spss/api/impl/SingleSignatureInfoImpl.java | 10 +- .../api/impl/SupplementProfileExplicitImpl.java | 11 +- .../moa/spss/api/impl/SupplementProfileIDImpl.java | 11 +- .../moa/spss/api/impl/TSLConfigurationImpl.java | 134 +-- .../moa/spss/api/impl/TransformImpl.java | 4 +- .../api/impl/TransformParameterBinaryImpl.java | 15 +- .../moa/spss/api/impl/TransformParameterImpl.java | 4 +- .../spss/api/impl/TransformParameterURIImpl.java | 10 +- .../spss/api/impl/TransformPatameterHashImpl.java | 17 +- .../moa/spss/api/impl/TslInfosImpl.java | 100 +- .../api/impl/VerifyCMSSignatureRequestImpl.java | 43 +- .../VerifyCMSSignatureResponseElementImpl.java | 106 +- .../api/impl/VerifyCMSSinatureResponseImpl.java | 14 +- .../moa/spss/api/impl/VerifySignatureInfoImpl.java | 16 +- .../spss/api/impl/VerifySignatureLocationImpl.java | 7 +- .../spss/api/impl/VerifyTransformsDataImpl.java | 16 +- .../VerifyTransformsInfoProfileExplicitImpl.java | 20 +- .../impl/VerifyTransformsInfoProfileIDImpl.java | 9 +- .../api/impl/VerifyXMLSignatureRequestImpl.java | 220 ++-- .../api/impl/VerifyXMLSignatureResponseImpl.java | 325 +++--- .../moa/spss/api/impl/X509IssuerSerialImpl.java | 9 +- .../api/impl/XMLDataObjectAssociationImpl.java | 8 +- .../spss/api/impl/XPathFilter2TransformImpl.java | 23 +- .../moa/spss/api/impl/XPathFilterImpl.java | 23 +- .../moa/spss/api/impl/XPathTransformImpl.java | 26 +- .../moa/spss/api/impl/XSLTransformImpl.java | 8 +- 70 files changed, 1726 insertions(+), 1561 deletions(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/AdESFormResultsImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/AdESFormResultsImpl.java index c186c54..46710c0 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/AdESFormResultsImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/AdESFormResultsImpl.java @@ -4,39 +4,39 @@ import at.gv.egovernment.moa.spss.api.xmlverify.AdESFormResults; public class AdESFormResultsImpl implements AdESFormResults { - private Integer code; - private String info; - private String name; - - public synchronized void setCode(Integer code) { - this.code = code; - } - - public synchronized void setInfo(String info) { - this.info = info; - } - - public synchronized void setName(String name) { - this.name = name; - } - - @Override - public Integer getCode() { - return this.code; - } - - @Override - public String getInfo() { - return this.info; - } - - @Override - public String getName() { - return this.name; - } - - @Override - public String toString() { - return "AdESFormResultsImpl [code=" + code + ", info=" + info + ", name=" + name + "]"; - } + private Integer code; + private String info; + private String name; + + public synchronized void setCode(Integer code) { + this.code = code; + } + + public synchronized void setInfo(String info) { + this.info = info; + } + + public synchronized void setName(String name) { + this.name = name; + } + + @Override + public Integer getCode() { + return this.code; + } + + @Override + public String getInfo() { + return this.info; + } + + @Override + public String getName() { + return this.name; + } + + @Override + public String toString() { + return "AdESFormResultsImpl [code=" + code + ", info=" + info + ", name=" + name + "]"; + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java index f708bab..b08c74c 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java @@ -21,20 +21,19 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + extends TransformImpl + implements Base64Transform { /** * Create a new Base64TransformImpl object. diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java index 8dede90..f6c1574 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.io.InputStream; @@ -30,33 +29,35 @@ 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; } + @Override public InputStream getBinaryContent() { return binaryContent; } /** * Gets the type of content. - * + * * @return EXPLICIT_CONTENT */ + @Override public int getContentType() { return EXPLICIT_CONTENT; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java index fb90c5f..a14ea90 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java @@ -21,40 +21,41 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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; } + @Override public String getReference() { return reference; } /** * Gets the content type. - * + * * @return REFERENCE_CONTENT */ + @Override public int getContentType() { return REFERENCE_CONTENT; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java index 20a9b56..e9b4fea 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.math.BigDecimal; @@ -32,60 +31,64 @@ 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; - + private BigDecimal excludeByteRangeFrom; private BigDecimal excludeByteRangeTo; /** * Sets the meta information associated with the CMS data object. - * + * * @param metaInfo The meta information. */ public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } + @Override 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; } + @Override public CMSContent getContent() { return cmsContent; } public void setExcludeByteRangeFrom(BigDecimal excludeByteRangeFrom) { - this.excludeByteRangeFrom = excludeByteRangeFrom; + this.excludeByteRangeFrom = excludeByteRangeFrom; } - + + @Override public BigDecimal getExcludeByteRangeFrom() { - return excludeByteRangeFrom; + return excludeByteRangeFrom; } - + public void setExcludeByteRangeTo(BigDecimal excludeByteRangeTo) { - this.excludeByteRangeTo = excludeByteRangeTo; + this.excludeByteRangeTo = excludeByteRangeTo; } - + + @Override public BigDecimal getExcludeByteRangeTo() { - return excludeByteRangeTo; - } - + return excludeByteRangeTo; + } + } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSSignatureResponseImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSSignatureResponseImpl.java index b512dd0..77ef137 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSSignatureResponseImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSSignatureResponseImpl.java @@ -21,42 +21,41 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; -import org.w3c.dom.Element; - import at.gv.egovernment.moa.spss.api.cmssign.CMSSignatureResponse; /** * Default implementation of CMSSignatureResponse. - * + * * @version $Id$ */ public class CMSSignatureResponseImpl - implements CMSSignatureResponse { + implements CMSSignatureResponse { /** The base64 value of the CMS signature. */ private String cmsSignature; - /** + /** * Sets the CMS signature. - * + * * @param cmsSignature The Base64 encoded value CMS signature. */ public void setCMSSignature(String cmsSignature) { this.cmsSignature = cmsSignature; } + @Override public String getCMSSignature() { return cmsSignature; } /** * Gets the type of CreateCMSSignatureResponseElement. - * + * * @return CMS_SIGNATURE */ + @Override public int getResponseType() { return CMS_SIGNATURE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java index f8efe26..e931c4b 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java @@ -21,26 +21,25 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { - + extends TransformImpl + implements CanonicalizationTransform { + /** * Create a new CanonicalizationTransformImpl object. - * - * @param algorithmURI Algorithm URI of the canonicalization - * Transform type. + * + * @param algorithmURI Algorithm URI of the canonicalization + * Transform type. */ public CanonicalizationTransformImpl(String algorithmURI) { setAlgorithmURI(algorithmURI); diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java index 5bb6e60..a57c4e6 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import org.w3c.dom.NodeList; @@ -30,20 +29,20 @@ 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. */ + + /** Additional information. */ private NodeList info; /** * Sets a result code. - * + * * @param code The result code. */ public void setCode(int code) { @@ -53,13 +52,14 @@ public class CheckResultImpl implements CheckResult { /** * @see at.gv.egovernment.moa.spss.api.common.CheckResult#getCode() */ + @Override public int getCode() { return code; } /** * Sets a descriptive information. - * + * * @param info The descriptive information. */ public void setInfo(NodeList info) { @@ -69,6 +69,7 @@ public class CheckResultImpl implements CheckResult { /** * @see at.gv.egovernment.moa.spss.api.common.CheckResult#getInfo() */ + @Override public NodeList getInfo() { return info; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java index 7fe1cf9..aa49375 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.io.InputStream; @@ -30,33 +29,35 @@ 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. */ + /** 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; } + @Override public InputStream getBinaryContent() { return binaryContent; } /** * Gets the type of content. - * + * * @return BINARY_CONTENT */ + @Override public int getContentType() { return BINARY_CONTENT; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java index d061747..4c73795 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java @@ -21,14 +21,13 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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$ */ @@ -38,13 +37,14 @@ public abstract class ContentImpl implements Content { /** * Sets the reference pointing to the content data. - * + * * @param referenceURI The URI of the content data. */ public void setReference(String referenceURI) { this.reference = referenceURI; } + @Override public String getReference() { return reference; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java index aa01a93..7d763c1 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java @@ -21,47 +21,47 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.common.ContentLocRef; /** * Default implementation of ContentLocRef. - * + * * @author Gregor Karlinger * @version $Id$ */ -public class ContentLocRefImpl extends ContentImpl implements ContentLocRef -{ +public class ContentLocRefImpl extends ContentImpl implements ContentLocRef { /** - * The location reference URI pointing to the actual remote location of the content. + * The location reference URI pointing to the actual remote location of the + * content. */ private String locationReferenceURI_; - - /** + + /** * @see at.gv.egovernment.moa.spss.api.common.ContentLocRef#getLocationReferenceURI() */ - public String getLocationReferenceURI() - { + @Override + public String getLocationReferenceURI() { return locationReferenceURI_; } - + /** - * Sets the location reference URI pointing to the actual remote location of the content. - * + * Sets the location reference URI pointing to the actual remote location of the + * content. + * * @param locationReferenceURI the location reference URI. */ - public void setLocationReferenceURI(String locationReferenceURI) - { + public void setLocationReferenceURI(String locationReferenceURI) { locationReferenceURI_ = locationReferenceURI; } - + /** * Gets the type of content. - * + * * @return LOCREF_CONTENT. */ + @Override public int getContentType() { return LOCREF_CONTENT; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java index ab5c3b4..de0e1cf 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java @@ -21,26 +21,26 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + extends ContentImpl + implements ContentReference { /** * Gets the type of content. - * + * * @return REFERENCE_CONTENT */ + @Override public int getContentType() { return REFERENCE_CONTENT; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java index dcc1935..496550f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import org.w3c.dom.NodeList; @@ -30,7 +29,7 @@ import at.gv.egovernment.moa.spss.api.common.ContentXML; /** * Default implementation of ContentXML. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -38,25 +37,27 @@ 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; } + @Override public NodeList getXMLContent() { return xmlContent; } /** * Gets the type of content. - * + * * @return XML_CONTENT */ + @Override public int getContentType() { return XML_CONTENT; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateCMSSignatureRequestImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateCMSSignatureRequestImpl.java index e8408bc..dcdb77f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateCMSSignatureRequestImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateCMSSignatureRequestImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,44 +31,46 @@ import at.gv.egovernment.moa.spss.api.cmssign.CreateCMSSignatureRequest; /** * Default implementation of CreateCMSSignatureRequest. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class CreateCMSSignatureRequestImpl - implements CreateCMSSignatureRequest { + implements CreateCMSSignatureRequest { - /** The identifier for selecting the private keys for creating the signature.*/ + /** 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 + * 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; } + @Override 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; + singleSignaureInfos != null + ? Collections.unmodifiableList(new ArrayList(singleSignaureInfos)) + : null; } + @Override public List getSingleSignatureInfos() { return singleSignatureInfos; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateCMSSignatureResponseImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateCMSSignatureResponseImpl.java index d596058..ae64195 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateCMSSignatureResponseImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateCMSSignatureResponseImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,27 +31,28 @@ import at.gv.egovernment.moa.spss.api.cmssign.CreateCMSSignatureResponse; /** * Default implementation of CreateCMSSignatureResponse. - * + * * @version $Id$ */ public class CreateCMSSignatureResponseImpl - implements CreateCMSSignatureResponse { + implements CreateCMSSignatureResponse { /** 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; + responseElements != null + ? Collections.unmodifiableList(new ArrayList(responseElements)) + : null; } + @Override public List getResponseElements() { return responseElements; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java index 9fe8eaf..3d5279f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,14 +31,14 @@ import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileE import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation; /** - * Default implementation of + * Default implementation of * . - * + * * @author Patrick Peck * @version $Id$ */ public class CreateSignatureEnvironmentProfileExplicitImpl - implements CreateSignatureEnvironmentProfileExplicit { + implements CreateSignatureEnvironmentProfileExplicit { /** The insertion location of the signature to be created. */ private CreateSignatureLocation createSignatureLocation; @@ -49,40 +48,42 @@ public class CreateSignatureEnvironmentProfileExplicitImpl /** * Sets the insertion location of the signature to be created. - * - * @param createSignatureLocation 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; } + @Override public CreateSignatureLocation getCreateSignatureLocation() { return createSignatureLocation; } /** - * Sets the supplemental information for evaluating the signature - * environment. - * + * 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; + supplements != null + ? Collections.unmodifiableList(new ArrayList(supplements)) + : null; } + @Override public List getSupplements() { return supplements; } /** * Gets the type of profile. - * + * * @return EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE */ + @Override public int getCreateSignatureEnvironmentProfileType() { return EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java index 5edbf4f..4818f9e 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java @@ -21,41 +21,42 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + 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; } + @Override public String getCreateSignatureEnvironmentProfileID() { return createSignatureEnvironmentProfileID; } /** * Gets the type of profile. - * + * * @return ID_CREATESIGNATUREENVIRONMENTPROFILE */ + @Override public int getCreateSignatureEnvironmentProfileType() { return ID_CREATESIGNATUREENVIRONMENTPROFILE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java index 7111633..7a97cd5 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.common.Content; @@ -30,29 +29,30 @@ 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. */ + + /** + * 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. - * + * Sets the signature environment that will contain the newly created signature. + * * @param createSignatureEnvironment The signature environment. */ public void setCreateSignatureEnvironment(Content createSignatureEnvironment) { this.createSignatureEnvironment = createSignatureEnvironment; } + @Override public Content getCreateSignatureEnvironment() { return createSignatureEnvironment; } @@ -60,13 +60,14 @@ public class CreateSignatureInfoImpl implements CreateSignatureInfo { /** * 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; } + @Override public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile() { return createSignatureEnvironmentProfile; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java index 6f3101f..121dcf0 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java @@ -21,33 +21,33 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + 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; } + @Override public int getIndex() { return index; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java index d53f103..24e4abc 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -33,7 +32,7 @@ import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo; /** * Default implementation of CreateTransformsInfo. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -45,29 +44,31 @@ public class CreateTransformsInfoImpl implements CreateTransformsInfo { /** * Sets the transforms. - * + * * @param transforms The transforms. */ public void setTransforms(List transforms) { this.transforms = - transforms != null - ? Collections.unmodifiableList(new ArrayList(transforms)) - : null; + transforms != null + ? Collections.unmodifiableList(new ArrayList(transforms)) + : null; } + @Override 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; } + @Override public MetaInfo getFinalDataMetaInfo() { return finalDataMetaInfo; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java index b6b9d52..3ffc8e3 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -33,12 +32,12 @@ import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplici /** * Default implementation of CreateTransformsInfoProfileExplicit. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class CreateTransformsInfoProfileExplicitImpl - implements CreateTransformsInfoProfileExplicit { + implements CreateTransformsInfoProfileExplicit { /** Transformation information. */ private CreateTransformsInfo transformsInfo; @@ -47,38 +46,41 @@ public class CreateTransformsInfoProfileExplicitImpl /** * Sets the transformation information. - * + * * @param transformsInfo The transformation information. */ public void setCreateTransformsInfo(CreateTransformsInfo transformsInfo) { this.transformsInfo = transformsInfo; } + @Override 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; + supplements != null + ? Collections.unmodifiableList(new ArrayList(supplements)) + : null; } + @Override public List getSupplements() { return supplements; } /** * Gets the type of profile. - * + * * @return EXPLICIT_CREATETRANSFORMSINFOPROFILE */ + @Override public int getCreateTransformsInfoProfileType() { return EXPLICIT_CREATETRANSFORMSINFOPROFILE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java index 55d0ca6..e86c7de 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java @@ -21,40 +21,42 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + 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; } + @Override public String getCreateTransformsInfoProfileID() { return createTransformsID; } /** * Gets the type of profile. - * + * * @return ID_CREATETRANSFORMSINFOPROFILE */ + @Override public int getCreateTransformsInfoProfileType() { return ID_CREATETRANSFORMSINFOPROFILE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java index aaffaa7..30779a3 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,44 +31,46 @@ import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest; /** * Default implementation of CreateXMLSignatureRequest. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class CreateXMLSignatureRequestImpl - implements CreateXMLSignatureRequest { + implements CreateXMLSignatureRequest { - /** The identifier for selecting the private keys for creating the signature.*/ + /** 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 + * 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; } + @Override 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; + singleSignaureInfos != null + ? Collections.unmodifiableList(new ArrayList(singleSignaureInfos)) + : null; } + @Override public List getSingleSignatureInfos() { return singleSignatureInfos; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java index 7a8359f..80cd6dc 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,28 +31,29 @@ import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse; /** * Default implementation of CreateXMLSignatureResponse. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class CreateXMLSignatureResponseImpl - implements CreateXMLSignatureResponse { + 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; + responseElements != null + ? Collections.unmodifiableList(new ArrayList(responseElements)) + : null; } + @Override public List getResponseElements() { return responseElements; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoCMSImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoCMSImpl.java index 702086b..f65816a 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoCMSImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoCMSImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo; @@ -29,7 +28,7 @@ import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject; /** * Default implementation of DataObjectInfo for CMS. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -41,27 +40,28 @@ public class DataObjectInfoCMSImpl implements DataObjectInfo { /** * Sets the signature structure type. - * + * * @param structure The signature structure type. */ public void setStructure(String structure) { this.stucture = structure; } + @Override public String getStructure() { return stucture; } - /** * Sets the data object to be signed. - * + * * @param dataObject The data object to be signed. */ public void setDataObject(CMSDataObject dataObject) { this.dataObject = dataObject; } + @Override public CMSDataObject getDataObject() { return dataObject; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java index 7a25a97..4099d89 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.common.Content; @@ -30,15 +29,16 @@ 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 */ + /** + * 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; @@ -47,13 +47,14 @@ public class DataObjectInfoImpl implements DataObjectInfo { /** * Sets the signature structure type. - * + * * @param structure The signature structure type. */ public void setStructure(String structure) { this.stucture = structure; } + @Override public String getStructure() { return stucture; } @@ -61,41 +62,44 @@ public class DataObjectInfoImpl implements DataObjectInfo { /** * 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. + * + * @param childOfManifest Whether to put the reference in the signature of in + * the manifest. */ public void setChildOfManifest(boolean childOfManifest) { this.childOfManifest = childOfManifest; } + @Override 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; } + @Override public Content getDataObject() { return dataObject; } /** * Sets additional information for the transformations. - * + * * @param profile The profile containing additional information for the - * transformations. + * transformations. */ public void setCreateTransformsInfoProfile(CreateTransformsInfoProfile profile) { this.createTransformsInfoProfile = profile; } + @Override public CreateTransformsInfoProfile getCreateTransformsInfoProfile() { return createTransformsInfoProfile; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java index 7de0660..e505440 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.HashMap; @@ -31,7 +30,7 @@ import at.gv.egovernment.moa.spss.api.common.ElementSelector; /** * Default implementation of ElementSelector. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -43,27 +42,29 @@ public class ElementSelectorImpl implements ElementSelector { /** * Sets the XPath expression pointing to the element. - * + * * @param xPathExpression XPath expression pointing to the element. */ public void setXPathExpression(String xPathExpression) { this.xPathExpression = xPathExpression; } + @Override 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. + * + * @param namespaceDeclarations The namespace declarations to apply for + * evaluating the XPath. */ public void setNamespaceDeclarations(Map namespaceDeclarations) { this.namespaceDeclarations = namespaceDeclarations; } + @Override public Map getNamespaceDeclarations() { return namespaceDeclarations; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java index 121037f..40a579b 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java @@ -21,20 +21,19 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + extends TransformImpl + implements EnvelopedSignatureTransform { /** * Create a EnvelopedSignatureTransformImpl. diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java index a2a59a7..e55b69b 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java @@ -21,14 +21,13 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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$ */ @@ -40,35 +39,38 @@ public class ErrorResponseImpl implements ErrorResponse { /** * Sets the error code. - * + * * @param code The error code. */ public void setErrorCode(int code) { this.code = code; } + @Override public int getErrorCode() { return code; } /** * Sets the verbose error information. - * + * * @param info The verbose error information. */ public void setInfo(String info) { this.info = info; } + @Override public String getInfo() { return info; } /** * Gets the response type. - * - * @return ERROR_RESPONSE + * + * @return ERROR_RESPONSE */ + @Override public int getResponseType() { return ERROR_RESPONSE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java index eea09c0..fd0e276 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,22 +31,22 @@ 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 { + 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. + * algorithm. */ public ExclusiveCanonicalizationTransformImpl(String algorithmURI) { setAlgorithmURI(algorithmURI); @@ -55,16 +54,18 @@ public class ExclusiveCanonicalizationTransformImpl /** * Sets the namespaces to treat according to canonical XML. - * @param inclusiveNamespacePrefixes 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; + inclusiveNamespacePrefixes != null + ? Collections.unmodifiableList(new ArrayList(inclusiveNamespacePrefixes)) + : null; } + @Override public List getInclusiveNamespacePrefixes() { return inclusiveNamespacePrefixes; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExtendedCertificateCheckResultImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExtendedCertificateCheckResultImpl.java index f36760c..21db8e0 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExtendedCertificateCheckResultImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExtendedCertificateCheckResultImpl.java @@ -3,42 +3,42 @@ package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.common.ExtendedCertificateCheckResult; public class ExtendedCertificateCheckResultImpl implements ExtendedCertificateCheckResult { - private int majorCode; - private String majorInfo; - - private int minorCode; - private String minorInfo; - - public ExtendedCertificateCheckResultImpl(int majorCode, String majorInfo) { - this(majorCode, majorInfo, -1, ""); - } - - public ExtendedCertificateCheckResultImpl(int majorCode, String majorInfo, - int minorCode, String minorInfo) { - this.majorCode = majorCode; - this.majorInfo = majorInfo; - this.minorCode = minorCode; - this.minorInfo = minorInfo; - } - - @Override - public int getMajorCode() { - return this.majorCode; - } - - @Override - public String getMajorInfo() { - return this.majorInfo; - } - - @Override - public int getMinorCode() { - return this.minorCode; - } - - @Override - public String getMinorInfo() { - return this.minorInfo; - } + private final int majorCode; + private final String majorInfo; + + private final int minorCode; + private final String minorInfo; + + public ExtendedCertificateCheckResultImpl(int majorCode, String majorInfo) { + this(majorCode, majorInfo, -1, ""); + } + + public ExtendedCertificateCheckResultImpl(int majorCode, String majorInfo, + int minorCode, String minorInfo) { + this.majorCode = majorCode; + this.majorInfo = majorInfo; + this.minorCode = minorCode; + this.minorInfo = minorInfo; + } + + @Override + public int getMajorCode() { + return this.majorCode; + } + + @Override + public String getMajorInfo() { + return this.majorInfo; + } + + @Override + public int getMinorCode() { + return this.minorCode; + } + + @Override + public String getMinorInfo() { + return this.minorInfo; + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java index 4b5659e..a806f16 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.io.InputStream; @@ -32,102 +31,104 @@ import at.gv.egovernment.moa.spss.api.common.ContentBinary; import at.gv.egovernment.moa.spss.api.common.InputData; /** - * Content wrapper decorating a binary content with two additional attributes + * Content wrapper decorating a binary content with two additional attributes * needed for returning HashInputData and ReferenceInputData * information as part of VerifyXMLSignatureResponse. - * + * * @author Gregor Karlinger - * + * * @version $Id$ */ -public class InputDataBinaryImpl implements ContentBinary, InputData -{ +public class InputDataBinaryImpl implements ContentBinary, InputData { /** * The wrapped Content. */ protected ContentBinary wrapped_; - + /** - * This attribute signals what kind of container the XMLDSIG Reference - * this InputData belongs to is part of. + * This attribute signals what kind of container the XMLDSIG + * Reference this InputData belongs to is part of. */ protected String partOf_; - + /** * If this InputData belongs to an XMLDSIG Reference * being part of either a XMLDSIGManifest or a SignatureManifest, this attribute - * (a positive int) signals the particular Reference of the XMLDSIG + * (a positive int) signals the particular Reference of the XMLDSIG * SignedInfo referring to the XMLDSIGManifest or SignatureManifest * respectively. */ protected int referringReferenceNumber_; - + protected String hashAlg = null; - + /** * Creates a new instance. - * - * @param wrapped The wrapped Content. Must be of type {@link Content#BINARY_CONTENT}. - * - * @param partOf see {@link InputData} - * + * + * @param wrapped The wrapped Content. Must be of + * type {@link Content#BINARY_CONTENT}. + * + * @param partOf see {@link InputData} + * * @param referringReferenceNumber see {@link InputData} - * - * @param hashAlg see {@link InputData} + * + * @param hashAlg see {@link InputData} */ - public InputDataBinaryImpl(Content wrapped, String partOf, int referringReferenceNumber, String hashAlg) throws MOARuntimeException - { - if (wrapped.getContentType() != Content.BINARY_CONTENT) throw new MOARuntimeException("9901", null); - + public InputDataBinaryImpl(Content wrapped, String partOf, int referringReferenceNumber, String hashAlg) + throws MOARuntimeException { + if (wrapped.getContentType() != Content.BINARY_CONTENT) { + throw new MOARuntimeException("9901", null); + } + wrapped_ = (ContentBinary) wrapped; - partOf_ = partOf; + partOf_ = partOf; referringReferenceNumber_ = referringReferenceNumber; - this.hashAlg = hashAlg; + this.hashAlg = hashAlg; } - - /** + + /** * @see at.gv.egovernment.moa.spss.api.common.Content#getContentType() */ - public int getContentType() - { + @Override + public int getContentType() { return wrapped_.getContentType(); } /** * @see at.gv.egovernment.moa.spss.api.common.Content#getReference() */ - public String getReference() - { + @Override + public String getReference() { return wrapped_.getReference(); } /** * @see at.gv.egovernment.moa.spss.api.common.ContentBinary#getBinaryContent() */ - public InputStream getBinaryContent() - { + @Override + public InputStream getBinaryContent() { return wrapped_.getBinaryContent(); } /** * @see at.gv.egovernment.moa.spss.api.common.InputData#getPartOf() */ - public String getPartOf() - { + @Override + public String getPartOf() { return partOf_; } /** * @see at.gv.egovernment.moa.spss.api.common.InputData#getReferringReferenceNumber() */ - public int getReferringReferenceNumber() - { + @Override + public int getReferringReferenceNumber() { return referringReferenceNumber_; } -@Override -public String getHashAlgorithm() { - return this.hashAlg; -} + @Override + public String getHashAlgorithm() { + return this.hashAlg; + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java index e89976e..fd97bf8 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import org.w3c.dom.NodeList; @@ -32,102 +31,103 @@ import at.gv.egovernment.moa.spss.api.common.ContentXML; import at.gv.egovernment.moa.spss.api.common.InputData; /** - * Content wrapper decorating an XML content with two additional attributes + * Content wrapper decorating an XML content with two additional attributes * needed for returning HashInputData and ReferenceInputData * information as part of VerifyXMLSignatureResponse. - * + * * @author Gregor Karlinger - * + * * @version $Id$ */ -public class InputDataXMLImpl implements ContentXML, InputData -{ +public class InputDataXMLImpl implements ContentXML, InputData { /** * The wrapped ContentXML. */ protected ContentXML wrapped_; - + /** - * This attribute signals what kind of container the XMLDSIG Reference - * this InputData belongs to is part of. + * This attribute signals what kind of container the XMLDSIG + * Reference this InputData belongs to is part of. */ protected String partOf_; - + /** * If this InputData belongs to an XMLDSIG Reference * being part of either a XMLDSIGManifest or a SignatureManifest, this attribute - * (a positive int) signals the particular Reference of the XMLDSIG + * (a positive int) signals the particular Reference of the XMLDSIG * SignedInfo referring to the XMLDSIGManifest or SignatureManifest * respectively. */ protected int referringReferenceNumber_; - + protected String hashAlg = null; - + /** * Creates a new instance. - * - * @param wrapped The wrapped ContentBinary. Must be of type {@link Content#XML_CONTENT}. - * - * @param partOf see {@link InputData} - * + * + * @param wrapped The wrapped ContentBinary. Must + * be of type {@link Content#XML_CONTENT}. + * + * @param partOf see {@link InputData} + * * @param referringReferenceNumber see {@link InputData} - * - * @param hashAlg see {@link InputData} + * + * @param hashAlg see {@link InputData} */ - public InputDataXMLImpl(Content wrapped, String partOf, int referringReferenceNumber, String hashAlg) - { - if (wrapped.getContentType() != Content.XML_CONTENT) throw new MOARuntimeException("9901", null); + public InputDataXMLImpl(Content wrapped, String partOf, int referringReferenceNumber, String hashAlg) { + if (wrapped.getContentType() != Content.XML_CONTENT) { + throw new MOARuntimeException("9901", null); + } wrapped_ = (ContentXML) wrapped; - partOf_ = partOf; + partOf_ = partOf; referringReferenceNumber_ = referringReferenceNumber; this.hashAlg = hashAlg; } - - /** + + /** * @see at.gv.egovernment.moa.spss.api.common.Content#getContentType() */ - public int getContentType() - { + @Override + public int getContentType() { return wrapped_.getContentType(); } /** * @see at.gv.egovernment.moa.spss.api.common.Content#getReference() */ - public String getReference() - { + @Override + public String getReference() { return wrapped_.getReference(); } /** * @see at.gv.egovernment.moa.spss.api.common.ContentXML#getXMLContent() */ - public NodeList getXMLContent() - { + @Override + public NodeList getXMLContent() { return wrapped_.getXMLContent(); } /** * @see at.gv.egovernment.moa.spss.api.common.InputData#getPartOf() */ - public String getPartOf() - { + @Override + public String getPartOf() { return partOf_; } /** * @see at.gv.egovernment.moa.spss.api.common.InputData#getReferringReferenceNumber() */ - public int getReferringReferenceNumber() - { + @Override + public int getReferringReferenceNumber() { return referringReferenceNumber_; } -@Override -public String getHashAlgorithm() { - return this.hashAlg; -} + @Override + public String getHashAlgorithm() { + return this.hashAlg; + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java index e5b7f40..752fec0 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult; @@ -29,7 +28,7 @@ import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo; /** * Default implementation of ManifestRefsCheckResult. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -41,26 +40,28 @@ public class ManifestRefsCheckResultImpl implements ManifestRefsCheckResult { /** * Sets the check code. - * + * * @param code A numerical representation of the result of the manifest check. */ public void setCode(int code) { this.code = code; } + @Override 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; } + @Override public ManifestRefsCheckResultInfo getInfo() { return info; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java index f0ef1c5..68405a1 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java @@ -21,34 +21,37 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + extends ReferencesCheckResultInfoImpl + implements ManifestRefsCheckResultInfo { - /** The position of the signature reference containing the reference to the - * manifest being described by this object.*/ + /** + * 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. + * 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; } + @Override public int getReferringSignatureReference() { return referringSignatureReference; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java index e3a06c6..9f6d882 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import org.w3c.dom.NodeList; @@ -30,6 +29,7 @@ import at.gv.egovernment.moa.spss.api.common.MetaInfo; /** * Default implementation of MetaInfo. + * * @author Fatemeh Philippi * @version $Id$ */ @@ -45,55 +45,58 @@ public class MetaInfoImpl implements MetaInfo { /** * Sets the MIME type. - * + * * @param mimeType The MIME type to set. */ public void setMimeType(String mimeType) { this.mimeType = mimeType; } + @Override 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; } + @Override public String getDescription() { return description; } /** * Sets descriptive XML content. - * + * * @param anyElements The elements to set. */ public void setAnyElements(NodeList anyElements) { - this.anyElements = anyElements; + this.anyElements = anyElements; } + @Override public NodeList getAnyElements() { return anyElements; } /** * Sets the XML signature creation type information. - * + * * @param type the XML signature creation type information to set. */ public void setType(String type) { this.type = type; } + @Override public String getType() { return type; } - } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java index 8bd81a7..c9e44f1 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,7 +31,7 @@ import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo; /** * Default implementation of ReferenceInfo. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -41,20 +40,21 @@ public class ReferenceInfoImpl implements ReferenceInfo { private List verifyTransformsInfoProfiles; /** - * Sets the transforms profile used for verifying the transforms contained - * in the signature. - * + * Sets the transforms profile used for verifying the transforms contained in + * the signature. + * * @param verifyTransformsInfoProfiles The profiles containing the transforms - * allowed in the signature. + * allowed in the signature. */ public void setVerifyTransformsInfoProfiles(List verifyTransformsInfoProfiles) { this.verifyTransformsInfoProfiles = - verifyTransformsInfoProfiles != null - ? Collections.unmodifiableList( - new ArrayList(verifyTransformsInfoProfiles)) - : null; + verifyTransformsInfoProfiles != null + ? Collections.unmodifiableList( + new ArrayList(verifyTransformsInfoProfiles)) + : null; } + @Override public List getVerifyTransformsInfoProfiles() { return verifyTransformsInfoProfiles; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java index d4cbab0..02e8634 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult; @@ -29,7 +28,7 @@ import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo; /** * Default implementation of ReferencesCheckResult. - * + * * @author Patrick Peck * @version $Id$ */ @@ -41,30 +40,31 @@ public class ReferencesCheckResultImpl implements ReferencesCheckResult { /** * Sets the check code. - * - * @param code A numerical representation of the result of the reference - * check. + * + * @param code A numerical representation of the result of the reference check. */ public void setCode(int code) { this.code = code; } - + + @Override public int getCode() { return code; } /** * Sets additional information about the reference check. - * - * @param manifestRefsCheckResultInfo Additional information about the - * reference check. + * + * @param manifestRefsCheckResultInfo Additional information about the reference + * check. */ public void setInfo(ReferencesCheckResultInfo manifestRefsCheckResultInfo) { this.info = manifestRefsCheckResultInfo; } - + + @Override public ReferencesCheckResultInfo getInfo() { return info; - } + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java index a696988..a9073ed 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import org.w3c.dom.NodeList; @@ -30,39 +29,42 @@ import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo; /** * Default implementation of ReferencesCheckResultInfo. - * + * * @author Patrick Peck * @version $Id$ */ public class ReferencesCheckResultInfoImpl - implements ReferencesCheckResultInfo { + 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; } - + + @Override 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; } + @Override public int[] getFailedReferences() { return failedReferences; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java index 2525a2f..0831aec 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java @@ -80,491 +80,577 @@ 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 CreateCMSSignatureRequest createCreateCMSSignatureRequest(String keyIdentifier, List singleSignatureInfos) { - CreateCMSSignatureRequestImpl createCMSSignatureRequest = new CreateCMSSignatureRequestImpl(); - createCMSSignatureRequest.setKeyIdentifier(keyIdentifier); - createCMSSignatureRequest.setSingleSignatureInfos(singleSignatureInfos); - return createCMSSignatureRequest; - - } - - public CreateCMSSignatureResponse createCreateCMSSignatureResponse(List responseElements) { - CreateCMSSignatureResponseImpl createCMSSignatureResponse = new CreateCMSSignatureResponseImpl(); - createCMSSignatureResponse.setResponseElements(responseElements); - return createCMSSignatureResponse; - } - - public CMSSignatureResponse createCMSSignatureResponse(String base64value) { - CMSSignatureResponseImpl cmsSignatureResponse = new CMSSignatureResponseImpl(); - cmsSignatureResponse.setCMSSignature(base64value); - - return cmsSignatureResponse; - } - - 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 at.gv.egovernment.moa.spss.api.cmssign.SingleSignatureInfo createSingleSignatureInfoCMS( - at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo dataObjectInfo, boolean securityLayerConform, boolean isPAdESConform) { - SingleSignatureInfoCMSImpl singleSignatureInfo = new SingleSignatureInfoCMSImpl(); - singleSignatureInfo.setDataObjectInfo(dataObjectInfo); - singleSignatureInfo.setSecurityLayerConform(securityLayerConform); - singleSignatureInfo.setPAdESConform(isPAdESConform); - 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 at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo createDataObjectInfo(String structure, - CMSDataObject dataObject) { - DataObjectInfoCMSImpl dataObjectInfo = new DataObjectInfoCMSImpl(); - dataObjectInfo.setStructure(structure); - dataObjectInfo.setDataObject(dataObject); - 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, boolean pdf) { - return this.createVerifyCMSSignatureRequest(signatories, dateTime, cmsSignature, dataObject, trustProfileID, pdf, false); - } - - public VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(int[] signatories, Date dateTime, - InputStream cmsSignature, CMSDataObject dataObject, String trustProfileID, boolean pdf, boolean extended) { - VerifyCMSSignatureRequestImpl verifyCMSSignatureRequest = new VerifyCMSSignatureRequestImpl(); - verifyCMSSignatureRequest.setDateTime(dateTime); - verifyCMSSignatureRequest.setCMSSignature(cmsSignature); - verifyCMSSignatureRequest.setDataObject(dataObject); - verifyCMSSignatureRequest.setTrustProfileId(trustProfileID); - verifyCMSSignatureRequest.setSignatories(signatories); - verifyCMSSignatureRequest.setPDF(pdf); - verifyCMSSignatureRequest.setExtended(extended); - return verifyCMSSignatureRequest; - } - - public CMSDataObject createCMSDataObject(MetaInfo metaInfo, CMSContent content, BigDecimal excludeByteRangeFrom, - BigDecimal excludeByteRangeTo) { - - CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl(); - cmsDataObject.setMetaInfo(metaInfo); - cmsDataObject.setContent(content); - cmsDataObject.setExcludeByteRangeFrom(excludeByteRangeFrom); - cmsDataObject.setExcludeByteRangeTo(excludeByteRangeTo); - - 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, List adesResult, - ExtendedCertificateCheckResult extendedCertificateCheckResult, String usedAlgorithm, Boolean coversFullDocument, - int[] byteRangeOfSignature) { - VerifyCMSSignatureResponseElementImpl verifyCMSSignatureResponseElement = new VerifyCMSSignatureResponseElementImpl(); - verifyCMSSignatureResponseElement.setSignerInfo(signerInfo); - verifyCMSSignatureResponseElement.setSignatureCheck(signatureCheck); - verifyCMSSignatureResponseElement.setCertificateCheck(certificateCheck); - verifyCMSSignatureResponseElement.setAdESFormResults(adesResult); - verifyCMSSignatureResponseElement.setExtendedCertificateCheck(extendedCertificateCheckResult); - verifyCMSSignatureResponseElement.setSignatureAlgorithm(usedAlgorithm); - verifyCMSSignatureResponseElement.setCoversFullDocument(coversFullDocument); - verifyCMSSignatureResponseElement.setByteRangeOfSignature(byteRangeOfSignature); - return verifyCMSSignatureResponseElement; - } - - public VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(Date dateTime, - VerifySignatureInfo verifySignatureInfo, List supplementProfiles, - SignatureManifestCheckParams signatureManifestParams, boolean returnHashInputData, String trustProfileID) { - return this.createVerifyXMLSignatureRequest(dateTime, verifySignatureInfo, supplementProfiles, - signatureManifestParams, returnHashInputData, trustProfileID, false); - } - - 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, - List adesFormResults, ExtendedCertificateCheckResult extCheckResult, String signatureAlgorithm) { - VerifyXMLSignatureResponseImpl verifyXMLSignatureResponse = new VerifyXMLSignatureResponseImpl(); - verifyXMLSignatureResponse.setSignerInfo(signerInfo); - verifyXMLSignatureResponse.setHashInputDatas(hashInputDatas); - verifyXMLSignatureResponse.setReferenceInputDatas(referenceInputDatas); - verifyXMLSignatureResponse.setSignatureAlgorithm(signatureAlgorithm); - verifyXMLSignatureResponse.setSignatureCheck(signatureCheck); - verifyXMLSignatureResponse.setSignatureManifestCheck(signatureManifestCheck); - verifyXMLSignatureResponse.setXMLDsigManifestChecks(xmlDsigManifestChecks); - verifyXMLSignatureResponse.setCertificateCheck(certificateCheck); - verifyXMLSignatureResponse.setAdESFormResults(adesFormResults); - verifyXMLSignatureResponse.setExtendedCertificateCheck(extCheckResult); - 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 locationReferenceURI, String referenceURI) { - ContentLocRefImpl content = new ContentLocRefImpl(); - content.setLocationReferenceURI(locationReferenceURI); - 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, String type) { - MetaInfoImpl metaInfo = new MetaInfoImpl(); - metaInfo.setMimeType(mimeType); - metaInfo.setDescription(description); - metaInfo.setAnyElements(otherInfo); - metaInfo.setType(type); - 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 qcSourceTSL, boolean publicAuthority, String publicAuthorityID, boolean sscd, boolean sscdSourceTSL, - String issuerCountryCode, Date signingTime, TslInfos tslInfos) { - SignerInfoImpl signerInfo = new SignerInfoImpl(); - signerInfo.setSignerCertificate(signerCertificate); - signerInfo.setQualifiedCertificate(qualifiedCertificate); - signerInfo.setQCSourceTSL(qcSourceTSL); - signerInfo.setPublicAuthority(publicAuthority); - signerInfo.setPublicAuhtorityID(publicAuthorityID); - signerInfo.setSSCD(sscd); - signerInfo.setSSCDSourceTSL(sscdSourceTSL); - signerInfo.setIssuerCountryCode(issuerCountryCode); - signerInfo.setSigningTime(signingTime); - signerInfo.setTslInfos(tslInfos); - return signerInfo; - } - - public X509IssuerSerial createX509IssuerSerial(String issuerName, BigInteger serialNumber) { - X509IssuerSerialImpl x509IssuerSerial = new X509IssuerSerialImpl(); - x509IssuerSerial.setX509IssuerName(issuerName); - x509IssuerSerial.setX509SerialNumber(serialNumber); - return x509IssuerSerial; - } - - @Override - public VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(Date dateTime, - VerifySignatureInfo verifySignatureInfo, List supplementProfiles, - SignatureManifestCheckParams signatureManifestParams, boolean returnHashInputData, String trustProfileID, - boolean extendedValidation) { - VerifyXMLSignatureRequestImpl verifyXMLSignatureRequest = new VerifyXMLSignatureRequestImpl(); - verifyXMLSignatureRequest.setDateTime(dateTime); - verifyXMLSignatureRequest.setSignatureInfo(verifySignatureInfo); - verifyXMLSignatureRequest.setSupplementProfiles(supplementProfiles); - verifyXMLSignatureRequest.setSignatureManifestCheckParams(signatureManifestParams); - verifyXMLSignatureRequest.setReturnHashInputData(returnHashInputData); - verifyXMLSignatureRequest.setTrustProfileId(trustProfileID); - verifyXMLSignatureRequest.setExtendedValidation(extendedValidation); - return verifyXMLSignatureRequest; - } + @Override + public CreateXMLSignatureRequest createCreateXMLSignatureRequest(String keyIdentifier, + List singleSignatureInfos) { + final CreateXMLSignatureRequestImpl createXMLSignatureRequest = new CreateXMLSignatureRequestImpl(); + createXMLSignatureRequest.setKeyIdentifier(keyIdentifier); + createXMLSignatureRequest.setSingleSignatureInfos(singleSignatureInfos); + return createXMLSignatureRequest; + } + + @Override + public CreateCMSSignatureRequest createCreateCMSSignatureRequest(String keyIdentifier, + List singleSignatureInfos) { + final CreateCMSSignatureRequestImpl createCMSSignatureRequest = new CreateCMSSignatureRequestImpl(); + createCMSSignatureRequest.setKeyIdentifier(keyIdentifier); + createCMSSignatureRequest.setSingleSignatureInfos(singleSignatureInfos); + return createCMSSignatureRequest; + + } + + @Override + public CreateCMSSignatureResponse createCreateCMSSignatureResponse(List responseElements) { + final CreateCMSSignatureResponseImpl createCMSSignatureResponse = new CreateCMSSignatureResponseImpl(); + createCMSSignatureResponse.setResponseElements(responseElements); + return createCMSSignatureResponse; + } + + @Override + public CMSSignatureResponse createCMSSignatureResponse(String base64value) { + final CMSSignatureResponseImpl cmsSignatureResponse = new CMSSignatureResponseImpl(); + cmsSignatureResponse.setCMSSignature(base64value); + + return cmsSignatureResponse; + } + + @Override + public SingleSignatureInfo createSingleSignatureInfo(List dataObjectInfos, + CreateSignatureInfo createSignatureInfo, + boolean securityLayerConform) { + final SingleSignatureInfoImpl singleSignatureInfo = new SingleSignatureInfoImpl(); + singleSignatureInfo.setDataObjectInfos(dataObjectInfos); + singleSignatureInfo.setCreateSignatureInfo(createSignatureInfo); + singleSignatureInfo.setSecurityLayerConform(securityLayerConform); + return singleSignatureInfo; + } + + @Override + public at.gv.egovernment.moa.spss.api.cmssign.SingleSignatureInfo createSingleSignatureInfoCMS( + at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo dataObjectInfo, boolean securityLayerConform, + boolean isPAdESConform) { + final SingleSignatureInfoCMSImpl singleSignatureInfo = new SingleSignatureInfoCMSImpl(); + singleSignatureInfo.setDataObjectInfo(dataObjectInfo); + singleSignatureInfo.setSecurityLayerConform(securityLayerConform); + singleSignatureInfo.setPAdESConform(isPAdESConform); + return singleSignatureInfo; + } + + @Override + public DataObjectInfo createDataObjectInfo(String structure, boolean childOfManifest, Content dataObject, + CreateTransformsInfoProfile createTransformsInfoProfile) { + final DataObjectInfoImpl dataObjectInfo = new DataObjectInfoImpl(); + dataObjectInfo.setStructure(structure); + dataObjectInfo.setChildOfManifest(childOfManifest); + dataObjectInfo.setDataObject(dataObject); + dataObjectInfo.setCreateTransformsInfoProfile(createTransformsInfoProfile); + return dataObjectInfo; + } + + @Override + public at.gv.egovernment.moa.spss.api.cmssign.DataObjectInfo createDataObjectInfo(String structure, + CMSDataObject dataObject) { + final DataObjectInfoCMSImpl dataObjectInfo = new DataObjectInfoCMSImpl(); + dataObjectInfo.setStructure(structure); + dataObjectInfo.setDataObject(dataObject); + return dataObjectInfo; + } + + @Override + public CreateTransformsInfoProfile createCreateTransformsInfoProfile(String profileID) { + + final CreateTransformsInfoProfileIDImpl createTransformsInfoProfile = + new CreateTransformsInfoProfileIDImpl(); + createTransformsInfoProfile.setCreateTransformsInfoProfileID(profileID); + return createTransformsInfoProfile; + } + + @Override + public CreateTransformsInfoProfile createCreateTransformsInfoProfile(CreateTransformsInfo transformsInfo, + List supplements) { + final CreateTransformsInfoProfileExplicitImpl createTransformsInfoProfile = + new CreateTransformsInfoProfileExplicitImpl(); + createTransformsInfoProfile.setCreateTransformsInfo(transformsInfo); + createTransformsInfoProfile.setSupplements(supplements); + return createTransformsInfoProfile; + } + + @Override + public CreateTransformsInfo createCreateTransformsInfo(List transforms, MetaInfo finalDataMetaInfo) { + final CreateTransformsInfoImpl createTransformsInfo = new CreateTransformsInfoImpl(); + + createTransformsInfo.setTransforms(transforms); + createTransformsInfo.setFinalDataMetaInfo(finalDataMetaInfo); + return createTransformsInfo; + } + + @Override + public CreateSignatureInfo createCreateSignatureInfo(Content createSignatureEnvironment, + CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile) { + final CreateSignatureInfoImpl createSignatureInfo = new CreateSignatureInfoImpl(); + createSignatureInfo.setCreateSignatureEnvironment(createSignatureEnvironment); + createSignatureInfo.setCreateSignatureEnvironmentProfile(createSignatureEnvironmentProfile); + return createSignatureInfo; + } + + @Override + public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile( + CreateSignatureLocation createSignatureLocation, List supplements) { + final CreateSignatureEnvironmentProfileExplicitImpl createSignatureEnvironmentProfile = + new CreateSignatureEnvironmentProfileExplicitImpl(); + createSignatureEnvironmentProfile.setCreateSignatureLocation(createSignatureLocation); + createSignatureEnvironmentProfile.setSupplements(supplements); + return createSignatureEnvironmentProfile; + } + + @Override + public CreateSignatureLocation createCreateSignatureLocation(String signatureLocationXPath, + int signatureLocationIndex, Map namespaceDeclarations) { + final CreateSignatureLocationImpl createSignatureLocation = new CreateSignatureLocationImpl(); + createSignatureLocation.setIndex(signatureLocationIndex); + createSignatureLocation.setNamespaceDeclarations(namespaceDeclarations); + createSignatureLocation.setXPathExpression(signatureLocationXPath); + return createSignatureLocation; + } + + @Override + public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(String profileID) { + final CreateSignatureEnvironmentProfileIDImpl createSignatureEnvironmentProfile = + new CreateSignatureEnvironmentProfileIDImpl(); + createSignatureEnvironmentProfile.setCreateSignatureEnvironmentProfileID(profileID); + return createSignatureEnvironmentProfile; + } + + @Override + public CreateXMLSignatureResponse createCreateXMLSignatureResponse(List responseElements) { + final CreateXMLSignatureResponseImpl createXMLSignatureResponse = new CreateXMLSignatureResponseImpl(); + createXMLSignatureResponse.setResponseElements(responseElements); + return createXMLSignatureResponse; + } + + @Override + public SignatureEnvironmentResponse createSignatureEnvironmentResponse(Element signatureEnvironment) { + final SignatureEnvironmentResponseImpl signatureEnvironmentResponse = + new SignatureEnvironmentResponseImpl(); + signatureEnvironmentResponse.setSignatureEnvironment(signatureEnvironment); + return signatureEnvironmentResponse; + } + + @Override + public ErrorResponse createErrorResponse(int code, String info) { + final ErrorResponseImpl errorResponse = new ErrorResponseImpl(); + errorResponse.setErrorCode(code); + errorResponse.setInfo(info); + return errorResponse; + } + + @Override + public VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(int[] signatories, Date dateTime, + InputStream cmsSignature, CMSDataObject dataObject, String trustProfileID, boolean pdf) { + return this.createVerifyCMSSignatureRequest(signatories, dateTime, cmsSignature, dataObject, + trustProfileID, pdf, false); + } + + @Override + public VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(int[] signatories, Date dateTime, + InputStream cmsSignature, CMSDataObject dataObject, String trustProfileID, boolean pdf, + boolean extended) { + final VerifyCMSSignatureRequestImpl verifyCMSSignatureRequest = new VerifyCMSSignatureRequestImpl(); + verifyCMSSignatureRequest.setDateTime(dateTime); + verifyCMSSignatureRequest.setCMSSignature(cmsSignature); + verifyCMSSignatureRequest.setDataObject(dataObject); + verifyCMSSignatureRequest.setTrustProfileId(trustProfileID); + verifyCMSSignatureRequest.setSignatories(signatories); + verifyCMSSignatureRequest.setPDF(pdf); + verifyCMSSignatureRequest.setExtended(extended); + return verifyCMSSignatureRequest; + } + + @Override + public CMSDataObject createCMSDataObject(MetaInfo metaInfo, CMSContent content, + BigDecimal excludeByteRangeFrom, + BigDecimal excludeByteRangeTo) { + + final CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl(); + cmsDataObject.setMetaInfo(metaInfo); + cmsDataObject.setContent(content); + cmsDataObject.setExcludeByteRangeFrom(excludeByteRangeFrom); + cmsDataObject.setExcludeByteRangeTo(excludeByteRangeTo); + + return cmsDataObject; + } + + @Override + public CMSContent createCMSContent(InputStream binaryContent) { + final CMSContentExplicitImpl cmsContent = new CMSContentExplicitImpl(); + + cmsContent.setBinaryContent(binaryContent); + return cmsContent; + } + + @Override + public CMSContent createCMSContent(String referenceURI) { + final CMSContentReferenceImpl cmsContent = new CMSContentReferenceImpl(); + + cmsContent.setReference(referenceURI); + return cmsContent; + } + + public CMSDataObject createCMSDataObject(MetaInfo metaInfo, String referenceURI) { + final CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl(); + final CMSContentReferenceImpl cmsContent = new CMSContentReferenceImpl(); + cmsDataObject.setMetaInfo(metaInfo); + cmsContent.setReference(referenceURI); + return cmsDataObject; + } + + @Override + public VerifyCMSSignatureResponse createVerifyCMSSignatureResponse(List responseElements) { + final VerifyCMSSinatureResponseImpl verifyCMSSignatureResponse = new VerifyCMSSinatureResponseImpl(); + verifyCMSSignatureResponse.setResponseElements(responseElements); + return verifyCMSSignatureResponse; + } + + @Override + public VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement(SignerInfo signerInfo, + CheckResult signatureCheck, CheckResult certificateCheck, List adesResult, + ExtendedCertificateCheckResult extendedCertificateCheckResult, String usedAlgorithm, + Boolean coversFullDocument, + int[] byteRangeOfSignature) { + final VerifyCMSSignatureResponseElementImpl verifyCMSSignatureResponseElement = + new VerifyCMSSignatureResponseElementImpl(); + verifyCMSSignatureResponseElement.setSignerInfo(signerInfo); + verifyCMSSignatureResponseElement.setSignatureCheck(signatureCheck); + verifyCMSSignatureResponseElement.setCertificateCheck(certificateCheck); + verifyCMSSignatureResponseElement.setAdESFormResults(adesResult); + verifyCMSSignatureResponseElement.setExtendedCertificateCheck(extendedCertificateCheckResult); + verifyCMSSignatureResponseElement.setSignatureAlgorithm(usedAlgorithm); + verifyCMSSignatureResponseElement.setCoversFullDocument(coversFullDocument); + verifyCMSSignatureResponseElement.setByteRangeOfSignature(byteRangeOfSignature); + return verifyCMSSignatureResponseElement; + } + + @Override + public VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(Date dateTime, + VerifySignatureInfo verifySignatureInfo, List supplementProfiles, + SignatureManifestCheckParams signatureManifestParams, boolean returnHashInputData, + String trustProfileID) { + return this.createVerifyXMLSignatureRequest(dateTime, verifySignatureInfo, supplementProfiles, + signatureManifestParams, returnHashInputData, trustProfileID, false); + } + + @Override + public VerifySignatureInfo createVerifySignatureInfo(Content verifySignatureEnvironment, + VerifySignatureLocation verifySignatureLocation) { + final VerifySignatureInfoImpl verifySignatureInfo = new VerifySignatureInfoImpl(); + verifySignatureInfo.setVerifySignatureEnvironment(verifySignatureEnvironment); + verifySignatureInfo.setVerifySignatureLocation(verifySignatureLocation); + return verifySignatureInfo; + } + + @Override + public VerifySignatureLocation createVerifySignatureLocation(String xPathExpression, + Map namespaceDeclarations) { + final VerifySignatureLocationImpl verifySignatureLocation = new VerifySignatureLocationImpl(); + verifySignatureLocation.setXPathExpression(xPathExpression); + verifySignatureLocation.setNamespaceDeclarations(namespaceDeclarations); + return verifySignatureLocation; + } + + @Override + public SupplementProfile createSupplementProfile(String profileID) { + final SupplementProfileIDImpl supplementProfileID = new SupplementProfileIDImpl(); + supplementProfileID.setSupplementProfileID(profileID); + return supplementProfileID; + } + + @Override + public SupplementProfile createSupplementProfile(XMLDataObjectAssociation supplementProfile) { + final SupplementProfileExplicitImpl supplementProfileExplicit = new SupplementProfileExplicitImpl(); + supplementProfileExplicit.setSupplementProfile(supplementProfile); + return supplementProfileExplicit; + } + + @Override + public SignatureManifestCheckParams createSignatureManifestCheckParams(List referenceInfos, + boolean returnReferenceInputData) { + final SignatureManifestCheckParamsImpl signatureManifestCheckParams = + new SignatureManifestCheckParamsImpl(); + signatureManifestCheckParams.setReferenceInfos(referenceInfos); + signatureManifestCheckParams.setReturnReferenceInputData(returnReferenceInputData); + return signatureManifestCheckParams; + } + + @Override + public ReferenceInfo createReferenceInfo(List verifyTransformsInfoProfiles) { + final ReferenceInfoImpl referenceInfo = new ReferenceInfoImpl(); + referenceInfo.setVerifyTransformsInfoProfiles(verifyTransformsInfoProfiles); + return referenceInfo; + } + + @Override + public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(List transforms, + List transformParameters) { + final VerifyTransformsInfoProfileExplicitImpl verifyTransformsInfoProfile = + new VerifyTransformsInfoProfileExplicitImpl(); + + verifyTransformsInfoProfile.setTransforms(transforms); + verifyTransformsInfoProfile.setTransformParameters(transformParameters); + + return verifyTransformsInfoProfile; + } + + @Override + public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(String profileID) { + final VerifyTransformsInfoProfileIDImpl verifyTransformsInfoProfile = + new VerifyTransformsInfoProfileIDImpl(); + verifyTransformsInfoProfile.setVerifyTransformsInfoProfileID(profileID); + return verifyTransformsInfoProfile; + } + + @Override + public TransformParameter createTransformParameter(String URI, String digestMethod, byte[] digestValue) { + final TransformPatameterHashImpl transformParameter = new TransformPatameterHashImpl(); + transformParameter.setURI(URI); + transformParameter.setDigestMethod(digestMethod); + transformParameter.setDigestValue(digestValue); + return transformParameter; + } + + @Override + public TransformParameter createTransformParameter(String URI, InputStream binaryData) { + final TransformParameterBinaryImpl transformParameter = new TransformParameterBinaryImpl(); + transformParameter.setURI(URI); + transformParameter.setBinaryContent(binaryData); + return transformParameter; + } + + @Override + public TransformParameter createTransformParameter(String URI) { + final TransformParameterURIImpl transformParameter = new TransformParameterURIImpl(); + transformParameter.setURI(URI); + return transformParameter; + } + + @Override + public VerifyXMLSignatureResponse createVerifyXMLSignatureResponse(SignerInfo signerInfo, + List hashInputDatas, + List referenceInputDatas, ReferencesCheckResult signatureCheck, + ReferencesCheckResult signatureManifestCheck, List xmlDsigManifestChecks, CheckResult certificateCheck, + List adesFormResults, ExtendedCertificateCheckResult extCheckResult, String signatureAlgorithm) { + final VerifyXMLSignatureResponseImpl verifyXMLSignatureResponse = new VerifyXMLSignatureResponseImpl(); + verifyXMLSignatureResponse.setSignerInfo(signerInfo); + verifyXMLSignatureResponse.setHashInputDatas(hashInputDatas); + verifyXMLSignatureResponse.setReferenceInputDatas(referenceInputDatas); + verifyXMLSignatureResponse.setSignatureAlgorithm(signatureAlgorithm); + verifyXMLSignatureResponse.setSignatureCheck(signatureCheck); + verifyXMLSignatureResponse.setSignatureManifestCheck(signatureManifestCheck); + verifyXMLSignatureResponse.setXMLDsigManifestChecks(xmlDsigManifestChecks); + verifyXMLSignatureResponse.setCertificateCheck(certificateCheck); + verifyXMLSignatureResponse.setAdESFormResults(adesFormResults); + verifyXMLSignatureResponse.setExtendedCertificateCheck(extCheckResult); + return verifyXMLSignatureResponse; + } + + @Override + public ReferencesCheckResult createReferencesCheckResult(int code, ReferencesCheckResultInfo info) { + final ReferencesCheckResultImpl referencesCheckResult = new ReferencesCheckResultImpl(); + referencesCheckResult.setCode(code); + referencesCheckResult.setInfo(info); + return referencesCheckResult; + } + + @Override + public ReferencesCheckResultInfo createReferencesCheckResultInfo(NodeList anyOtherInfo, + int[] failedReferences) { + final ReferencesCheckResultInfoImpl referencesCheckResultInfo = new ReferencesCheckResultInfoImpl(); + referencesCheckResultInfo.setAnyOtherInfo(anyOtherInfo); + referencesCheckResultInfo.setFailedReferences(failedReferences); + return referencesCheckResultInfo; + } + + @Override + public ManifestRefsCheckResult createManifestRefsCheckResult(int code, ManifestRefsCheckResultInfo info) { + final ManifestRefsCheckResultImpl manifestRefsCheckResult = new ManifestRefsCheckResultImpl(); + manifestRefsCheckResult.setCode(code); + manifestRefsCheckResult.setInfo(info); + return manifestRefsCheckResult; + } + + @Override + public ManifestRefsCheckResultInfo createManifestRefsCheckResultInfo(NodeList anyOtherInfo, + int[] failedReferences, + int referringSigReference) { + final ManifestRefsCheckResultInfoImpl manifestRefsCheckResultInfo = new ManifestRefsCheckResultInfoImpl(); + manifestRefsCheckResultInfo.setAnyOtherInfo(anyOtherInfo); + manifestRefsCheckResultInfo.setReferringSignatureReference(referringSigReference); + manifestRefsCheckResultInfo.setFailedReferences(failedReferences); + return manifestRefsCheckResultInfo; + } + + @Override + public Content createContent(InputStream binaryData, String referenceURI) { + final ContentBinaryImpl content = new ContentBinaryImpl(); + content.setBinaryContent(binaryData); + content.setReference(referenceURI); + return content; + } + + @Override + public Content createContent(String locationReferenceURI, String referenceURI) { + final ContentLocRefImpl content = new ContentLocRefImpl(); + content.setLocationReferenceURI(locationReferenceURI); + content.setReference(referenceURI); + return content; + } + + @Override + public Content createContent(String referenceURI) { + final ContentReferenceImpl content = new ContentReferenceImpl(); + content.setReference(referenceURI); + return content; + } + + @Override + public Content createContent(NodeList xmlData, String referenceURI) { + final ContentXMLImpl content = new ContentXMLImpl(); + content.setXMLContent(xmlData); + content.setReference(referenceURI); + return content; + } + + @Override + public XMLDataObjectAssociation createXMLDataObjectAssociation(MetaInfo metaInfo, Content xmlContent) { + final XMLDataObjectAssociationImpl xmlDataObjectAssociation = new XMLDataObjectAssociationImpl(); + xmlDataObjectAssociation.setMetaInfo(metaInfo); + xmlDataObjectAssociation.setContent(xmlContent); + return xmlDataObjectAssociation; + } + + @Override + public MetaInfo createMetaInfo(String mimeType, String description, NodeList otherInfo, String type) { + final MetaInfoImpl metaInfo = new MetaInfoImpl(); + metaInfo.setMimeType(mimeType); + metaInfo.setDescription(description); + metaInfo.setAnyElements(otherInfo); + metaInfo.setType(type); + return metaInfo; + } + + @Override + public Transform createCanonicalizationTransform(String algorithmURI) { + final CanonicalizationTransformImpl transform = new CanonicalizationTransformImpl(algorithmURI); + return transform; + } + + @Override + public Transform createExclusiveCanonicalizationTransform(String algorithmURI, + List inclusiveNamespacePrefixes) { + final ExclusiveCanonicalizationTransformImpl transform = new ExclusiveCanonicalizationTransformImpl( + algorithmURI); + transform.setInclusiveNamespacePrefixes(inclusiveNamespacePrefixes); + return transform; + } + + @Override + public Transform createBase64Transform() { + final Base64TransformImpl transform = new Base64TransformImpl(); + return transform; + } + + @Override + public Transform createEnvelopedSignatureTransform() { + final EnvelopedSignatureTransformImpl transform = new EnvelopedSignatureTransformImpl(); + return transform; + } + + @Override + public Transform createXSLTTransform(Element styleSheet) { + final XSLTransformImpl transform = new XSLTransformImpl(); + transform.setStylesheet(styleSheet); + return transform; + } + + @Override + public Transform createXPathTransform(String xPathExpression, Map namespaceDeclarations) { + final XPathTransformImpl transform = new XPathTransformImpl(); + transform.setXPathExpression(xPathExpression); + transform.setNamespaceDelcarations(namespaceDeclarations); + return transform; + } + + @Override + public Transform createXPathFilter2Transform(List xPathFilters) { + final XPathFilter2TransformImpl transform = new XPathFilter2TransformImpl(); + transform.setFilters(xPathFilters); + return transform; + } + + @Override + public XPathFilter createXPathFilter(String filterType, String xPathExpression, Map namespaceDeclarations) { + final XPathFilterImpl xPathFilter = new XPathFilterImpl(); + xPathFilter.setFilterType(filterType); + xPathFilter.setXPathExpression(xPathExpression); + xPathFilter.setNamespaceDelcarations(namespaceDeclarations); + return xPathFilter; + } + + @Override + public CheckResult createCheckResult(int code, NodeList info) { + final CheckResultImpl checkResult = new CheckResultImpl(); + checkResult.setCode(code); + checkResult.setInfo(info); + return checkResult; + } + + @Override + public SignerInfo createSignerInfo(X509Certificate signerCertificate, boolean qualifiedCertificate, + boolean qcSourceTSL, boolean publicAuthority, String publicAuthorityID, boolean sscd, + boolean sscdSourceTSL, + String issuerCountryCode, Date signingTime, TslInfos tslInfos) { + final SignerInfoImpl signerInfo = new SignerInfoImpl(); + signerInfo.setSignerCertificate(signerCertificate); + signerInfo.setQualifiedCertificate(qualifiedCertificate); + signerInfo.setQCSourceTSL(qcSourceTSL); + signerInfo.setPublicAuthority(publicAuthority); + signerInfo.setPublicAuhtorityID(publicAuthorityID); + signerInfo.setSSCD(sscd); + signerInfo.setSSCDSourceTSL(sscdSourceTSL); + signerInfo.setIssuerCountryCode(issuerCountryCode); + signerInfo.setSigningTime(signingTime); + signerInfo.setTslInfos(tslInfos); + return signerInfo; + } + + @Override + public X509IssuerSerial createX509IssuerSerial(String issuerName, BigInteger serialNumber) { + final X509IssuerSerialImpl x509IssuerSerial = new X509IssuerSerialImpl(); + x509IssuerSerial.setX509IssuerName(issuerName); + x509IssuerSerial.setX509SerialNumber(serialNumber); + return x509IssuerSerial; + } + + @Override + public VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(Date dateTime, + VerifySignatureInfo verifySignatureInfo, List supplementProfiles, + SignatureManifestCheckParams signatureManifestParams, boolean returnHashInputData, + String trustProfileID, + boolean extendedValidation) { + final VerifyXMLSignatureRequestImpl verifyXMLSignatureRequest = new VerifyXMLSignatureRequestImpl(); + verifyXMLSignatureRequest.setDateTime(dateTime); + verifyXMLSignatureRequest.setSignatureInfo(verifySignatureInfo); + verifyXMLSignatureRequest.setSupplementProfiles(supplementProfiles); + verifyXMLSignatureRequest.setSignatureManifestCheckParams(signatureManifestParams); + verifyXMLSignatureRequest.setReturnHashInputData(returnHashInputData); + verifyXMLSignatureRequest.setTrustProfileId(trustProfileID); + verifyXMLSignatureRequest.setExtendedValidation(extendedValidation); + return verifyXMLSignatureRequest; + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java index 4b50d89..1fc3cdc 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import org.w3c.dom.Element; @@ -30,34 +29,36 @@ import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse; /** * Default implementation of SignatureEnvironmentResponse. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class SignatureEnvironmentResponseImpl - implements SignatureEnvironmentResponse { + 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; } + @Override public Element getSignatureEnvironment() { return signatureEnvironment; } /** * Gets the type of CreateXMLSignatureResponseElement. - * + * * @return SIGNATURE_ENVIRONMENT_RESPONSE */ + @Override public int getResponseType() { return SIGNATURE_ENVIRONMENT_RESPONSE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java index 40e87e7..4d4fb64 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,12 +31,12 @@ import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams; /** * Default implementation of SignatureManifestCheckParams. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class SignatureManifestCheckParamsImpl - implements SignatureManifestCheckParams { + implements SignatureManifestCheckParams { /** Referential information. */ private List referenceInfos; @@ -46,29 +45,31 @@ public class SignatureManifestCheckParamsImpl /** * Sets the referantial information. - * + * * @param referenceInfos The referential information. */ public void setReferenceInfos(List referenceInfos) { this.referenceInfos = - referenceInfos != null - ? Collections.unmodifiableList(new ArrayList(referenceInfos)) - : null; + referenceInfos != null + ? Collections.unmodifiableList(new ArrayList(referenceInfos)) + : null; } + @Override 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; } + @Override public boolean getReturnReferenceInputData() { return returnReferenceInputData; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java index 57a60a6..988ae00 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.security.cert.X509Certificate; @@ -32,7 +31,7 @@ import at.gv.egovernment.moa.spss.api.common.TslInfos; /** * Default implementation of SignerInfo. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -40,145 +39,161 @@ public class SignerInfoImpl implements SignerInfo { /** The signer certificate. */ private X509Certificate signerCertificate; - /** Determines, whether signerCertificate is a qualified - * certificate. */ + /** + * Determines, whether signerCertificate is a qualified + * certificate. + */ private boolean qualifiedCertificate; - /** Determines, whether signerCertificate is from a public - * authority. */ + /** + * Determines, whether signerCertificate is from a public + * authority. + */ private boolean publicAuthority; /** The public authority ID of the signerCertificate. */ private String publicAuthorityID; /** Determines, whether the signature is based on an SSCD */ private boolean sscd; - + /** Determines, if the SSCD check bases upon on TSL */ private boolean sscdSourceTSL; - + /** Determines, if the QC check bases upon on TSL */ private boolean qcSourceTSL; - + /** The certificate issuer country code */ private String issuerCountryCode; - private Date signingTime; - private TslInfos tslInfos; + private Date signingTime; + private TslInfos tslInfos; /** - * Sets the signer certificate. - * - * @param signerCertificate The signer certificate. - */ + * Sets the signer certificate. + * + * @param signerCertificate The signer certificate. + */ public void setSignerCertificate(X509Certificate signerCertificate) { this.signerCertificate = signerCertificate; } + @Override 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. + * + * @param qualifiedCertificate Is true, if the certificate is + * qualified, otherwise false. */ public void setQualifiedCertificate(boolean qualifiedCertificate) { this.qualifiedCertificate = qualifiedCertificate; } + @Override public boolean isQualifiedCertificate() { return qualifiedCertificate; } /** * Sets, whether the signature is based on an SSCS or not. - * - * @param sscd Is true, if the signature is - * based on an SSCD, otherwise false. + * + * @param sscd Is true, if the signature is based on an SSCD, + * otherwise false. */ public void setSSCD(boolean sscd) { this.sscd = sscd; } + + @Override public boolean isSSCD() { - return sscd; + return sscd; } - + public void setSSCDSourceTSL(boolean sscdSourceTSL) { - this.sscdSourceTSL = sscdSourceTSL; + this.sscdSourceTSL = sscdSourceTSL; } - + + @Override public String getSSCDSource() { - if (sscdSourceTSL) - return "TSL"; - else - return "Certificate"; + if (sscdSourceTSL) { + return "TSL"; + } else { + return "Certificate"; + } } - public Date getSigningTime() { - return signingTime; - } + @Override + public Date getSigningTime() { + return signingTime; + } - public void setSigningTime(Date signingTime) { - this.signingTime = signingTime; - } + public void setSigningTime(Date signingTime) { + this.signingTime = signingTime; + } - public void setQCSourceTSL(boolean qcSourceTSL) { - this.qcSourceTSL = qcSourceTSL; + public void setQCSourceTSL(boolean qcSourceTSL) { + this.qcSourceTSL = qcSourceTSL; } - + + @Override public String getQCSource() { - if (this.qcSourceTSL) - return "TSL"; - else - return "Certificate"; + if (this.qcSourceTSL) { + return "TSL"; + } else { + return "Certificate"; + } } - + public void setIssuerCountryCode(String issuerCountryCode) { - this.issuerCountryCode = issuerCountryCode; + this.issuerCountryCode = issuerCountryCode; } - public String getIssuerCountryCode() { - return issuerCountryCode; - } - + + @Override + public String getIssuerCountryCode() { + return issuerCountryCode; + } + /** - * 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. + * 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; } + @Override 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; } + @Override public String getPublicAuhtorityID() { return publicAuthorityID; } @Override public TslInfos getTslInfos() { - return this.tslInfos; - - } + return this.tslInfos; + } public void setTslInfos(TslInfos tslInfos) { - this.tslInfos = tslInfos; - + this.tslInfos = tslInfos; + } - - } + +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoCMSImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoCMSImpl.java index c8558dc..bbe3ea5 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoCMSImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoCMSImpl.java @@ -21,13 +21,8 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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.cmssign.DataObjectInfo; import at.gv.egovernment.moa.spss.api.cmssign.SingleSignatureInfo; @@ -38,7 +33,6 @@ public class SingleSignatureInfoCMSImpl implements SingleSignatureInfo { private DataObjectInfo dataObjectInfo = null; - private boolean securityLayerConform = true; private boolean padesConform = false; @@ -46,22 +40,25 @@ public class SingleSignatureInfoCMSImpl implements SingleSignatureInfo { this.dataObjectInfo = dataObjectInfo; } + @Override public DataObjectInfo getDataObjectInfo() { return dataObjectInfo; } + @Override public boolean isPAdESConform() { - return padesConform; + return padesConform; } public void setPAdESConform(boolean padesConform) { - this.padesConform = padesConform; + this.padesConform = padesConform; } -public void setSecurityLayerConform(boolean securityLayerConform) { + public void setSecurityLayerConform(boolean securityLayerConform) { this.securityLayerConform = securityLayerConform; } + @Override public boolean isSecurityLayerConform() { return securityLayerConform; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java index 3d43068..1fc20a0 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -45,11 +44,12 @@ public class SingleSignatureInfoImpl implements SingleSignatureInfo { public void setDataObjectInfos(List dataObjectInfos) { this.dataObjectInfos = - dataObjectInfos != null - ? Collections.unmodifiableList(new ArrayList(dataObjectInfos)) - : null; + dataObjectInfos != null + ? Collections.unmodifiableList(new ArrayList(dataObjectInfos)) + : null; } + @Override public List getDataObjectInfos() { return dataObjectInfos; } @@ -58,6 +58,7 @@ public class SingleSignatureInfoImpl implements SingleSignatureInfo { this.createSignatureInfo = createSignatureInfo; } + @Override public CreateSignatureInfo getCreateSignatureInfo() { return createSignatureInfo; } @@ -66,6 +67,7 @@ public class SingleSignatureInfoImpl implements SingleSignatureInfo { this.securityLayerConform = securityLayerConform; } + @Override public boolean isSecurityLayerConform() { return securityLayerConform; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java index 7f80388..82a1a0d 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; @@ -29,7 +28,7 @@ import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileExplicit; /** * Default implementation of SupplementProfileExplicit. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -40,22 +39,24 @@ public class SupplementProfileExplicitImpl implements SupplementProfileExplicit /** * 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; } - + + @Override public XMLDataObjectAssociation getSupplementProfile() { return supplement; } /** * Gets the type of SupplementProfile. - * + * * @return EXPLICIT_SUPPLEMENTPROFILE */ + @Override public int getSupplementProfileType() { return EXPLICIT_SUPPLEMENTPROFILE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java index e73ce60..7e64c93 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java @@ -21,39 +21,40 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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; } + @Override public String getSupplementProfileID() { return profileID; } /** * Gets the type of SupplementProfile. - * + * * @return ID_SUPPLEMENTPROFILE */ + @Override public int getSupplementProfileType() { return ID_SUPPLEMENTPROFILE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TSLConfigurationImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TSLConfigurationImpl.java index 6fa813f..cf3bfc7 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TSLConfigurationImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TSLConfigurationImpl.java @@ -21,99 +21,101 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; -import iaik.xml.crypto.utils.URI; - import java.util.ArrayList; import java.util.Date; import java.util.List; import at.gv.egovernment.moa.spss.api.common.TSLConfiguration; +import iaik.xml.crypto.utils.URI; /** * Default implementation of TSLConfiguration. - * + * * @author kstranacher */ public class TSLConfigurationImpl implements TSLConfiguration { - - - /** The EU TSL URL. */ - private String euTSLUrl; - - /** update period in milliseconds */ - private long updateSchedulePeriod; - - /** Time of the first update */ - private Date updateScheduleStartTime; - - /** Working directory */ - private String workingDirectory; - - /** Working directory */ - private URI workingDirectoryAsURI; - - private List qualifierForQC = new ArrayList(); - private List qualifierForSSCD = new ArrayList(); - + /** The EU TSL URL. */ + private String euTSLUrl; + + /** update period in milliseconds */ + private long updateSchedulePeriod; + + /** Time of the first update */ + private Date updateScheduleStartTime; + + /** Working directory */ + private String workingDirectory; + + /** Working directory */ + private URI workingDirectoryAsURI; + + private final List qualifierForQC = new ArrayList<>(); + private final List qualifierForSSCD = new ArrayList<>(); + + @Override public String getEuTSLUrl() { - return this.euTSLUrl; + return this.euTSLUrl; } + @Override public long getUpdateSchedulePeriod() { - return this.updateSchedulePeriod; + return this.updateSchedulePeriod; } + @Override public Date getUpdateScheduleStartTime() { - return this.updateScheduleStartTime; + return this.updateScheduleStartTime; } + @Override public String getWorkingDirectory() { - return this.workingDirectory; + return this.workingDirectory; } - + + @Override public URI getWorkingDirectoryAsURI() { - return this.workingDirectoryAsURI; + return this.workingDirectoryAsURI; } - public void setEuTSLUrl(String euTSLUrl) { - this.euTSLUrl = euTSLUrl; - } - - public void setUpdateSchedulePeriod(long updateSchedulePeriod) { - this.updateSchedulePeriod = updateSchedulePeriod; - } - - public void setUpdateScheduleStartTime(Date updateScheduleStartTime) { - this.updateScheduleStartTime = updateScheduleStartTime; - } - - public void setWorkingDirectory(String workingDirectory) { - this.workingDirectory = workingDirectory; - } - - public void setWorkingDirectoryURI(URI workingDirectoryAsURI) { - this.workingDirectoryAsURI = workingDirectoryAsURI; - } - - public List getQualifierForQC() { - return qualifierForQC; - } - - public List getQualifierForSSCD() { - return qualifierForSSCD; - } - - public void addQualifierForQC(java.net.URI qualifier) { - qualifierForQC.add(qualifier); - } - - public void addQualifierForSSCD(java.net.URI qualifier) { - qualifierForSSCD.add(qualifier); - } - + public void setEuTSLUrl(String euTSLUrl) { + this.euTSLUrl = euTSLUrl; + } + + public void setUpdateSchedulePeriod(long updateSchedulePeriod) { + this.updateSchedulePeriod = updateSchedulePeriod; + } + + public void setUpdateScheduleStartTime(Date updateScheduleStartTime) { + this.updateScheduleStartTime = updateScheduleStartTime; + } + + public void setWorkingDirectory(String workingDirectory) { + this.workingDirectory = workingDirectory; + } + + public void setWorkingDirectoryURI(URI workingDirectoryAsURI) { + this.workingDirectoryAsURI = workingDirectoryAsURI; + } + + @Override + public List getQualifierForQC() { + return qualifierForQC; + } + + @Override + public List getQualifierForSSCD() { + return qualifierForSSCD; + } + + public void addQualifierForQC(java.net.URI qualifier) { + qualifierForQC.add(qualifier); + } + + public void addQualifierForSSCD(java.net.URI qualifier) { + qualifierForSSCD.add(qualifier); + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java index 37a05f9..c72a445 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.common.Transform; @@ -36,13 +35,14 @@ public class TransformImpl implements Transform { /** * Sets the URI identifying the transformation algorithm. - * + * * @param algorithmURI The URI identifying the transformation algorithm. */ public void setAlgorithmURI(String algorithmURI) { this.algorithmURI = algorithmURI; } + @Override public String getAlgorithmURI() { return algorithmURI; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java index 691f3a9..915aff3 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.io.InputStream; @@ -30,35 +29,37 @@ 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 { - + 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; } + @Override public InputStream getBinaryContent() { return binaryContent; } /** * Gets the TransformParameter type. - * + * * @return BINARY_TRANSFORMPARAMETER */ + @Override public int getTransformParameterType() { return BINARY_TRANSFORMPARAMETER; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java index 1399c6e..1837d0f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java @@ -21,12 +21,11 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; /** * Default base implementation of TransformParameter. - * + * * @author Patrick Peck * @version $Id$ */ @@ -36,6 +35,7 @@ public abstract class TransformParameterImpl { /** * Sets the URI identifying the TransformParameter. + * * @param uri The URI identifying the TransformParameter. */ public void setURI(String uri) { diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java index 77810be..2671623 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java @@ -21,26 +21,26 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + extends TransformParameterImpl + implements TransformParameterURI { /** * Gets the type of TransformParameter. - * + * * @return URI_TRANSFORMPARAMETER */ + @Override public int getTransformParameterType() { return URI_TRANSFORMPARAMETER; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java index 7fcd72c..79fd640 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java @@ -21,20 +21,19 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + extends TransformParameterImpl + implements TransformParameterHash { /** The method used to calculate the digest value. */ private String digestMethod; @@ -43,34 +42,38 @@ public class TransformPatameterHashImpl /** * 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; } + @Override public String getDigestMethod() { return digestMethod; } /** * Sets the digest value. - * + * * @param digestValue The digest value. */ public void setDigestValue(byte[] digestValue) { this.digestValue = digestValue; } - + + @Override public byte[] getDigestValue() { return digestValue; } /** * Gets the type of TransformParameter. - * + * * @return HASH_TRANSFORMPARAMETER */ + @Override public int getTransformParameterType() { return HASH_TRANSFORMPARAMETER; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TslInfosImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TslInfosImpl.java index fad42e6..26905c2 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TslInfosImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TslInfosImpl.java @@ -8,55 +8,55 @@ import at.gv.egovernment.moa.spss.api.common.TslInfos; public class TslInfosImpl implements TslInfos { - private String tslServiceTypeIdentifier; - private String tslServiceTypeStatus; - private List tslServiceQualifier = new ArrayList(); - private List tslAdditionalServiceInformation = new ArrayList(); - private String tslCountry; - - public TslInfosImpl(String country, String tslServiceTypeStatus, String tslServiceTypeIdentifier, - List tslCertificateQualifier, List additionalServiceInformation) { - this.tslCountry = country; - this.tslServiceTypeStatus = tslServiceTypeStatus; - this.tslServiceTypeIdentifier = tslServiceTypeIdentifier; - - if (tslCertificateQualifier != null) { - for (URI el : tslCertificateQualifier) - this.tslServiceQualifier.add(el.toString()); - - } - - if (additionalServiceInformation != null) - this.tslAdditionalServiceInformation.addAll(additionalServiceInformation); - - } - - - @Override - public String getTslIssuerCountry() { - return tslCountry; - } - - @Override - public String getServiceTypeStatus() { - return tslServiceTypeStatus; - } - - @Override - public String getServiceTypeIdentifier() { - return tslServiceTypeIdentifier; - } - - @Override - public List getQualifiers() { - return tslServiceQualifier; - } - - - @Override - public List getAdditionalServiceInformation() { - return this.tslAdditionalServiceInformation; - - } + private final String tslServiceTypeIdentifier; + private final String tslServiceTypeStatus; + private final List tslServiceQualifier = new ArrayList<>(); + private final List tslAdditionalServiceInformation = new ArrayList<>(); + private final String tslCountry; + + public TslInfosImpl(String country, String tslServiceTypeStatus, String tslServiceTypeIdentifier, + List tslCertificateQualifier, List additionalServiceInformation) { + this.tslCountry = country; + this.tslServiceTypeStatus = tslServiceTypeStatus; + this.tslServiceTypeIdentifier = tslServiceTypeIdentifier; + + if (tslCertificateQualifier != null) { + for (final URI el : tslCertificateQualifier) { + this.tslServiceQualifier.add(el.toString()); + } + + } + + if (additionalServiceInformation != null) { + this.tslAdditionalServiceInformation.addAll(additionalServiceInformation); + } + + } + + @Override + public String getTslIssuerCountry() { + return tslCountry; + } + + @Override + public String getServiceTypeStatus() { + return tslServiceTypeStatus; + } + + @Override + public String getServiceTypeIdentifier() { + return tslServiceTypeIdentifier; + } + + @Override + public List getQualifiers() { + return tslServiceQualifier; + } + + @Override + public List getAdditionalServiceInformation() { + return this.tslAdditionalServiceInformation; + + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java index e16717d..f041835 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.io.InputStream; @@ -32,12 +31,12 @@ import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest; /** * Default implementation of VerifyCMSSignatureRequest. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class VerifyCMSSignatureRequestImpl - implements VerifyCMSSignatureRequest { + implements VerifyCMSSignatureRequest { /** The indexes of the signatories whose signature should be verified. */ private int[] signatories; @@ -49,39 +48,42 @@ public class VerifyCMSSignatureRequestImpl private InputStream cmsSignature; /** The date for which to verify the signature. */ private Date dateTime; - + private boolean pdf = false; private boolean extended = false; /** * Sets the indexes of the signatories whose signature should be verified. - * - * @param signatories 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; } + @Override 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; } + @Override public Date getDateTime() { return dateTime; } /** * Sets the CMS signature to verify. + * * @param signature The CMS signature to verify. */ public void setCMSSignature(InputStream signature) { @@ -89,48 +91,55 @@ public class VerifyCMSSignatureRequestImpl } + @Override 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; } + @Override 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; } + @Override public String getTrustProfileId() { return trustProfileId; } public void setPDF(boolean value) { - this.pdf = value; + this.pdf = value; } - + + @Override public boolean isPDF() { - return this.pdf; + return this.pdf; } -public synchronized boolean isExtended() { - return extended; -} + @Override + public synchronized boolean isExtended() { + return extended; + } -public synchronized void setExtended(boolean extended) { - this.extended = extended; -} + public synchronized void setExtended(boolean extended) { + this.extended = extended; + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java index 3ea504b..f9e8e4d 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.List; @@ -33,12 +32,12 @@ import at.gv.egovernment.moa.spss.api.common.SignerInfo; /** * Default implementation of VerifyCMSSignatureResponseElement. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class VerifyCMSSignatureResponseElementImpl - implements VerifyCMSSignatureResponseElement { + implements VerifyCMSSignatureResponseElement { /** Information about the signer certificate. */ private SignerInfo signerInfo; @@ -46,101 +45,102 @@ public class VerifyCMSSignatureResponseElementImpl private CheckResult signatureCheck; /** Information about the certificate check. */ private CheckResult certificateCheck; - + private ExtendedCertificateCheckResult extendedResult; - + private List adesResults = null; - + private String usedAlgorithm = null; - + private Boolean coversFullDocument = null; - + private int[] byteRangeOfSignature = null; - + /** * Sets a SignerInfo element according to CMS. - * + * * @param signerInfo The SignerInfo element according to CMS. */ public void setSignerInfo(SignerInfo signerInfo) { this.signerInfo = signerInfo; } + @Override 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; } + @Override 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; } + @Override public CheckResult getCertificateCheck() { return certificateCheck; } public void setAdESFormResults(List adesResults) { - this.adesResults = adesResults; + this.adesResults = adesResults; } - + + @Override public List getAdESFormResults() { - return adesResults; + return adesResults; } public void setExtendedCertificateCheck(ExtendedCertificateCheckResult r) { - this.extendedResult = r; - } - - @Override - public ExtendedCertificateCheckResult getExtendedCertificateCheck() { - return extendedResult; - } - - @Override - public String getSignatureAlgorithm() { - return usedAlgorithm; - } - - public void setSignatureAlgorithm(String usedAlgorithm) { - this.usedAlgorithm = usedAlgorithm; - } - - @Override - public Boolean getCoversFullDocument() { - return coversFullDocument; - } - - public void setCoversFullDocument(Boolean coversFullDocument) { - this.coversFullDocument = coversFullDocument; - } - - @Override - public int[] getByteRangeOfSignature() { - return byteRangeOfSignature; - } - - public void setByteRangeOfSignature(int[] byteRangeOfSignature) { - this.byteRangeOfSignature = byteRangeOfSignature; - } - - - - + this.extendedResult = r; + } + + @Override + public ExtendedCertificateCheckResult getExtendedCertificateCheck() { + return extendedResult; + } + + @Override + public String getSignatureAlgorithm() { + return usedAlgorithm; + } + + public void setSignatureAlgorithm(String usedAlgorithm) { + this.usedAlgorithm = usedAlgorithm; + } + + @Override + public Boolean getCoversFullDocument() { + return coversFullDocument; + } + + public void setCoversFullDocument(Boolean coversFullDocument) { + this.coversFullDocument = coversFullDocument; + } + + @Override + public int[] getByteRangeOfSignature() { + return byteRangeOfSignature; + } + + public void setByteRangeOfSignature(int[] byteRangeOfSignature) { + this.byteRangeOfSignature = byteRangeOfSignature; + } + } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java index 44fb474..c7fd29f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,28 +31,29 @@ import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse; /** * Default implementation of VerifyCMSSignatureResponse. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class VerifyCMSSinatureResponseImpl - implements VerifyCMSSignatureResponse { + 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; + responseElements != null + ? Collections.unmodifiableList(new ArrayList(responseElements)) + : null; } + @Override public List getResponseElements() { return responseElements; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java index d022ae4..f8ab10d 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.common.Content; @@ -30,7 +29,7 @@ import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation; /** * Default implementation of VerifySignatureInfo. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -42,28 +41,29 @@ public class VerifySignatureInfoImpl implements VerifySignatureInfo { /** * Sets the location of the signature to be verified. - * - * @param verifySignatureLocation 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; } + @Override 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. + * + * @param verifySignatureEnvironment The signature environment containing the + * signature to be verified. */ public void setVerifySignatureEnvironment(Content verifySignatureEnvironment) { this.verifySignatureEnvironment = verifySignatureEnvironment; } + @Override public Content getVerifySignatureEnvironment() { return verifySignatureEnvironment; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java index 8e183bb..7f3b381 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java @@ -21,19 +21,18 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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 { + extends ElementSelectorImpl + implements VerifySignatureLocation { } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java index 25b5c39..d1eebca 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,7 +31,7 @@ import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo; /** * Default implementation of . - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -42,18 +41,19 @@ public class VerifyTransformsDataImpl implements ReferenceInfo { /** * Sets the information about the transformations contained in the signature. - * + * * @param verifyTransformsInfoProfiles The profiles containing transformation - * information. + * information. */ public void setVerifyTransformsInfoProfiles(List verifyTransformsInfoProfiles) { this.verifyTransformsInfoProfiles = - verifyTransformsInfoProfiles != null - ? Collections.unmodifiableList( - new ArrayList(verifyTransformsInfoProfiles)) - : null; + verifyTransformsInfoProfiles != null + ? Collections.unmodifiableList( + new ArrayList(verifyTransformsInfoProfiles)) + : null; } + @Override public List getVerifyTransformsInfoProfiles() { return verifyTransformsInfoProfiles; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java index 2ce5f39..0e1e46e 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -32,12 +31,12 @@ import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExpli /** * Default implementation of VerifyTransformsInfoProfileExplicit. - * + * * @author Fatemeh Philippi * @version $Id$ */ public class VerifyTransformsInfoProfileExplicitImpl - implements VerifyTransformsInfoProfileExplicit { + implements VerifyTransformsInfoProfileExplicit { /** The transforms contained in this profile. */ private List transforms; @@ -46,38 +45,41 @@ public class VerifyTransformsInfoProfileExplicitImpl /** * 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; + transforms != null + ? Collections.unmodifiableList(new ArrayList(transforms)) + : null; } + @Override 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); } + @Override public List getTransformParameters() { return transformParameters; } /** * Gets the type of VerifyTransformsInfoProfile. - * + * * @return EXPLICIT_VERIFYTRANSFORMSINFOPROFILE */ + @Override public int getVerifyTransformsInfoProfileType() { return EXPLICIT_VERIFYTRANSFORMSINFOPROFILE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java index a545535..56fc9e2 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java @@ -21,14 +21,13 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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$ */ @@ -39,22 +38,24 @@ public class VerifyTransformsInfoProfileIDImpl implements VerifyTransformsInfoPr /** * Sets the profile ID. - * + * * @param profileID The profile ID. */ public void setVerifyTransformsInfoProfileID(String profileID) { this.verifyTransformsInfoProfileID = profileID; } + @Override public String getVerifyTransformsInfoProfileID() { return verifyTransformsInfoProfileID; } /** * Gets the type of VerifyTransformsInfoProfile. - * + * * @return ID_VERIFYTRANSFORMSINFOPROFILE */ + @Override public int getVerifyTransformsInfoProfileType() { return ID_VERIFYTRANSFORMSINFOPROFILE; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java index 91d1917..b5094b4 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java @@ -34,118 +34,120 @@ 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; - private boolean extendedValidation; - /** - * 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; - } - - public synchronized void setExtendedValidation(boolean extendedValidation) { - this.extendedValidation = extendedValidation; - } - - @Override - public boolean getExtendedValidaiton() { - return extendedValidation; - } + /** 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; + private boolean extendedValidation; + /** + * 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; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + public String getTrustProfileId() { + return trustProfileId; + } + + public synchronized void setExtendedValidation(boolean extendedValidation) { + this.extendedValidation = extendedValidation; + } + + @Override + public boolean getExtendedValidaiton() { + return extendedValidation; + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java index 0047d44..85af8d4 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java @@ -39,165 +39,168 @@ import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse; */ public class VerifyXMLSignatureResponseImpl implements VerifyXMLSignatureResponse { - /** Information about the signer certificate. */ - private SignerInfo signerInfo; - - private ExtendedCertificateCheckResult extendedResult; - - /** - * The hash input data objects. The list consists of - * {@link at.gv.egovernment.moa.spss.api.common.InputData}s. - */ - private List hashInputDatas = new ArrayList(); - - /** - * The reference input data objects. The list consists of - * {@link at.gv.egovernment.moa.spss.api.common.InputData}s. - */ - private List referenceInputDatas = new ArrayList(); - - /** - * The list of form validation results - */ - private List adesFormResults = 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; - - private String signatureAlgorithm = null; - - /** - * 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; - } - - public void setAdESFormResults(List adesFormResults) { - this.adesFormResults = adesFormResults; - } - - @Override - public List getAdESFormResults() { - return this.adesFormResults; - } - - public void setExtendedCertificateCheck(ExtendedCertificateCheckResult r) { - this.extendedResult = r; - } - - @Override - public ExtendedCertificateCheckResult getExtendedCertificateCheck() { - return extendedResult; - } - - public String getSignatureAlgorithm() { - return signatureAlgorithm; - } - - public void setSignatureAlgorithm(String signatureAlgorithm) { - this.signatureAlgorithm = signatureAlgorithm; - } - - + /** Information about the signer certificate. */ + private SignerInfo signerInfo; + + private ExtendedCertificateCheckResult extendedResult; + + /** + * The hash input data objects. The list consists of + * {@link at.gv.egovernment.moa.spss.api.common.InputData}s. + */ + private List hashInputDatas = new ArrayList(); + + /** + * The reference input data objects. The list consists of + * {@link at.gv.egovernment.moa.spss.api.common.InputData}s. + */ + private List referenceInputDatas = new ArrayList(); + + /** + * The list of form validation results + */ + private List adesFormResults = 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; + + private String signatureAlgorithm = null; + + /** + * Sets information about the signer certificate. + * + * @param signerInfo Information about the signer certificate. + */ + public void setSignerInfo(SignerInfo signerInfo) { + this.signerInfo = signerInfo; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + 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; + } + + @Override + public List getXMLDsigManifestChecks() { + return xmlDsigManifestChecks; + } + + public void setAdESFormResults(List adesFormResults) { + this.adesFormResults = adesFormResults; + } + + @Override + public List getAdESFormResults() { + return this.adesFormResults; + } + + public void setExtendedCertificateCheck(ExtendedCertificateCheckResult r) { + this.extendedResult = r; + } + + @Override + public ExtendedCertificateCheckResult getExtendedCertificateCheck() { + return extendedResult; + } + + @Override + public String getSignatureAlgorithm() { + return signatureAlgorithm; + } + + public void setSignatureAlgorithm(String signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + } + } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java index aff7e10..ac2886c 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.math.BigInteger; @@ -30,7 +29,7 @@ import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial; /** * Default implementation of X509IssuerSerial. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -42,26 +41,28 @@ public class X509IssuerSerialImpl implements X509IssuerSerial { /** * Sets the issuer distinguished name. - * + * * @param x509IssuerName The issuer distinguished name. */ public void setX509IssuerName(String x509IssuerName) { this.x509IssuerName = x509IssuerName; } + @Override public String getX509IssuerName() { return x509IssuerName; } /** * Sets the certificate serial number. - * + * * @param x509SerialNumber The issuer serial number. */ public void setX509SerialNumber(BigInteger x509SerialNumber) { this.x509SerialNumber = x509SerialNumber; } + @Override public BigInteger getX509SerialNumber() { return x509SerialNumber; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java index dabf29d..7769e5a 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import at.gv.egovernment.moa.spss.api.common.Content; @@ -30,7 +29,7 @@ import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation; /** * Default implementation of XMLDataObjectAssociation. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -43,25 +42,28 @@ public class XMLDataObjectAssociationImpl implements XMLDataObjectAssociation { /** * Sets meta information about the Content object. + * * @param metaInfo Meta information about the Content object. */ public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } + @Override 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; } + @Override public Content getContent() { return content; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java index 175de3a..9eb4df1 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.ArrayList; @@ -31,17 +30,17 @@ 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 { - + extends TransformImpl + implements XPathFilter2Transform { + /** The XPath filters. */ private List filters; - + /** * Create a new XPathFilter2TransformImpl object. */ @@ -50,16 +49,16 @@ public class XPathFilter2TransformImpl } /** - * Sets the XPath filters contained in this - * XPathFilter2Transform. - * - * @param filters The XPath filters contained in this - * XPathFilter2Transform. - */ + * 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); } + @Override public List getFilters() { return filters; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java index 6615e9f..800270f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.HashMap; @@ -31,7 +30,7 @@ import at.gv.egovernment.moa.spss.api.common.XPathFilter; /** * Default implementation of XPathFilter. - * + * * @author Fatemeh Philippi * @version $Id$ */ @@ -40,47 +39,51 @@ public class XPathFilterImpl implements XPathFilter { private String filterType; /** The XPath expression of the filter. */ private String xPathExpression; - /** The namespace prefix to URI mapping to while evaluating the XPath - * expression. */ + /** + * 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; } + @Override 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; } + @Override public String getXPathExpression() { return xPathExpression; } /** - * Sets the namespace prefix to URI mapping to while evaluating the XPath + * 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. + * + * @param namespaceDeclarations The namespace prefix to URI mapping to while + * evaluating the XPath expression. */ public void setNamespaceDelcarations(Map namespaceDeclarations) { this.namespaceDeclarations = namespaceDeclarations; } + @Override public Map getNamespaceDeclarations() { return namespaceDeclarations; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java index f626a95..92f7170 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import java.util.HashMap; @@ -31,18 +30,19 @@ 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 { - + extends TransformImpl + implements XPathTransform { + /** The XPath expression to evaluate. */ private String xPathExpression; - /** The namespace prefix to URI mapping to while evaluating the XPath - * expression. */ + /** + * The namespace prefix to URI mapping to while evaluating the XPath expression. + */ private Map namespaceDeclarations = new HashMap(); /** @@ -54,28 +54,30 @@ public class XPathTransformImpl /** * Sets the XPath expression to evaluate. - * + * * @param xPathExpression The XPath expression to evaluate. */ public void setXPathExpression(String xPathExpression) { this.xPathExpression = xPathExpression; } + @Override public String getXPathExpression() { return xPathExpression; } /** - * Sets the namespace prefix to URI mapping to while evaluating the XPath + * 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. + * + * @param namespaceDeclarations The namespace prefix to URI mapping to while + * evaluating the XPath expression. */ public void setNamespaceDelcarations(Map namespaceDeclarations) { this.namespaceDeclarations = namespaceDeclarations; } + @Override public Map getNamespaceDeclarations() { return namespaceDeclarations; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java index 3fd4cc1..5995c73 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api.impl; import org.w3c.dom.Element; @@ -30,14 +29,14 @@ 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. */ @@ -47,13 +46,14 @@ public class XSLTransformImpl extends TransformImpl implements XSLTTransform { /** * Sets the XSLT stylesheet to apply. - * + * * @param styleSheet The XSLT stylesheet to apply. */ public void setStylesheet(Element styleSheet) { this.styleSheet = styleSheet; } + @Override public Element getStylesheet() { return styleSheet; } -- cgit v1.2.3