aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/DeliveryRequestHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/DeliveryRequestHandler.java')
-rw-r--r--src/main/java/at/gv/egiz/moazs/DeliveryRequestHandler.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/DeliveryRequestHandler.java b/src/main/java/at/gv/egiz/moazs/DeliveryRequestHandler.java
index c5ecdb5..16235cf 100644
--- a/src/main/java/at/gv/egiz/moazs/DeliveryRequestHandler.java
+++ b/src/main/java/at/gv/egiz/moazs/DeliveryRequestHandler.java
@@ -2,23 +2,36 @@ package at.gv.egiz.moazs;
import at.gv.e_government.reference.namespace.zustellung.mzs.app2mzs_.DeliveryRequestType;
import at.gv.e_government.reference.namespace.zustellung.mzs.app2mzs_.DeliveryResponseType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+import javax.xml.bind.JAXBElement;
import java.util.function.Function;
@Component
public class DeliveryRequestHandler implements Function<DeliveryRequestType, DeliveryResponseType> {
+ private static final Logger logger = LoggerFactory.getLogger(DeliveryRequestHandler.class);
+
+ @Autowired
+ private RedisRepository repository;
/**
* Handles the Delivery Request
*/
@Override
- public DeliveryResponseType apply(DeliveryRequestType deliveryRequestType) {
+ public DeliveryResponseType apply(DeliveryRequestType deliveryRequest) {
+
+ var deliveryId = deliveryRequest.getMetaData().getAppDeliveryID();
+ logger.info(String.format("Received Request with AppDeliveryID = %s", deliveryId));
//check if DR is complete
- //
+
+ //store delivery request
+ repository.add(deliveryRequest);
return null;
}