aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java
blob: 9ae66dd91c9773f094a71977fc3ab36bbd9448c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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));

  }
}