blob: 8aad900102f0bac035d17f25fa3378bd7e711b9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package org.openecomp.sdc.vendorsoftwareproduct.errors;
import static org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes
.VSP_INVALID_ONBOARDING_METHOD;
import static org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes
.VSP_ONBOARD_METHOD_UPDATE_NOT_ALLOWED;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
/**
* The type Onboarding method error builder.
*/
public class OnboardingMethodErrorBuilder {
private static final String VSP_ONBOARD_METHOD_UPDATE_NOT_ALLOWED_MSG =
"onboardingMethod update is not allowed.";
private static final String VSP_INVALID_ONBOARDING_METHOD_MSG =
"The onboardingMethod value doesn't meet the expected attribute value.";
/**
* Gets onboarding update error.
*
* @return the onboarding update error
*/
public static ErrorCode getOnboardingUpdateError() {
ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
builder.withId(VSP_ONBOARD_METHOD_UPDATE_NOT_ALLOWED);
builder.withCategory(ErrorCategory.APPLICATION);
builder.withMessage(String.format(VSP_ONBOARD_METHOD_UPDATE_NOT_ALLOWED_MSG));
return builder.build();
}
/**
* Get invalid onboarding method error builder error code.
*
* @return the error code
*/
public static ErrorCode getInvalidOnboardingMethodErrorBuilder() {
ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
builder.withId(VSP_INVALID_ONBOARDING_METHOD);
builder.withCategory(ErrorCategory.APPLICATION);
builder.withMessage(String.format(VSP_INVALID_ONBOARDING_METHOD_MSG));
return builder.build();
}
}
|