aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-15 15:44:44 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-15 15:45:24 +0200
commit5e6304ee003285793c0992a81e424969a2a6af88 (patch)
tree57f22b3c60156dcf413f13a35d64d664df8bf492 /src/main/java/at/gv/egiz
parent6959228c5c557df0204a2902807b35d90063b600 (diff)
downloadmoa-zs-5e6304ee003285793c0992a81e424969a2a6af88.tar.gz
moa-zs-5e6304ee003285793c0992a81e424969a2a6af88.tar.bz2
moa-zs-5e6304ee003285793c0992a81e424969a2a6af88.zip
Move Services / Clients To Dedicated Packages
Diffstat (limited to 'src/main/java/at/gv/egiz')
-rw-r--r--src/main/java/at/gv/egiz/moazs/MoaZS.java (renamed from src/main/java/at/gv/egiz/moazs/MzsApp.java)4
-rw-r--r--src/main/java/at/gv/egiz/moazs/config/MzsServiceConfig.java (renamed from src/main/java/at/gv/egiz/moazs/config/App2MzsServiceConfig.java)8
-rw-r--r--src/main/java/at/gv/egiz/moazs/mzs/MzsClient.java (renamed from src/main/java/at/gv/egiz/moazs/Mzs2AppClient.java)4
-rw-r--r--src/main/java/at/gv/egiz/moazs/mzs/MzsService.java (renamed from src/main/java/at/gv/egiz/moazs/App2MzsService.java)15
4 files changed, 16 insertions, 15 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/MzsApp.java b/src/main/java/at/gv/egiz/moazs/MoaZS.java
index 6b4e34b..3009745 100644
--- a/src/main/java/at/gv/egiz/moazs/MzsApp.java
+++ b/src/main/java/at/gv/egiz/moazs/MoaZS.java
@@ -5,9 +5,9 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
-public class MzsApp {
+public class MoaZS {
public static void main(String[] args) {
- SpringApplication.run(MzsApp.class, args);
+ SpringApplication.run(MoaZS.class, args);
}
}
diff --git a/src/main/java/at/gv/egiz/moazs/config/App2MzsServiceConfig.java b/src/main/java/at/gv/egiz/moazs/config/MzsServiceConfig.java
index 9bf03fb..713c616 100644
--- a/src/main/java/at/gv/egiz/moazs/config/App2MzsServiceConfig.java
+++ b/src/main/java/at/gv/egiz/moazs/config/MzsServiceConfig.java
@@ -1,6 +1,6 @@
package at.gv.egiz.moazs.config;
-import at.gv.egiz.moazs.App2MzsService;
+import at.gv.egiz.moazs.mzs.MzsService;
import at.gv.zustellung.app2mzs.xsd.App2Mzs;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
@@ -11,12 +11,12 @@ import org.springframework.context.annotation.Configuration;
import javax.xml.ws.Endpoint;
@Configuration
-public class App2MzsServiceConfig {
+public class MzsServiceConfig {
@Bean
@Autowired
- public Endpoint endpoint(Bus bus, App2MzsService app2mzsService, App2Mzs app2mzs) {
- EndpointImpl endpoint = new EndpointImpl(bus, app2mzsService);
+ public Endpoint endpoint(Bus bus, MzsService mzsService, App2Mzs app2mzs) {
+ EndpointImpl endpoint = new EndpointImpl(bus, mzsService);
endpoint.setAddress("/");
endpoint.setServiceName(app2mzs.getServiceName());
endpoint.setWsdlLocation(app2mzs.getWSDLDocumentLocation().toString());
diff --git a/src/main/java/at/gv/egiz/moazs/Mzs2AppClient.java b/src/main/java/at/gv/egiz/moazs/mzs/MzsClient.java
index a7a52bf..5785703 100644
--- a/src/main/java/at/gv/egiz/moazs/Mzs2AppClient.java
+++ b/src/main/java/at/gv/egiz/moazs/mzs/MzsClient.java
@@ -1,10 +1,10 @@
-package at.gv.egiz.moazs;
+package at.gv.egiz.moazs.mzs;
import at.gv.zustellung.msg.xsd.DeliveryRequestStatusType;
import org.springframework.stereotype.Component;
@Component
-public class Mzs2AppClient {
+public class MzsClient {
public void sendNotification(DeliveryRequestStatusType status) {
throw new UnsupportedOperationException("Not implemented.");
diff --git a/src/main/java/at/gv/egiz/moazs/App2MzsService.java b/src/main/java/at/gv/egiz/moazs/mzs/MzsService.java
index 19eb856..774f7f4 100644
--- a/src/main/java/at/gv/egiz/moazs/App2MzsService.java
+++ b/src/main/java/at/gv/egiz/moazs/mzs/MzsService.java
@@ -1,5 +1,6 @@
-package at.gv.egiz.moazs;
+package at.gv.egiz.moazs.mzs;
+import at.gv.egiz.moazs.MoaZSException;
import at.gv.egiz.moazs.pipeline.DeliveryPipeline;
import at.gv.egiz.moazs.preprocess.DeliveryRequestAugmenter;
import at.gv.egiz.moazs.repository.DeliveryRepository;
@@ -25,21 +26,21 @@ import static java.util.concurrent.CompletableFuture.supplyAsync;
//todo : validate Schema in both directions.
@Service
@SchemaValidation(type = SchemaValidation.SchemaValidationType.IN)
-public class App2MzsService implements App2MzsPortType {
+public class MzsService implements App2MzsPortType {
- private static final Logger logger = LoggerFactory.getLogger(App2MzsService.class);
+ private static final Logger logger = LoggerFactory.getLogger(MzsService.class);
//TODO move timeout and namespaces to config
private static final int TIMEOUT_FOR_ANWSER = 10;
private final DeliveryRepository repository;
private final DeliveryPipeline pipeline;
- private final Mzs2AppClient appClient;
+ private final MzsClient appClient;
private final DeliveryRequestAugmenter augmenter;
@Autowired
- public App2MzsService(DeliveryRepository repository, DeliveryPipeline pipeline, Mzs2AppClient appClient,
- DeliveryRequestAugmenter augmenter) {
+ public MzsService(DeliveryRepository repository, DeliveryPipeline pipeline, MzsClient appClient,
+ DeliveryRequestAugmenter augmenter) {
this.repository = repository;
this.pipeline = pipeline;
this.appClient = appClient;
@@ -65,7 +66,7 @@ public class App2MzsService implements App2MzsPortType {
return generatePartialSuccessResponse(appDeliveryID);
} catch (Exception e ) {
- var message = format("An error occurred while processing DeliveryRequest with AppDeliveryID=%s. ", appDeliveryID);
+ var message = format("An error occurred while processing DeliveryRequest with AppDeliveryID=%s.", appDeliveryID);
throw new MoaZSException(message, e);
}