summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-versioning-lib
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-01-30 21:35:14 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-02-01 11:13:57 +0000
commitca297aeb432b3d718bf09f0bac7b9f051c26e66d (patch)
tree1cf23878b79423e1446d2b68ccdd923d3c07f876 /openecomp-be/lib/openecomp-sdc-versioning-lib
parentab88e0fdb4250730588bea07f357c4fd721f1425 (diff)
Removed log constants
Removed constants associated with audit/metrics logging. Deleted unused code. Some other safe cleanup and refactoring. Change-Id: Idfda72e1fb27ca695a74f2a09cb46381c9caed1a Issue-ID: SDC-772 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java24
1 files changed, 6 insertions, 18 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java
index c4479d7105..7411edec08 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java
@@ -39,6 +39,10 @@ import java.util.stream.Collectors;
*/
public class VersioningUtil {
+ private VersioningUtil() {
+ // prevent instantiation
+ }
+
/**
* Validate entity existence.
*
@@ -51,10 +55,6 @@ public class VersioningUtil {
T inputEntity,
String firstClassCitizenType) {
if (retrievedEntity == null) {
- //MdcDataErrorMessage.createErrorMessageAndUpdateMDC(LoggerServiceName
- // .getServiceName(LoggerServiceName.Submit_Entity),
- // LoggerConstants.TARGET_ENTITY_DB, LoggerTragetServiceName.SUBMIT_ENTITY,
- // ErrorLevel.ERROR.name(), null, LoggerErrorDescription.SUBMIT_ENTITY);
throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
inputEntity.getEntityType(),
inputEntity.getId(),
@@ -88,11 +88,7 @@ public class VersioningUtil {
}
}
- if (nonExistingIds.size() > 0) {
- //MdcDataErrorMessage.createErrorMessageAndUpdateMDC
- // (LoggerServiceName.getServiceName(LoggerServiceName.Submit_Entity),
- // LoggerConstants.TARGET_ENTITY_DB, LoggerTragetServiceName.SUBMIT_ENTITY,
- // ErrorLevel.ERROR.name(), null, LoggerErrorDescription.SUBMIT_ENTITY);
+ if (!nonExistingIds.isEmpty()) {
if (nonExistingIds.size() == 1) {
throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
entity.getEntityType(),
@@ -130,12 +126,8 @@ public class VersioningUtil {
.filter(entityId -> !retrievedContainedEntityIds.contains(entityId))
.collect(Collectors.toList());
- if (nonExistingIds.size() > 0) {
+ if (!nonExistingIds.isEmpty()) {
if (nonExistingIds.size() == 1) {
- //MdcDataErrorMessage.createErrorMessageAndUpdateMDC(LoggerServiceName
- // .getServiceName(LoggerServiceName.Submit_Entity), LoggerConstants.TARGET_ENTITY_DB,
- // LoggerTragetServiceName.ENTIT, ErrorLevel.ERROR.name(),
- // null, LoggerErrorDescription.SUBMIT_ENTITY);
throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
containedEntityType,
nonExistingIds.get(0),
@@ -143,10 +135,6 @@ public class VersioningUtil {
containingEntity.getId(),
containingEntity.getVersion()).build());
}
- //MdcDataErrorMessage.createErrorMessageAndUpdateMDC(LoggerServiceName
- // .getServiceName(LoggerServiceName.Submit_Entity),
- // LoggerConstants.TARGET_ENTITY_DB, LoggerTragetServiceName.SUBMIT_ENTITY,
- // ErrorLevel.ERROR.name(), null, LoggerErrorDescription.SUBMIT_ENTITY);
throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
containedEntityType,
nonExistingIds,