diff options
Diffstat (limited to 'src/main/java/org/onap/aai/validation/controller/ValidationController.java')
-rw-r--r-- | src/main/java/org/onap/aai/validation/controller/ValidationController.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/onap/aai/validation/controller/ValidationController.java b/src/main/java/org/onap/aai/validation/controller/ValidationController.java index 15e35b1..bd7c850 100644 --- a/src/main/java/org/onap/aai/validation/controller/ValidationController.java +++ b/src/main/java/org/onap/aai/validation/controller/ValidationController.java @@ -1,12 +1,12 @@ -/* +/** * ============LICENSE_START=================================================== - * Copyright (c) 2018 Amdocs + * Copyright (c) 2018-2019 European Software Marketing Ltd. * ============================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -42,6 +42,7 @@ import org.onap.aai.validation.publisher.MessagePublisher; import org.onap.aai.validation.reader.EventReader; import org.onap.aai.validation.reader.data.Entity; import org.onap.aai.validation.result.ValidationResult; +import org.onap.aai.validation.result.ValidationResultBuilder; import org.onap.aai.validation.result.Violation; import org.onap.aai.validation.util.JsonUtil; @@ -105,7 +106,7 @@ public class ValidationController { Entity entity = eventReader.getEntity(event); if (!entity.getIds().isEmpty() && eventReader.getEntityType(event).isPresent() && entity.getResourceVersion().isPresent()) { - ValidationResult validationResult = new ValidationResult(entity); + ValidationResult validationResult = new ValidationResultBuilder(eventReader, event).build(); // @formatter:off validationResult.addViolation(new Violation.Builder(entity) .category(VALIDATION_ERROR_CATEGORY) |