1 package org.openecomp.core.model.errors;
3 import org.openecomp.sdc.common.errors.BaseErrorBuilder;
4 import org.openecomp.sdc.common.errors.ErrorCategory;
6 public class RetrieveServiceTemplateFromDbErrorBuilder extends BaseErrorBuilder {
7 private static final String CANT_RETRIEVE_SERVICE_TEMPLATE = "Could not retrirve service " +
8 "template named %s. Reason - %s";
9 private static final String CREATE_SERVICE_TEMPLATE = "CREATE_SERVICE_TEMPLATE";
11 public RetrieveServiceTemplateFromDbErrorBuilder(String serviceTemplateName,
13 this.getErrorCodeBuilder()
14 .withCategory(ErrorCategory.APPLICATION)
15 .withId(CREATE_SERVICE_TEMPLATE)
16 .withMessage(String.format(CANT_RETRIEVE_SERVICE_TEMPLATE, serviceTemplateName, reason));