Add collaboration feature
[sdc.git] / openecomp-be / lib / openecomp-tosca-converter-lib / openecomp-tosca-converter-api / src / main / java / org / openecomp / core / converter / errors / CreateToscaObjectErrorBuilder.java
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 CreateToscaObjectErrorBuilder extends BaseErrorBuilder {
7   private static final String CANT_CREATE_OBJECT_FROM_CLASS =
8       "Can't create %s from %s.";
9   private static final String IMPORT_TOSCA = "IMPORT_TOSCA";
10
11   public CreateToscaObjectErrorBuilder(String className,
12                                        String objectId) {
13     getErrorCodeBuilder()
14         .withId(IMPORT_TOSCA)
15         .withCategory(ErrorCategory.APPLICATION)
16         .withMessage(String.format(CANT_CREATE_OBJECT_FROM_CLASS, className, objectId));
17   }
18 }