[SDC] Onboarding 1710 rebase.
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / errors / ComponentErrorBuilder.java
1 package org.openecomp.sdc.vendorsoftwareproduct.errors;
2
3 import org.openecomp.sdc.common.errors.ErrorCategory;
4 import org.openecomp.sdc.common.errors.ErrorCode;
5
6
7 public class ComponentErrorBuilder {
8
9   private static final String VFC_INVALID_MISSING_IMAGE_MSG =
10       "All VFC need to have atleast a single Image specified. Please fix the VFC Images and re-submit the VSP";
11
12
13   public static ErrorCode VfcMissingImageErrorBuilder() {
14     ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
15     builder.withId(VendorSoftwareProductErrorCodes.VFC_INVALID);
16     builder.withCategory(ErrorCategory.APPLICATION);
17     builder
18         .withMessage(String.format(VFC_INVALID_MISSING_IMAGE_MSG));
19     return builder.build();
20   }
21 }