Merge "update tosca parser verification feature"
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / main / java / org / openecomp / sdc / translator / services / heattotosca / errors / DuplicateResourceIdsInDifferentFilesErrorBuilder.java
1 package org.openecomp.sdc.translator.services.heattotosca.errors;
2
3 import org.openecomp.sdc.common.errors.BaseErrorBuilder;
4 import org.openecomp.sdc.common.errors.ErrorCategory;
5
6 public final class DuplicateResourceIdsInDifferentFilesErrorBuilder extends BaseErrorBuilder {
7
8   private static final String DUPLICATE_RESOURCE_ID_MSG = "Resource with id %s occurs more than once in " +
9       "different addOn files";
10
11   public DuplicateResourceIdsInDifferentFilesErrorBuilder(String resourceId) {
12     getErrorCodeBuilder().withId(TranslatorErrorCodes.DUPLICATE_RESOURCE_ID_IN_DIFFERENT_FILES)
13     .withCategory(ErrorCategory.APPLICATION)
14     .withMessage(String.format(DUPLICATE_RESOURCE_ID_MSG, resourceId));
15   }
16 }