From 8e36fa01ea42d282eacdc78d6749daf9ae1ede9c Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Tue, 9 Jul 2019 11:13:35 +0200 Subject: 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. --- .../moazs/util/StoreSOAPBodyBinaryInRepositoryInterceptor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/gv/egiz/moazs/util') 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> idGenerators; - private final BinaryRepository repository; + private final DeliveryRepository repository; @Autowired public StoreSOAPBodyBinaryInRepositoryInterceptor(CXFMessageUtils extractor, SOAPUtils soapUtils, Map> 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: {}. ", -- cgit v1.2.3