diff options
author | Klaus Stranacher <kstranacher@iaik.tugraz.at> | 2013-10-11 13:35:17 +0200 |
---|---|---|
committer | Klaus Stranacher <kstranacher@iaik.tugraz.at> | 2013-10-11 13:35:17 +0200 |
commit | a4e0294f2253fcec13aad360fe6c165b005083c8 (patch) | |
tree | 112f5946155d777eace205197633d5e86853017d /spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java | |
parent | 3490573657837a16319d0eca654decd9b76b8916 (diff) | |
download | moa-id-spss-a4e0294f2253fcec13aad360fe6c165b005083c8.tar.gz moa-id-spss-a4e0294f2253fcec13aad360fe6c165b005083c8.tar.bz2 moa-id-spss-a4e0294f2253fcec13aad360fe6c165b005083c8.zip |
Update CreateCMSSignatureRequest (ExcludeByteRange added)
Diffstat (limited to 'spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java')
-rw-r--r-- | spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java index d50a17ffc..6209d8ef9 100644 --- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java +++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java @@ -25,6 +25,7 @@ package at.gv.egovernment.moa.spss.api.xmlbind; import java.io.InputStream; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -65,6 +66,9 @@ public class VerifyCMSSignatureRequestParser { private static final String META_INFO_XPATH = MOA + "MetaInfo"; private static final String CONTENT_XPATH = MOA + "Content"; private static final String BASE64_CONTENT_XPATH = MOA + "Base64Content"; + private static final String EXCLUDEBYTERANGE_FROM_XPATH = MOA + "ExcludedByteRange/" + MOA + "From"; + private static final String EXCLUDEBYTERANGE_TO_XPATH = MOA + "ExcludedByteRange/" + MOA + "To"; + /** The <code>SPSSFactory</code> for creating new API objects. */ private SPSSFactory factory = SPSSFactory.getInstance(); @@ -161,7 +165,20 @@ public class VerifyCMSSignatureRequestParser { metaInfo = RequestParserUtils.parseMetaInfo(metaInfoElem); } - return factory.createCMSDataObject(metaInfo, content); + String excludeByteRangeFromStr = XPathUtils.getElementValue(dataObjectElem, EXCLUDEBYTERANGE_FROM_XPATH, null); + String excludeByteRangeToStr = XPathUtils.getElementValue(dataObjectElem, EXCLUDEBYTERANGE_TO_XPATH, null); + + BigDecimal excludeByteRangeFrom = null; + BigDecimal excludeByteRangeTo = null; + + if (excludeByteRangeFromStr != null) + excludeByteRangeFrom = new BigDecimal(excludeByteRangeFromStr); + if (excludeByteRangeToStr != null) + excludeByteRangeTo = new BigDecimal(excludeByteRangeToStr); + + return factory.createCMSDataObject(metaInfo, content, excludeByteRangeFrom, excludeByteRangeTo); + + } else { return null; } |