summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/ComponentErrorBuilder.java
blob: 78d2ef866a655d845551ff28c560b47a80c28ba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package org.openecomp.sdc.vendorsoftwareproduct.errors;

import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;


public class ComponentErrorBuilder {

  private static final String VFC_INVALID_MISSING_IMAGE_MSG =
      "All VFC need to have atleast a single Image specified. Please fix the VFC Images and re-submit the VSP";


  public static ErrorCode VfcMissingImageErrorBuilder() {
    ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
    builder.withId(VendorSoftwareProductErrorCodes.VFC_INVALID);
    builder.withCategory(ErrorCategory.APPLICATION);
    builder
        .withMessage(String.format(VFC_INVALID_MISSING_IMAGE_MSG));
    return builder.build();
  }
}