From b4890b8ba2db283c662268a4f14a788c702b54e5 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Fri, 4 Oct 2019 14:32:41 +0200 Subject: Add Validation for TNVZ QueryPersonRequest --- .../at/gv/egiz/moazs/preprocess/MzsDeliveryRequestValidator.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/at') diff --git a/src/main/java/at/gv/egiz/moazs/preprocess/MzsDeliveryRequestValidator.java b/src/main/java/at/gv/egiz/moazs/preprocess/MzsDeliveryRequestValidator.java index 061bbdd..af8b34c 100644 --- a/src/main/java/at/gv/egiz/moazs/preprocess/MzsDeliveryRequestValidator.java +++ b/src/main/java/at/gv/egiz/moazs/preprocess/MzsDeliveryRequestValidator.java @@ -64,6 +64,12 @@ public class MzsDeliveryRequestValidator { if (request.getSender().getCorporateBody() == null) throw mzse(MZS_DELIVERY_REQUEST, MZS_DELIVERY_REQUEST + "/Sender/CorporateBody is missing."); + + if (request.getSender().getCorporateBody().getIdentification() == null + || request.getSender().getCorporateBody().getIdentification().size() < 1) { + throw mzse(MZS_DELIVERY_REQUEST, MZS_DELIVERY_REQUEST + "/Sender/CorporateBody/Identification is missing."); + } + } } -- cgit v1.2.3