1 package org.openecomp.sdc.vendorsoftwareproduct.dao.errors;
3 import org.openecomp.sdc.common.errors.ErrorCategory;
4 import org.openecomp.sdc.common.errors.ErrorCode;
5 import org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes;
6 import org.openecomp.sdc.versioning.dao.types.Version;
8 import java.text.MessageFormat;
10 public class VendorSoftwareProductCreationFailedBuilder {
11 private static final String VSP_CREATION_FAILED = "Failed to create VSP; %s";
12 private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
15 * Instantiates a new Vendor software product creation failed error builder.
18 public VendorSoftwareProductCreationFailedBuilder(String reason) {
19 builder.withId(VendorSoftwareProductErrorCodes.FAILED_TO_CREATE_VSP);
20 builder.withCategory(ErrorCategory.APPLICATION);
22 .withMessage(String.format(VSP_CREATION_FAILED, reason));
25 public ErrorCode build() {
26 return builder.build();