diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api')
-rw-r--r-- | openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java new file mode 100644 index 0000000000..9ae66dd91c --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java @@ -0,0 +1,20 @@ +package org.openecomp.core.converter.errors; + +import org.openecomp.sdc.common.errors.BaseErrorBuilder; +import org.openecomp.sdc.common.errors.ErrorCategory; + +public class SubstitutionMappingsConverterErrorBuilder extends BaseErrorBuilder { + private static final String SUB_MAPPINGS_CAPABILITY_REQUIREMENT_ENTRY_VALUE_ILLEGAL = "%s value" + + " in substitution mappings is invalid, expected it to be %s"; + private static final String IMPORT_TOSCA = "IMPORT_TOSCA"; + + + public SubstitutionMappingsConverterErrorBuilder(String section, + String expectedType) { + getErrorCodeBuilder() + .withId(IMPORT_TOSCA) + .withCategory(ErrorCategory.APPLICATION) + .withMessage(String.format(SUB_MAPPINGS_CAPABILITY_REQUIREMENT_ENTRY_VALUE_ILLEGAL, section, expectedType)); + + } +} |