aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/tnvz/TnvzClient.java
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-28 10:48:20 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-28 10:48:20 +0200
commite1f365955aa22cdf8e44429af2b744388ce0c05b (patch)
tree71fec813cce57d4a74650dec259685052c405190 /src/main/java/at/gv/egiz/moazs/tnvz/TnvzClient.java
parent695ab1f836160d40c4352a2c3127f4f687912817 (diff)
downloadmoa-zs-e1f365955aa22cdf8e44429af2b744388ce0c05b.tar.gz
moa-zs-e1f365955aa22cdf8e44429af2b744388ce0c05b.tar.bz2
moa-zs-e1f365955aa22cdf8e44429af2b744388ce0c05b.zip
Integrate Sign.Verification and Improve Error Handling of Pipeline
- Ensure proper communication of errors between pipeline and mzs service by converting MoaZSExceptions into DeliveryRequestStatus messages. - Revise MoaZSException: Add optional fields; those fields are a) helpful to construct meaningful error messages and b) optional because, depending on where an exception appears, either existent or non-existent and thus optional. Add inner-class Builder. - Integrate Signature Verification into pipeline and add Stub for SignatureVerification. - Move TNVZResponse's Mimetype check into dedicated class (Reason: separate abstration layers). - Update api changes in testcases.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/tnvz/TnvzClient.java')
-rw-r--r--src/main/java/at/gv/egiz/moazs/tnvz/TnvzClient.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/tnvz/TnvzClient.java b/src/main/java/at/gv/egiz/moazs/tnvz/TnvzClient.java
index 4a69aea..d4049fc 100644
--- a/src/main/java/at/gv/egiz/moazs/tnvz/TnvzClient.java
+++ b/src/main/java/at/gv/egiz/moazs/tnvz/TnvzClient.java
@@ -1,5 +1,7 @@
package at.gv.egiz.moazs.tnvz;
+import at.gv.egiz.moazs.MoaZSException;
+import at.gv.zustellung.app2mzs.xsd.DeliveryRequestType;
import at.gv.zustellung.app2mzs.xsd.DeliveryRequestType.Sender;
import at.gv.zustellung.app2mzs.xsd.DeliveryRequestType.Receiver;
import at.gv.zustellung.tnvz.xsd.PersonResultSuccessType;
@@ -7,10 +9,18 @@ import at.gv.zustellung.tnvz.xsd.PersonResultType;
import at.gv.zustellung.tnvz.xsd.PersonResultType.PersonResultTypeBuilder;
import org.springframework.stereotype.Component;
+import java.util.Collection;
+import java.util.List;
+
+import static at.gv.egiz.moazs.MoaZSException.moaZSExceptionBuilder;
+import static java.lang.String.join;
+import static java.util.stream.Collectors.toSet;
+
@Component
public class TnvzClient {
- public PersonResultType queryPerson(Sender sender, Receiver receiver) {
+ public PersonResultType query(Sender sender, Receiver receiver) {
+ //TODO: Replace this stub with actual request.
PersonResultSuccessType success = new PersonResultSuccessType.PersonResultSuccessTypeBuilder().build();
return new PersonResultTypeBuilder().withSuccess(success).build();
}