aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp
diff options
context:
space:
mode:
authorAbhai Singh <Abhai.Singh@amdocs.com>2018-01-03 16:28:47 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-01-03 14:25:27 +0000
commit7a74c4895e304690679573f6f421b0f5c4998853 (patch)
tree0e7706f112e7ea26b6c3529dd7a5172c08db164a /openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp
parent9eedd3e7567e7926eadf3efd700a8c9153e9259b (diff)
Fix Sonar violations - ValidationErrorCodes
Removing the files since they are not referenced Change-Id: Ica5835575222e96abc02132734b1e354d696ae35 Issue-ID: SDC-343 Signed-off-by: Abhai Singh <Abhai.Singh@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp')
-rw-r--r--openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/errors/ValidationErrorCodes.java29
-rw-r--r--openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/errors/ValidationInvalidErrorBuilder.java70
2 files changed, 0 insertions, 99 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/errors/ValidationErrorCodes.java b/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/errors/ValidationErrorCodes.java
deleted file mode 100644
index 6a7a010444..0000000000
--- a/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/errors/ValidationErrorCodes.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.validation.errors;
-
-/**
- * Created by TALIO on 4/24/2016.
- */
-public class ValidationErrorCodes {
- public static final String VALIDATION_INVALID = "VALIDATION_INVALID";
-
-}
diff --git a/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/errors/ValidationInvalidErrorBuilder.java b/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/errors/ValidationInvalidErrorBuilder.java
deleted file mode 100644
index 7b0d325d64..0000000000
--- a/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/errors/ValidationInvalidErrorBuilder.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.validation.errors;
-
-import org.openecomp.sdc.common.errors.BaseErrorBuilder;
-import org.openecomp.sdc.common.errors.ErrorCategory;
-import org.openecomp.sdc.datatypes.error.ErrorMessage;
-
-import java.util.List;
-import java.util.Map;
-
-public class ValidationInvalidErrorBuilder extends BaseErrorBuilder {
- private static final String VALIDATION_INVALID_DETAILED_MSG = "File is invalid: %s";
- private static final String VALIDATION_INVALID_MSG = "Validated file is invalid";
-
- /**
- * Instantiates a new Validation invalid error builder.
- *
- * @param errors the errors
- */
- public ValidationInvalidErrorBuilder(Map<String, List<ErrorMessage>> errors) {
- getErrorCodeBuilder().withId(ValidationErrorCodes.VALIDATION_INVALID);
- getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
- getErrorCodeBuilder()
- .withMessage(String.format(VALIDATION_INVALID_DETAILED_MSG, toString(errors)));
- }
-
- /**
- * Instantiates a new Validation invalid error builder.
- */
- public ValidationInvalidErrorBuilder() {
- getErrorCodeBuilder().withId(ValidationErrorCodes.VALIDATION_INVALID);
- getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
- getErrorCodeBuilder().withMessage(VALIDATION_INVALID_MSG);
- }
-
- private String toString(Map<String, List<ErrorMessage>> errors) {
- StringBuilder sb = new StringBuilder();
- errors.entrySet().stream()
- .forEach(entry -> singleErrorToString(sb, entry.getKey(), entry.getValue()));
- return sb.toString();
- }
-
- private void singleErrorToString(StringBuilder sb, String fileName, List<ErrorMessage> errors) {
- sb.append(System.lineSeparator());
- sb.append(fileName);
- sb.append(sb.append(": "));
- errors.stream().forEach(
- error -> sb.append(error.getMessage()).append("[").append(error.getLevel()).append("], "));
- }
-
-}