aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main
diff options
context:
space:
mode:
authortalio <tali.orenbach@amdocs.com>2017-11-21 09:53:17 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2017-11-21 09:22:17 +0000
commit15dfe1e9a127bc73f671b9601d8b8c8e25c2d65f (patch)
tree656c6b72380aecd1c4cb235eb53b47108031f306 /openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main
parent7bd878afa02d188e687a6958ae999807c2106392 (diff)
invalid yaml exception
throw an invalid yaml exception if one of the retrieved service templates is corrupted, while submitting a VSP Issue - Id : SDC-693 Change-Id: Icf37cf1aa847385ef118a1395b1afdfe99e9d79d Signed-off-by: talio <tali.orenbach@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main')
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/errors/RetrieveServiceTemplateFromDbErrorBuilder.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/errors/RetrieveServiceTemplateFromDbErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/errors/RetrieveServiceTemplateFromDbErrorBuilder.java
new file mode 100644
index 0000000000..f47eca3b50
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/errors/RetrieveServiceTemplateFromDbErrorBuilder.java
@@ -0,0 +1,18 @@
+package org.openecomp.core.model.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+public class RetrieveServiceTemplateFromDbErrorBuilder extends BaseErrorBuilder {
+ private static final String CANT_RETRIEVE_SERVICE_TEMPLATE = "Could not retrirve service " +
+ "template named %s. Reason - %s";
+ private static final String CREATE_SERVICE_TEMPLATE = "CREATE_SERVICE_TEMPLATE";
+
+ public RetrieveServiceTemplateFromDbErrorBuilder(String serviceTemplateName,
+ String reason){
+ this.getErrorCodeBuilder()
+ .withCategory(ErrorCategory.APPLICATION)
+ .withId(CREATE_SERVICE_TEMPLATE)
+ .withMessage(String.format(CANT_RETRIEVE_SERVICE_TEMPLATE, serviceTemplateName, reason));
+ }
+}