diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-09 11:13:35 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-09 11:13:35 +0200 |
commit | 8e36fa01ea42d282eacdc78d6749daf9ae1ede9c (patch) | |
tree | ee691b4ec4a522c0b35c8251d3422702b90d2073 /src/main/java/at/gv/egiz/moazs/util | |
parent | d8c668bbca31a835c387a3d52293c9938c424f58 (diff) | |
download | moa-zs-8e36fa01ea42d282eacdc78d6749daf9ae1ede9c.tar.gz moa-zs-8e36fa01ea42d282eacdc78d6749daf9ae1ede9c.tar.bz2 moa-zs-8e36fa01ea42d282eacdc78d6749daf9ae1ede9c.zip |
Refactor: Merge BinaryRepository into DeliveryRepository
- Reason: Components, which rely on one of those, usually also rely on
the other, so merging them reduces amount of dependencies.
- Frame operations in DeliveryRepository API as "store" and "retrieve"
operations.
- Rename: Convert *Id in local variable names to upper case.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/util')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/util/StoreSOAPBodyBinaryInRepositoryInterceptor.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/util/StoreSOAPBodyBinaryInRepositoryInterceptor.java b/src/main/java/at/gv/egiz/moazs/util/StoreSOAPBodyBinaryInRepositoryInterceptor.java index 39566fe..88ab7e0 100644 --- a/src/main/java/at/gv/egiz/moazs/util/StoreSOAPBodyBinaryInRepositoryInterceptor.java +++ b/src/main/java/at/gv/egiz/moazs/util/StoreSOAPBodyBinaryInRepositoryInterceptor.java @@ -1,6 +1,6 @@ package at.gv.egiz.moazs.util; -import at.gv.egiz.moazs.repository.BinaryRepository; +import at.gv.egiz.moazs.repository.DeliveryRepository; import at.gv.egiz.moazs.scheme.SOAPUtils; import org.apache.cxf.message.Message; import org.apache.cxf.phase.AbstractPhaseInterceptor; @@ -28,12 +28,12 @@ public class StoreSOAPBodyBinaryInRepositoryInterceptor extends AbstractPhaseInt private final CXFMessageUtils messageUtils; private final SOAPUtils soapUtils; private final Map<String, Function<String, String>> idGenerators; - private final BinaryRepository repository; + private final DeliveryRepository repository; @Autowired public StoreSOAPBodyBinaryInRepositoryInterceptor(CXFMessageUtils extractor, SOAPUtils soapUtils, Map<String, Function<String, String>> idGenerators, - BinaryRepository repository) { + DeliveryRepository repository) { super(Phase.RECEIVE); this.messageUtils = extractor; this.soapUtils = soapUtils; @@ -60,12 +60,12 @@ public class StoreSOAPBodyBinaryInRepositoryInterceptor extends AbstractPhaseInt String rootTag = document.getTagName(); if (!idGenerators.containsKey(rootTag)) { - log.trace("Will not add message of type {}. ", rootTag); + log.trace("Will not store message of type {}. ", rootTag); return; } var id = idGenerators.get(rootTag).apply(appDeliveryID); - repository.add(id, response); + repository.store(id, response); if(log.isTraceEnabled()) { log.trace("Msg Response with AppDeliveryID={} unwrapped and stored: {}. ", |