aboutsummaryrefslogtreecommitdiff
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
parent6959228c5c557df0204a2902807b35d90063b600 (diff)
downloadmoa-zs-5e6304ee003285793c0992a81e424969a2a6af88.tar.gz
moa-zs-5e6304ee003285793c0992a81e424969a2a6af88.tar.bz2
moa-zs-5e6304ee003285793c0992a81e424969a2a6af88.zip
Move Services / Clients To Dedicated Packages
-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
-rw-r--r--src/test/java/at/gv/egiz/moazs/MzsServiceTest.java (renamed from src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java)6
-rw-r--r--src/test/resources/at/gv/egiz/moazs/MzsServiceTest/formallyIncorrectDeliveryRequest.soap (renamed from src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/formallyIncorrectDeliveryRequest.soap)0
-rw-r--r--src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingAppDeliveryId.soap (renamed from src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingAppDeliveryId.soap)0
-rw-r--r--src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingMetaData.soap (renamed from src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingMetaData.soap)0
-rw-r--r--src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingSender.soap (renamed from src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingSender.soap)0
-rw-r--r--src/test/resources/at/gv/egiz/moazs/MzsServiceTest/profileAndCorporateBody.soap (renamed from src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/profileAndCorporateBody.soap)0
-rw-r--r--src/test/resources/at/gv/egiz/moazs/MzsServiceTest/validDeliveryRequest.soap (renamed from src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/validDeliveryRequest.soap)0
11 files changed, 19 insertions, 18 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);
}
diff --git a/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java b/src/test/java/at/gv/egiz/moazs/MzsServiceTest.java
index 2d4d65f..579051d 100644
--- a/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java
+++ b/src/test/java/at/gv/egiz/moazs/MzsServiceTest.java
@@ -33,13 +33,13 @@ import static org.junit.Assert.assertEquals;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
-public class App2MzsServiceTest {
+public class MzsServiceTest {
private final String serviceUri = "http://localhost:8080/services/DeliveryRequest";
- private final String basePath = "src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/";
+ private final String basePath = "src/test/resources/at/gv/egiz/moazs/MzsServiceTest/";
- private final static Logger logger = LoggerFactory.getLogger(App2MzsServiceTest.class);
+ private final static Logger logger = LoggerFactory.getLogger(MzsServiceTest.class);
@TestConfiguration
public static class TestConfig {
diff --git a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/formallyIncorrectDeliveryRequest.soap b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/formallyIncorrectDeliveryRequest.soap
index 0570005..0570005 100644
--- a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/formallyIncorrectDeliveryRequest.soap
+++ b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/formallyIncorrectDeliveryRequest.soap
diff --git a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingAppDeliveryId.soap b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingAppDeliveryId.soap
index e481caa..e481caa 100644
--- a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingAppDeliveryId.soap
+++ b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingAppDeliveryId.soap
diff --git a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingMetaData.soap b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingMetaData.soap
index cf55d6d..cf55d6d 100644
--- a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingMetaData.soap
+++ b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingMetaData.soap
diff --git a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingSender.soap b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingSender.soap
index 62cda34..62cda34 100644
--- a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingSender.soap
+++ b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/missingSender.soap
diff --git a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/profileAndCorporateBody.soap b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/profileAndCorporateBody.soap
index 3e52062..3e52062 100644
--- a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/profileAndCorporateBody.soap
+++ b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/profileAndCorporateBody.soap
diff --git a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/validDeliveryRequest.soap b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/validDeliveryRequest.soap
index 519749c..519749c 100644
--- a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/validDeliveryRequest.soap
+++ b/src/test/resources/at/gv/egiz/moazs/MzsServiceTest/validDeliveryRequest.soap