aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-08-30 13:36:20 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-08-30 13:36:20 +0200
commitc048d2ee787197b963dc1e8fa9297cf1cd3a4307 (patch)
treeda6e35c3876c2c6b0cb7a42ae00bfef29a2525a6
parentfce637395dc821611f33b54aeaefa26e0b2c4175 (diff)
downloadmoa-zs-c048d2ee787197b963dc1e8fa9297cf1cd3a4307.tar.gz
moa-zs-c048d2ee787197b963dc1e8fa9297cf1cd3a4307.tar.bz2
moa-zs-c048d2ee787197b963dc1e8fa9297cf1cd3a4307.zip
Fix Tnvz Typo
- sed 's/tvnz/tnvz/'
-rw-r--r--docs/spec.md4
-rw-r--r--src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java4
-rw-r--r--src/main/java/at/gv/egiz/moazs/client/TnvzHelper.java28
-rw-r--r--src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java2
-rw-r--r--src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml2
-rw-r--r--src/test/resources/config/application.yaml6
6 files changed, 23 insertions, 23 deletions
diff --git a/docs/spec.md b/docs/spec.md
index 042d959..7854499 100644
--- a/docs/spec.md
+++ b/docs/spec.md
@@ -46,7 +46,7 @@ Due to the nature of the changes (feature additions and feature removals in [zus
This choice allows to pass a `p:Identification` element instead of the `Person`-`Address` sequence.
The choice was added because it is a new, optional feature in [zusemsg].
This change is *backwards-compatible*.
-- The optional element `tvnz:AustrianAddressesOnly` was added to `DeliveryRequest/Receiver` because this element was also added as an optional element to [zusetnvz].
+- The optional element `tnvz:AustrianAddressesOnly` was added to `DeliveryRequest/Receiver` because this element was also added as an optional element to [zusetnvz].
This change is *backwards-compatible*.
- The optional element `msg:AdditionalCriteria` and `msg:PreAdviceNote` were added to `DeliveryRequest/Receiver` because these element were also added as optional elements to [zusemsg].
This change is *backwards-compatible*.
@@ -148,7 +148,7 @@ You find a description of the individual parameters in `application.yaml`.
default:
service-timeout: 60
perform-query-person-request: false
- tvnz-client:
+ tnvz-client:
url: http://localhost:8082/tnvz/
connection-timeout: 0
receive-timeout: 0
diff --git a/src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java b/src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java
index c4207f0..e08b335 100644
--- a/src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java
+++ b/src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java
@@ -134,8 +134,8 @@ public class DeliveryRequestBackend implements Consumer<String> {
if (mzsRequest.getConfig().isPerformQueryPersonRequest()) {
log.trace("Perform QueryPersonRequest. ");
var tnvzClientParams = mzsRequest.getConfig().getTNVZClient();
- TNVZServicePort tvnzPort = clientFactory.create(tnvzClientParams, TNVZServicePort.class);
- var identification = tnvzHelper.performQueryPersonRequest(mzsRequest, tvnzPort);
+ TNVZServicePort tnvzPort = clientFactory.create(tnvzClientParams, TNVZServicePort.class);
+ var identification = tnvzHelper.performQueryPersonRequest(mzsRequest, tnvzPort);
return converter.convert(mzsRequest, identification);
} else {
return converter.convert(mzsRequest);
diff --git a/src/main/java/at/gv/egiz/moazs/client/TnvzHelper.java b/src/main/java/at/gv/egiz/moazs/client/TnvzHelper.java
index ded83ff..5cc4954 100644
--- a/src/main/java/at/gv/egiz/moazs/client/TnvzHelper.java
+++ b/src/main/java/at/gv/egiz/moazs/client/TnvzHelper.java
@@ -53,27 +53,27 @@ public class TnvzHelper {
/**
* Performs all tasks related to making a request to the tnvz service:
* Derives a tnvz:QueryPersonRequest from the {@code mzsRequest}, sends the QueryPersonRequest to
- * {@code tvnzPort}, validates the tnvz's response and extracts the {@code Identification} Element.
+ * {@code tnvzPort}, validates the tnvz's response and extracts the {@code Identification} Element.
* @param mzsRequest Data source for the QueryPersonRequest
- * @param tvnzPort Client for communicating with the tnvz service
+ * @param tnvzPort Client for communicating with the tnvz service
* @throws MoaZSException in case of an error.
* @return
*/
public IdentificationType performQueryPersonRequest(DeliveryRequestType mzsRequest,
- TNVZServicePort tvnzPort) {
+ TNVZServicePort tnvzPort) {
log.info("Perform Query Person Request for mzs:DeliveryRequest with AppDeliveryID={}",
mzsRequest.getMetaData().getAppDeliveryID());
- var tvnzQuery = buildQuery(mzsRequest);
- var tvnzResponse = tvnzPort.queryPerson(tvnzQuery);
- verifyResponse(tvnzResponse);
+ var tnvzQuery = buildQuery(mzsRequest);
+ var tnvzResponse = tnvzPort.queryPerson(tnvzQuery);
+ verifyResponse(tnvzResponse);
- var tvnzResult = getResult(tvnzResponse);
+ var tnvzResult = getResult(tnvzResponse);
var typesInRequest = extractListOfMimemtypesIn(mzsRequest);
- checkMimetypes(tvnzResult, typesInRequest);
+ checkMimetypes(tnvzResult, typesInRequest);
- return tvnzResult.getSuccess().getIdentification();
+ return tnvzResult.getSuccess().getIdentification();
}
private QueryPersonRequest buildQuery(DeliveryRequestType mzsRequest) {
@@ -173,14 +173,14 @@ public class TnvzHelper {
.collect(toSet());
}
- private void verifyResponse(QueryPersonResponse tvnzResponse) {
+ private void verifyResponse(QueryPersonResponse tnvzResponse) {
- var error = tvnzResponse.getError();
+ var error = tnvzResponse.getError();
if (error != null) {
throw MoaZSException.moaZSException(error.getText(), error.getCode());
}
- var results = tvnzResponse.getQueryResultList().getQueryResult();
+ var results = tnvzResponse.getQueryResultList().getQueryResult();
if (results.isEmpty()) {
throw MoaZSException.moaZSException(MZS_NO_TNVZ_PERSON_QUERY_RESULTS_ERROR_MSG,
MoaZSException.ERROR_MZS_NO_TNVZ_PERSON_QUERY_RESULTS);
@@ -196,8 +196,8 @@ public class TnvzHelper {
}
}
- private PersonResultType getResult(QueryPersonResponse tvnzResponse) {
- return tvnzResponse.getQueryResultList().getQueryResult().get(0);
+ private PersonResultType getResult(QueryPersonResponse tnvzResponse) {
+ return tnvzResponse.getQueryResultList().getQueryResult().get(0);
}
private void checkMimetypes(PersonResultType tnvzResult, Set<String> typesInRequest) {
diff --git a/src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java b/src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java
index cda334a..a2b189c 100644
--- a/src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java
+++ b/src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java
@@ -70,7 +70,7 @@ public class DeliveryRequestAugmenterTest {
}
@Test
- public void overrideTvnzQueryWithPrimary() {
+ public void overrideTnvzQueryWithPrimary() {
var fallback = createConfig(msgUrl, false);
var primary = createConfig(null, true);
var augmenter = createAugmenter(fallback);
diff --git a/src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml b/src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml
index ef07686..c397a0d 100644
--- a/src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml
+++ b/src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml
@@ -55,7 +55,7 @@
<mzs:Config>
<mzs:PerformQueryPersonRequest>true</mzs:PerformQueryPersonRequest>
<mzs:TNVZClient>
- <mzs:URL>http://localhost/tvnzservice</mzs:URL>
+ <mzs:URL>http://localhost/tnvzservice</mzs:URL>
<mzs:ConnectionTimeout>0</mzs:ConnectionTimeout>
<mzs:ReceiveTimeout>0</mzs:ReceiveTimeout>
</mzs:TNVZClient>
diff --git a/src/test/resources/config/application.yaml b/src/test/resources/config/application.yaml
index dae261a..f8e360e 100644
--- a/src/test/resources/config/application.yaml
+++ b/src/test/resources/config/application.yaml
@@ -71,14 +71,14 @@ delivery-request-configuration-profiles:
# Mandatory
# If true, MOA ZS asks the tnvz service if the receiver is
- # addressable. Requires setting up the tvnz-client.
+ # addressable. Requires setting up the tnvz-client.
perform-query-person-request: false
# Mandatory (if perform-query-person-request is true)
- # Parameters for the connection to tvnz. Specify url,
+ # Parameters for the connection to tnvz. Specify url,
# connection-timeout, receive-timeout and ssl here. See msg-client
# for an exhaustive description of all parameters.
- tvnz-client:
+ tnvz-client:
# Mandatory
url: http://localhost:8082/tnvz/