blob: 6545ca1fdd1b2552135f83679838ff00e66530a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package org.openecomp.sdc.vendorsoftwareproduct.dao.errors;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
import static org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes.INVALID_EXTENSION;
public class OrchestrationTemplateFileExtensionErrorBuilder {
private static final String INVALID_EXTENSION_MSG = "Invalid file extension. Valid extensions " +
"are : zip, csar.";
private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
public OrchestrationTemplateFileExtensionErrorBuilder(){
builder.withId(INVALID_EXTENSION);
builder.withCategory(ErrorCategory.APPLICATION);
builder.withMessage(String.format(INVALID_EXTENSION_MSG));
}
public ErrorCode build() {
return builder.build();
}
}
|