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