diff options
author | Thomas <> | 2023-05-31 09:55:26 +0200 |
---|---|---|
committer | Thomas <> | 2023-05-31 09:55:26 +0200 |
commit | b182f8ec4d0cf247a6846408f37bfe3a28d71342 (patch) | |
tree | 7967a5435486da8d51b350235d49ae50008b06d6 | |
parent | b8807c30b2ef988226573c6b5bf2f6b3de6aac4d (diff) | |
download | EAAF-Components-b182f8ec4d0cf247a6846408f37bfe3a28d71342.tar.gz EAAF-Components-b182f8ec4d0cf247a6846408f37bfe3a28d71342.tar.bz2 EAAF-Components-b182f8ec4d0cf247a6846408f37bfe3a28d71342.zip |
feat(core): add remove method to IPendingRequest interface
3 files changed, 19 insertions, 2 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java index a4f60ddc..27b032e3 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java @@ -583,6 +583,11 @@ public abstract class RequestImpl implements IRequest, Serializable { } + public final void removeRawDataFromTransaction(String key) { + genericDataStorage.remove(key); + + } + private String objectSaveJsonSerialization(Object object) throws EaafStorageException { try { return DefaultJsonMapper.serialize(RawDataHolder.builder() diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java index b3f733d1..cc620dc8 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java @@ -297,6 +297,12 @@ public class TestRequestImpl implements IRequest { } @Override + public void removeRawDataFromTransaction(String key) { + storage.remove(key); + + } + + @Override public void setRawDataToTransaction(final Map<String, Object> map) throws EaafStorageException { storage.putAll(map); @@ -399,5 +405,4 @@ public class TestRequestImpl implements IRequest { this.currentlyInIframe = flag; } - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java index 05b7784e..e10ec716 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java @@ -113,10 +113,17 @@ public interface IRequest extends Serializable { void setRawDataToTransaction(Map<String, Object> map) throws EaafStorageException; /** + * Remove a generic data-object from pending request with a specific identifier. + * + * @param key Identifier for this data-object + */ + void removeRawDataFromTransaction(String key); + + /** * Wrap the internal dataStorage map into a DAO. * * @param wrapper DOA to access SessionData - * @param <T> Response class type + * @param <T> Response class type * @return */ @Nonnull |