aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java77
1 files changed, 35 insertions, 42 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java
index c41e2fa137..2902d209a0 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdc.tosca.errors;
import org.openecomp.sdc.common.errors.ErrorCategory;
@@ -28,50 +27,44 @@ import org.openecomp.sdc.common.errors.ErrorCode;
*/
public class ToscaMissingSubstitutionMappingForReqCapErrorBuilder {
- private static final String MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP_MSG =
- "Invalid Substitution, Missing Substitution Mapping for %s with Id %s.";
- private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
-
- /**
- * Instantiates a new Tosca missing substitution mapping for req cap error builder.
- *
- * @param exposedEntry the exposed entry
- * @param id the id
- */
- public ToscaMissingSubstitutionMappingForReqCapErrorBuilder(MappingExposedEntry exposedEntry,
- String id) {
- builder.withId(ToscaErrorCodes.MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP);
- builder.withCategory(ErrorCategory.APPLICATION);
- builder.withMessage(String
- .format(MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP_MSG, exposedEntry.getDisplayName(), id));
- }
+ private static final String MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP_MSG = "Invalid Substitution, Missing Substitution Mapping for %s with Id %s.";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
- /**
- * Build error code.
- *
- * @return the error code
- */
- public ErrorCode build() {
- return builder.build();
- }
+ /**
+ * Instantiates a new Tosca missing substitution mapping for req cap error builder.
+ *
+ * @param exposedEntry the exposed entry
+ * @param id the id
+ */
+ public ToscaMissingSubstitutionMappingForReqCapErrorBuilder(MappingExposedEntry exposedEntry, String id) {
+ builder.withId(ToscaErrorCodes.MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP_MSG, exposedEntry.getDisplayName(), id));
+ }
- /**
- * The enum Mapping exposed entry.
- */
- public enum MappingExposedEntry {
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
- CAPABILITY("Capability"),
- REQUIREMENT("Requirement"),;
+ /**
+ * The enum Mapping exposed entry.
+ */
+ public enum MappingExposedEntry {
+ CAPABILITY("Capability"), REQUIREMENT("Requirement");
- private String displayName;
+ private String displayName;
- MappingExposedEntry(String displayName) {
- this.displayName = displayName;
- }
+ MappingExposedEntry(String displayName) {
+ this.displayName = displayName;
+ }
- public String getDisplayName() {
- return displayName;
+ public String getDisplayName() {
+ return displayName;
+ }
}
-
- }
}