From a909811c78550eae05c30aa65e258b873e08b175 Mon Sep 17 00:00:00 2001 From: "Gamboa, Gilbert" Date: Fri, 14 Jun 2019 14:15:54 -0400 Subject: mso to validate the name uniqueness in A&AI Need to change query by name using nodes query to make sure names are globally unique. Added new Exception type for duplicate A&AI object names. Added tests for AAIVfModulResources. Change-Id: I71558d0881d7060819f5f807fe58779be6edfa6f Issue-ID: SO-2020 Signed-off-by: Benjamin, Max (mb388a) --- .../tasks/exceptions/DuplicateNameException.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/exceptions/DuplicateNameException.java (limited to 'bpmn/MSOCommonBPMN/src/main/java') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/exceptions/DuplicateNameException.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/exceptions/DuplicateNameException.java new file mode 100644 index 0000000000..2f2a116526 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/exceptions/DuplicateNameException.java @@ -0,0 +1,18 @@ +package org.onap.so.bpmn.servicedecomposition.tasks.exceptions; + +public class DuplicateNameException extends Exception { + + private static final long serialVersionUID = -2850043981787600326L; + + public DuplicateNameException() { + super(); + } + + public DuplicateNameException(String message) { + super(message); + } + + public DuplicateNameException(String objectType, String name) { + super(objectType + " with name " + name + " already exists. The name must be unique."); + } +} -- cgit 1.2.3-korg