daeb570086cf7eee8e9126c3bc232979f606a345
[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 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 }