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;
7 public class VendorSoftwareProductCreationFailedBuilder {
8 private static final String VSP_CREATION_FAILED = "Failed to create VSP; %s";
9 private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
12 * Instantiates a new Vendor software product creation failed error builder.
15 public VendorSoftwareProductCreationFailedBuilder(String reason) {
16 builder.withId(VendorSoftwareProductErrorCodes.FAILED_TO_CREATE_VSP);
17 builder.withCategory(ErrorCategory.APPLICATION);
19 .withMessage(String.format(VSP_CREATION_FAILED, reason));
22 public ErrorCode build() {
23 return builder.build();