blob: f47eca3b50ec0be3350571e15ecca5a5fd1c3fb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package org.openecomp.core.model.errors;
import org.openecomp.sdc.common.errors.BaseErrorBuilder;
import org.openecomp.sdc.common.errors.ErrorCategory;
public class RetrieveServiceTemplateFromDbErrorBuilder extends BaseErrorBuilder {
private static final String CANT_RETRIEVE_SERVICE_TEMPLATE = "Could not retrirve service " +
"template named %s. Reason - %s";
private static final String CREATE_SERVICE_TEMPLATE = "CREATE_SERVICE_TEMPLATE";
public RetrieveServiceTemplateFromDbErrorBuilder(String serviceTemplateName,
String reason){
this.getErrorCodeBuilder()
.withCategory(ErrorCategory.APPLICATION)
.withId(CREATE_SERVICE_TEMPLATE)
.withMessage(String.format(CANT_RETRIEVE_SERVICE_TEMPLATE, serviceTemplateName, reason));
}
}
|