9ae66dd91c9773f094a71977fc3ab36bbd9448c7
[sdc.git] /
1 package org.openecomp.core.converter.errors;
2
3 import org.openecomp.sdc.common.errors.BaseErrorBuilder;
4 import org.openecomp.sdc.common.errors.ErrorCategory;
5
6 public class SubstitutionMappingsConverterErrorBuilder extends BaseErrorBuilder {
7   private static final String SUB_MAPPINGS_CAPABILITY_REQUIREMENT_ENTRY_VALUE_ILLEGAL = "%s value" +
8       " in substitution mappings is invalid, expected it to be %s";
9   private static final String IMPORT_TOSCA = "IMPORT_TOSCA";
10
11
12   public SubstitutionMappingsConverterErrorBuilder(String section,
13                                                    String expectedType) {
14     getErrorCodeBuilder()
15         .withId(IMPORT_TOSCA)
16         .withCategory(ErrorCategory.APPLICATION)
17         .withMessage(String.format(SUB_MAPPINGS_CAPABILITY_REQUIREMENT_ENTRY_VALUE_ILLEGAL, section, expectedType));
18
19   }
20 }