summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-01-28 14:39:56 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-01-29 12:13:45 +0000
commitacd7ec01fb7a388324f95e46a34cb62db7eefacf (patch)
treea487f691bb9ebba896b2c025644708ddcf18bbc9 /openecomp-be/api
parent927fb189d16f96e031b5b92dc963ace22a1d6577 (diff)
Removed reference to MDC for logging
Change-Id: I6d7e5b40ba6f2bc596be9b3e80ea5c274f1ae447 Issue-ID: SDC-875 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/api')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java6
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java22
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java7
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java7
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java7
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java21
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java7
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java15
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java12
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java12
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java27
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java13
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java16
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java8
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java10
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java7
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java9
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java10
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java16
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java60
22 files changed, 46 insertions, 255 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java
index 5bdc034673..b50913aa6f 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java
@@ -29,10 +29,6 @@ import org.openecomp.sdc.health.data.HealthCheckStatus;
import org.openecomp.sdc.health.data.HealthInfo;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
-import org.openecomp.sdcrests.health.types.HealthInfoDtos;
-import org.openecomp.sdcrests.wrappers.GenericCollectionWrapper;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
@@ -63,7 +59,6 @@ public class HealthCheckImpl implements org.openecomp.sdcrests.health.rest.Healt
SessionContextProviderFactory.getInstance().createInterface().create("public");
try {
- MdcUtil.initMdc(LoggerServiceName.Health_check.toString());
Collection<HealthInfo> healthInfos = healthCheckManager.checkHealth();
healthCheckResult.setComponentsInfo(healthInfos);
boolean someIsDown = healthInfos.stream()
@@ -81,7 +76,6 @@ public class HealthCheckImpl implements org.openecomp.sdcrests.health.rest.Healt
} catch (Exception ex) {
logger.error("Health check failed", ex);
Response.ResponseBuilder responseBuilder = new ResponseBuilderImpl();
- GenericCollectionWrapper<HealthInfoDtos> results = new GenericCollectionWrapper<>();
HealthInfo healthInfo = new HealthInfo(org.openecomp.sdc.health.data.MonitoredModules.BE,
HealthCheckStatus.DOWN,
"", "Failed to perform Health Check");
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java
index 23ffc2549b..c3497e8dc6 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java
@@ -32,8 +32,6 @@ import org.openecomp.sdc.itempermissions.ItemPermissionsManager;
import org.openecomp.sdc.itempermissions.ItemPermissionsManagerFactory;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.notification.dtos.Event;
import org.openecomp.sdc.notification.factories.NotificationPropagationManagerFactory;
import org.openecomp.sdc.notification.services.NotificationPropagationManager;
@@ -131,8 +129,6 @@ public class VersionsImpl implements Versions {
@Override
public Response getActivityLog(String itemId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_List_Activity_Log.toString());
-
GenericCollectionWrapper<ActivityLogDto> results = new GenericCollectionWrapper<>();
MapActivityLogEntityToDto mapper = new MapActivityLogEntityToDto();
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java
index 8ff0ac0eea..9f6455e7f2 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java
@@ -5,8 +5,6 @@ import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.notification.dao.types.NotificationEntity;
import org.openecomp.sdc.notification.dtos.NotificationsStatus;
import org.openecomp.sdc.notification.exceptons.NotificationNotExistException;
@@ -43,7 +41,6 @@ public class NotificationsImpl implements Notifications {
@Override
public Response getNotifications(String user, UUID lastDelivered, UUID endOfPage) {
- MdcUtil.initMdc(LoggerServiceName.notifications.toString());
NotificationsStatus notificationsStatus = notificationsService
.getNotificationsStatus(user, lastDelivered, selectionLimit, endOfPage);
MapNotificationsStatusToDto converter = new MapNotificationsStatusToDto();
@@ -91,8 +88,6 @@ public class NotificationsImpl implements Notifications {
@Override
public Response getNewNotificationsByOwnerId(String user, String eventId, String limitStr) {
- MdcUtil.initMdc(LoggerServiceName.notifications.toString());
-
int limit = selectionLimit;
if (Objects.nonNull(limitStr)) {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
index 09a4ca8ebe..780885abff 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
@@ -1,8 +1,6 @@
package org.openecomp.sdcrests.vendorlicense.rest.services;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
@@ -30,7 +28,7 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
private VendorLicenseManager vendorLicenseManager =
VendorLicenseManagerFactory.getInstance().createInterface();
- public static final String parent = "EntitlementPool";
+ private static final String PARENT = "EntitlementPool";
@Override
public Response createLimit(LimitRequestDto request,
@@ -38,7 +36,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
String versionId,
String entitlementPoolId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_LIMIT.toString());
Version version = new Version(versionId);
vendorLicenseManager
.getEntitlementPool(new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -48,23 +45,18 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
limitEntity.setVendorLicenseModelId(vlmId);
limitEntity.setVersion(version);
limitEntity.setEpLkgId(entitlementPoolId);
- limitEntity.setParent(parent);
+ limitEntity.setParent(PARENT);
LimitEntity createdLimit = vendorLicenseManager.createLimit(limitEntity);
MapLimitEntityToLimitCreationDto mapper = new MapLimitEntityToLimitCreationDto();
LimitCreationDto createdLimitDto = mapper.applyMapping(createdLimit, LimitCreationDto.class);
- /*StringWrapperResponse result =
- createdLimit != null ? new StringWrapperResponse(createdLimit.getId())
- : null;*/
- //return Response.ok(result).build();
return Response.ok(createdLimitDto != null ? createdLimitDto : null).build();
}
@Override
public Response listLimits(String vlmId, String versionId, String entitlementPoolId, String
user) {
- MdcUtil.initMdc(LoggerServiceName.List_EP.toString());
Version version = new Version(versionId);
vendorLicenseManager
.getEntitlementPool(new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -84,8 +76,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
@Override
public Response getLimit(String vlmId, String versionId, String entitlementPoolId,
String limitId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_LIMIT.toString());
-
Version version = new Version(versionId);
vendorLicenseManager
.getEntitlementPool(new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -108,8 +98,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
String entitlementPoolId,
String limitId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_LIMIT.toString());
-
Version version = new Version(versionId);
vendorLicenseManager
.getEntitlementPool(new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -120,7 +108,7 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
limitEntity.setVersion(version);
limitEntity.setEpLkgId(entitlementPoolId);
limitEntity.setId(limitId);
- limitEntity.setParent(parent);
+ limitEntity.setParent(PARENT);
vendorLicenseManager.updateLimit(limitEntity);
return Response.ok().build();
@@ -137,8 +125,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
*/
public Response deleteLimit(String vlmId, String versionId, String entitlementPoolId,
String limitId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_LIMIT.toString());
-
Version version = new Version(versionId);
vendorLicenseManager.getEntitlementPool(
new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -148,7 +134,7 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
limitInput.setVersion(version);
limitInput.setEpLkgId(entitlementPoolId);
limitInput.setId(limitId);
- limitInput.setParent(parent);
+ limitInput.setParent(PARENT);
vendorLicenseManager.deleteLimit(limitInput);
return Response.ok().build();
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
index 07151d2232..076ae45017 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
@@ -20,8 +20,6 @@
package org.openecomp.sdcrests.vendorlicense.rest.services;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
@@ -56,7 +54,6 @@ public class EntitlementPoolsImpl implements EntitlementPools {
* @return the response
*/
public Response listEntitlementPools(String vlmId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_EP.toString());
Collection<EntitlementPoolEntity> entitlementPools =
vendorLicenseManager.listEntitlementPools(vlmId, new Version(versionId));
@@ -79,7 +76,6 @@ public class EntitlementPoolsImpl implements EntitlementPools {
*/
public Response createEntitlementPool(EntitlementPoolRequestDto request, String vlmId,
String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_EP.toString());
EntitlementPoolEntity entitlementPoolEntity =
new MapEntitlementPoolRequestDtoToEntitlementPoolEntity()
.applyMapping(request, EntitlementPoolEntity.class);
@@ -105,7 +101,6 @@ public class EntitlementPoolsImpl implements EntitlementPools {
*/
public Response updateEntitlementPool(EntitlementPoolRequestDto request, String vlmId,
String versionId, String entitlementPoolId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_EP.toString());
EntitlementPoolEntity entitlementPoolEntity =
new MapEntitlementPoolRequestDtoToEntitlementPoolEntity()
.applyMapping(request, EntitlementPoolEntity.class);
@@ -128,7 +123,6 @@ public class EntitlementPoolsImpl implements EntitlementPools {
*/
public Response getEntitlementPool(String vlmId, String versionId, String entitlementPoolId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_EP.toString());
EntitlementPoolEntity epInput = new EntitlementPoolEntity();
epInput.setVendorLicenseModelId(vlmId);
epInput.setVersion(new Version(versionId));
@@ -151,7 +145,6 @@ public class EntitlementPoolsImpl implements EntitlementPools {
*/
public Response deleteEntitlementPool(String vlmId, String versionId, String entitlementPoolId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_EP.toString());
EntitlementPoolEntity epInput = new EntitlementPoolEntity();
epInput.setVendorLicenseModelId(vlmId);
epInput.setId(entitlementPoolId);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
index 77aeac8404..cd11a45886 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
@@ -21,8 +21,6 @@
package org.openecomp.sdcrests.vendorlicense.rest.services;
import org.openecomp.core.utilities.CommonMethods;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
@@ -60,7 +58,6 @@ public class FeatureGroupsImpl implements FeatureGroups {
@Override
public Response listFeatureGroups(String vlmId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_FG.toString());
Collection<FeatureGroupEntity> featureGroupEntities =
vendorLicenseManager.listFeatureGroups(vlmId, new Version(versionId));
@@ -84,7 +81,6 @@ public class FeatureGroupsImpl implements FeatureGroups {
@Override
public Response createFeatureGroup(FeatureGroupRequestDto request, String vlmId, String versionId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_FG.toString());
FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity()
.applyMapping(request, FeatureGroupEntity.class);
featureGroupEntity.setVendorLicenseModelId(vlmId);
@@ -103,7 +99,6 @@ public class FeatureGroupsImpl implements FeatureGroups {
@Override
public Response updateFeatureGroup(FeatureGroupUpdateRequestDto request, String vlmId,
String versionId, String featureGroupId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_FG.toString());
FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity()
.applyMapping(request, FeatureGroupEntity.class);
featureGroupEntity.setVendorLicenseModelId(vlmId);
@@ -120,7 +115,6 @@ public class FeatureGroupsImpl implements FeatureGroups {
@Override
public Response getFeatureGroup(String vlmId, String versionId, String featureGroupId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_FG.toString());
FeatureGroupEntity fgInput = new FeatureGroupEntity();
fgInput.setVendorLicenseModelId(vlmId);
fgInput.setVersion(new Version(versionId));
@@ -165,7 +159,6 @@ public class FeatureGroupsImpl implements FeatureGroups {
@Override
public Response deleteFeatureGroup(String vlmId, String versionId, String featureGroupId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_FG.toString());
FeatureGroupEntity fgInput = new FeatureGroupEntity();
fgInput.setVendorLicenseModelId(vlmId);
fgInput.setVersion(new Version(versionId));
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
index 5be30d861b..f41d0a24a1 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
@@ -21,8 +21,6 @@
package org.openecomp.sdcrests.vendorlicense.rest.services;
import org.openecomp.core.utilities.CommonMethods;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
@@ -64,7 +62,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements {
* @return the response
*/
public Response listLicenseAgreements(String vlmId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_LA.toString());
Collection<LicenseAgreementEntity> licenseAgreements =
vendorLicenseManager.listLicenseAgreements(vlmId, new Version(versionId));
@@ -91,7 +88,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements {
*/
public Response createLicenseAgreement(LicenseAgreementRequestDto request, String vlmId,
String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_LA.toString());
LicenseAgreementEntity licenseAgreementEntity =
new MapLicenseAgreementDescriptorDtoToLicenseAgreementEntity()
.applyMapping(request, LicenseAgreementEntity.class);
@@ -118,7 +114,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements {
*/
public Response updateLicenseAgreement(LicenseAgreementUpdateRequestDto request, String vlmId,
String versionId, String licenseAgreementId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_LA.toString());
LicenseAgreementEntity licenseAgreementEntity =
new MapLicenseAgreementDescriptorDtoToLicenseAgreementEntity()
.applyMapping(request, LicenseAgreementEntity.class);
@@ -143,7 +138,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements {
*/
public Response getLicenseAgreement(String vlmId, String versionId, String licenseAgreementId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_LA.toString());
LicenseAgreementModel licenseAgreementModel = vendorLicenseManager
.getLicenseAgreementModel(vlmId, new Version(versionId), licenseAgreementId);
@@ -185,7 +179,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements {
*/
public Response deleteLicenseAgreement(String vlmId, String versionId, String licenseAgreementId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_LA.toString());
vendorLicenseManager.deleteLicenseAgreement(vlmId, new Version(versionId), licenseAgreementId);
return Response.ok().build();
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
index 164ea28a7a..93868616bc 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
@@ -1,7 +1,5 @@
package org.openecomp.sdcrests.vendorlicense.rest.services;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
@@ -29,7 +27,7 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
private VendorLicenseManager vendorLicenseManager =
VendorLicenseManagerFactory.getInstance().createInterface();
- public static final String parent = "LicenseKeyGroup";
+ private static final String PARENT = "LicenseKeyGroup";
@Override
@@ -38,7 +36,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
String versionId,
String licenseKeyGroupId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_LIMIT.toString());
Version version = new Version(versionId);
vendorLicenseManager.getLicenseKeyGroup(
new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
@@ -48,22 +45,17 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
limitEntity.setVendorLicenseModelId(vlmId);
limitEntity.setVersion(version);
limitEntity.setEpLkgId(licenseKeyGroupId);
- limitEntity.setParent(parent);
+ limitEntity.setParent(PARENT);
LimitEntity createdLimit = vendorLicenseManager.createLimit(limitEntity);
MapLimitEntityToLimitCreationDto mapper = new MapLimitEntityToLimitCreationDto();
LimitCreationDto createdLimitDto = mapper.applyMapping(createdLimit, LimitCreationDto.class);
- /*StringWrapperResponse result =
- createdLimit != null ? new StringWrapperResponse(createdLimit.getId())
- : null;*/
- //return Response.ok(result).build();
return Response.ok(createdLimitDto != null ? createdLimitDto : null).build();
}
@Override
public Response listLimits(String vlmId, String versionId, String licenseKeyGroupId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.List_EP.toString());
Version version = new Version(versionId);
vendorLicenseManager
.getLicenseKeyGroup(new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
@@ -87,8 +79,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
String licenseKeyGroupId,
String limitId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_LIMIT.toString());
-
Version version = new Version(versionId);
vendorLicenseManager
.getLicenseKeyGroup(new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
@@ -99,7 +89,7 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
limitEntity.setVersion(version);
limitEntity.setEpLkgId(licenseKeyGroupId);
limitEntity.setId(limitId);
- limitEntity.setParent(parent);
+ limitEntity.setParent(PARENT);
vendorLicenseManager.updateLimit(limitEntity);
return Response.ok().build();
@@ -116,8 +106,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
*/
public Response deleteLimit(String vlmId, String versionId, String licenseKeyGroupId,
String limitId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_LIMIT.toString());
-
Version version = new Version(versionId);
vendorLicenseManager
.getLicenseKeyGroup(new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
@@ -127,7 +115,7 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
limitInput.setVersion(version);
limitInput.setEpLkgId(licenseKeyGroupId);
limitInput.setId(limitId);
- limitInput.setParent(parent);
+ limitInput.setParent(PARENT);
vendorLicenseManager.deleteLimit(limitInput);
return Response.ok().build();
@@ -136,7 +124,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
@Override
public Response getLimit(String vlmId, String versionId, String licenseKeyGroupId,
String limitId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_LIMIT.toString());
Version version = new Version(versionId);
vendorLicenseManager
.getLicenseKeyGroup(new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
index 4c24d59b63..5f37d39720 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
@@ -20,8 +20,6 @@
package org.openecomp.sdcrests.vendorlicense.rest.services;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
@@ -58,7 +56,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups {
* @return the response
*/
public Response listLicenseKeyGroups(String vlmId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_LKG.toString());
Collection<LicenseKeyGroupEntity> licenseKeyGroups =
vendorLicenseManager.listLicenseKeyGroups(vlmId, new Version(versionId));
@@ -81,7 +78,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups {
*/
public Response createLicenseKeyGroup(LicenseKeyGroupRequestDto request, String vlmId,
String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_LKG.toString());
LicenseKeyGroupEntity licenseKeyGroupEntity =
new MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity()
.applyMapping(request, LicenseKeyGroupEntity.class);
@@ -108,7 +104,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups {
public Response updateLicenseKeyGroup(LicenseKeyGroupRequestDto request, String vlmId,
String versionId,
String licenseKeyGroupId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_LKG.toString());
LicenseKeyGroupEntity licenseKeyGroupEntity =
new MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity()
.applyMapping(request, LicenseKeyGroupEntity.class);
@@ -131,7 +126,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups {
*/
public Response getLicenseKeyGroup(String vlmId, String versionId, String licenseKeyGroupId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_LKG.toString());
LicenseKeyGroupEntity lkgInput = new LicenseKeyGroupEntity();
lkgInput.setVendorLicenseModelId(vlmId);
lkgInput.setVersion(new Version(versionId));
@@ -154,7 +148,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups {
*/
public Response deleteLicenseKeyGroup(String vlmId, String versionId, String licenseKeyGroupId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_LKG.toString());
LicenseKeyGroupEntity lkgInput = new LicenseKeyGroupEntity();
lkgInput.setVendorLicenseModelId(vlmId);
lkgInput.setVersion(new Version(versionId));
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
index 85c0b275b7..68b387e5bc 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
@@ -33,9 +33,6 @@ import org.openecomp.sdc.itempermissions.ItemPermissionsManagerFactory;
import org.openecomp.sdc.itempermissions.impl.types.PermissionTypes;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.notification.dtos.Event;
import org.openecomp.sdc.notification.factories.NotificationPropagationManagerFactory;
import org.openecomp.sdc.notification.services.NotificationPropagationManager;
@@ -88,7 +85,6 @@ import static org.openecomp.sdcrests.vendorlicense.types.VendorLicenseModelActio
@Validated
public class VendorLicenseModelsImpl implements VendorLicenseModels {
- private static final String VLM_ID = "VLM id";
private static final String SUBMIT_ITEM_ACTION = "Submit_Item";
private static final String SUBMIT_HEALED_VERSION_ERROR =
"VLM Id %s: Error while submitting version %s created based on Certified version %s for healing purpose.";
@@ -108,8 +104,6 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels {
@Override
public Response listLicenseModels(String versionStatus, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_VLM.toString());
-
Predicate<Item> itemPredicate;
if (VersionStatus.Certified.name().equals(versionStatus)) {
itemPredicate = item -> ItemType.vlm.name().equals(item.getType()) &&
@@ -134,8 +128,6 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels {
@Override
public Response createLicenseModel(VendorLicenseModelRequestDto request, String user) {
- LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.CREATE_VLM + request.getVendorName());
- MdcUtil.initMdc(LoggerServiceName.Create_VLM.toString());
Item item = new Item();
item.setType(ItemType.vlm.name());
@@ -171,8 +163,6 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels {
@Override
public Response updateLicenseModel(VendorLicenseModelRequestDto request, String vlmId,
String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_VLM.toString());
-
VendorLicenseModelEntity vlm =
new MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity()
.applyMapping(request, VendorLicenseModelEntity.class);
@@ -185,8 +175,6 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels {
@Override
public Response getLicenseModel(String vlmId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_VLM.toString());
-
Version version = versioningManager.get(vlmId, new Version(versionId));
VendorLicenseModelEntity vlm = vendorLicenseManager.getVendorLicenseModel(vlmId, version);
vlm.setWritetimeMicroSeconds(version.getModificationTime().getTime());
@@ -214,7 +202,6 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels {
@Override
public Response deleteLicenseModel(String vlmId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_VLM.toString());
vendorLicenseManager.deleteVendorLicenseModel(vlmId, new Version(versionId));
return Response.ok().build();
}
@@ -240,8 +227,6 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels {
}
private void submit(String vlmId, Version version, String message, String user) {
- MdcUtil.initMdc(LoggerServiceName.Submit_VLM.toString());
- LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.SUBMIT_VLM + vlmId);
vendorLicenseManager.validate(vlmId, version);
versioningManager.submit(vlmId, version, message);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java
index eab5e3e892..f57e9bb14d 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java
@@ -16,8 +16,6 @@
package org.openecomp.sdcrests.vsp.rest.services;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentDependencyModelManager;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentDependencyModelManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentDependencyModelEntity;
@@ -48,8 +46,6 @@ public class ComponentDependenciesImpl implements ComponentDependencies {
@Override
public Response create(ComponentDependencyModel request, String vspId, String versionId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.CREATE_COMPONENT_DEPENDENCY_MODEL.toString());
-
final Version version = new Version(versionId);
ComponentDependencyModelEntity modelEntity =
@@ -72,7 +68,7 @@ public class ComponentDependenciesImpl implements ComponentDependencies {
@Override
public Response list(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.GET_LIST_COMPONENT_DEPENDENCY.toString());
+
Version vspVersion = new Version(versionId);
Collection<ComponentDependencyModelEntity> componentDependencies =
@@ -90,7 +86,7 @@ public class ComponentDependenciesImpl implements ComponentDependencies {
@Override
public Response delete(String vspId, String versionId, String dependencyId, String user) {
- MdcUtil.initMdc(LoggerServiceName.DELETE_COMPONENT_DEPENDENCY.toString());
+
Version vspVersion = new Version(versionId);
componentDependencyModelManager.delete(vspId, vspVersion, dependencyId);
return Response.ok().build();
@@ -100,8 +96,6 @@ public class ComponentDependenciesImpl implements ComponentDependencies {
public Response update(ComponentDependencyModel request, String vspId, String versionId, String
dependencyId, String user) {
- MdcUtil.initMdc(LoggerServiceName.UPDATE_COMPONENT_DEPENDENCY.toString());
-
final Version version = new Version(versionId);
ComponentDependencyModelEntity modelEntity =
new MapComponentDependencyModelRequestToEntity().applyMapping(request,
@@ -116,7 +110,7 @@ public class ComponentDependenciesImpl implements ComponentDependencies {
@Override
public Response get(String vspId, String version, String dependencyId, String user) {
- MdcUtil.initMdc(LoggerServiceName.GET_COMPONENT_DEPENDENCY.toString());
+
ComponentDependencyModelEntity componentDependencyModelEntity = componentDependencyModelManager
.get(vspId, new Version(version), dependencyId);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java
index 6e7f9cdbc2..247f06f31f 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java
@@ -4,11 +4,6 @@ import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.openecomp.core.enrichment.types.MonitoringUploadType;
import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
import org.openecomp.sdc.common.errors.Messages;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.MonitoringUploadsManager;
@@ -39,16 +34,11 @@ public class ComponentMonitoringUploadsImpl implements ComponentMonitoringUpload
monitoringUploadsManager = MonitoringUploadsManagerFactory.getInstance().createInterface();
private ComponentManager componentManager =
ComponentManagerFactory.getInstance().createInterface();
- private static final Logger logger =
- LoggerFactory.getLogger(ComponentMonitoringUploadsImpl.class);
@Override
public Response upload(Attachment attachment,
String vspId, String versionId, String componentId, String type,
String user) throws Exception {
- MdcUtil.initMdc(LoggerServiceName.Upload_Monitoring_Artifact.toString());
- logger.audit(AuditMessages.AUDIT_MSG + String.format(AuditMessages
- .UPLOAD_MONITORING_FILE, type, vspId, componentId));
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
@@ -77,7 +67,6 @@ public class ComponentMonitoringUploadsImpl implements ComponentMonitoringUpload
@Override
public Response delete(String vspId, String versionId, String componentId,
String type, String user) throws Exception {
- MdcUtil.initMdc(LoggerServiceName.Delete_Monitoring_Artifact.toString());
MonitoringUploadType monitoringUploadType = getMonitoringUploadType(vspId, componentId, type);
@@ -90,7 +79,6 @@ public class ComponentMonitoringUploadsImpl implements ComponentMonitoringUpload
@Override
public Response list(String vspId, String versionId, String componentId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.List_Monitoring_Artifacts.toString());
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java
index bad6f169d9..208bacb5ec 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java
@@ -25,11 +25,6 @@ import org.openecomp.sdc.activitylog.ActivityLogManager;
import org.openecomp.sdc.activitylog.ActivityLogManagerFactory;
import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
import org.openecomp.sdc.activitylog.dao.type.ActivityType;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.ProcessManager;
@@ -63,12 +58,9 @@ public class ComponentProcessesImpl implements ComponentProcesses {
private ActivityLogManager activityLogManager =
ActivityLogManagerFactory.getInstance().createInterface();
- private static final Logger logger =
- LoggerFactory.getLogger(ComponentProcessesImpl.class);
-
@Override
public Response list(String vspId, String versionId, String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_Component_Processes.toString());
+
Version version = new Version(versionId);
validateComponentExistence(vspId, version, componentId, user);
Collection<ProcessEntity> processes = processManager.listProcesses(vspId, version, componentId);
@@ -84,7 +76,7 @@ public class ComponentProcessesImpl implements ComponentProcesses {
@Override
public Response deleteList(String vspId, String versionId, String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_List_Component_Processes.toString());
+
Version version = new Version(versionId);
validateComponentExistence(vspId, version, componentId, user);
processManager.deleteProcesses(vspId, version, componentId);
@@ -95,7 +87,7 @@ public class ComponentProcessesImpl implements ComponentProcesses {
@Override
public Response create(ProcessRequestDto request, String vspId, String versionId,
String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_Component_Processes.toString());
+
ProcessEntity process =
new MapProcessRequestDtoToProcessEntity().applyMapping(request, ProcessEntity.class);
process.setVspId(vspId);
@@ -113,7 +105,7 @@ public class ComponentProcessesImpl implements ComponentProcesses {
@Override
public Response get(String vspId, String versionId, String componentId, String processId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Component_Processes.toString());
+
Version version = new Version(versionId);
validateComponentExistence(vspId, version, componentId, user);
ProcessEntity process = processManager.getProcess(vspId, version, componentId, processId);
@@ -125,7 +117,7 @@ public class ComponentProcessesImpl implements ComponentProcesses {
@Override
public Response delete(String vspId, String versionId, String componentId, String processId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Component_Processes.toString());
+
Version version = new Version(versionId);
validateComponentExistence(vspId, version, componentId, user);
processManager.deleteProcess(vspId, version, componentId, processId);
@@ -136,7 +128,7 @@ public class ComponentProcessesImpl implements ComponentProcesses {
public Response update(ProcessRequestDto request, String vspId, String versionId,
String componentId,
String processId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Component_Processes.toString());
+
ProcessEntity process =
new MapProcessRequestDtoToProcessEntity().applyMapping(request, ProcessEntity.class);
process.setVspId(vspId);
@@ -151,7 +143,7 @@ public class ComponentProcessesImpl implements ComponentProcesses {
@Override
public Response getUploadedFile(String vspId, String versionId, String componentId,
String processId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Uploaded_File_Component_Processes.toString());
+
Version vspVersion = new Version(versionId);
validateComponentExistence(vspId, vspVersion, componentId, user);
File file = processManager.getProcessArtifact(vspId, vspVersion, componentId, processId);
@@ -168,7 +160,7 @@ public class ComponentProcessesImpl implements ComponentProcesses {
public Response deleteUploadedFile(String vspId, String versionId, String componentId,
String processId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Uploaded_File_Component_Processes.toString());
+
Version version = new Version(versionId);
validateComponentExistence(vspId, version, componentId, user);
processManager.deleteProcessArtifact(vspId, version, componentId, processId);
@@ -179,8 +171,7 @@ public class ComponentProcessesImpl implements ComponentProcesses {
public Response uploadFile(Attachment attachment, String vspId, String versionId,
String componentId,
String processId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Upload_File_Component_Processes.toString());
- logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.UPLOAD_PROCESS_ARTIFACT + vspId);
+
Version version = new Version(versionId);
validateComponentExistence(vspId, version, componentId, user);
processManager.uploadProcessArtifact(attachment.getObject(InputStream.class),
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java
index de422ece7f..abb87e4e54 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java
@@ -21,8 +21,6 @@
package org.openecomp.sdcrests.vsp.rest.services;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
@@ -62,7 +60,7 @@ public class ComponentsImpl implements Components {
@Override
public Response list(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_Components.toString());
+
Collection<ComponentEntity> components =
componentManager.listComponents(vspId, new Version(versionId));
@@ -77,14 +75,13 @@ public class ComponentsImpl implements Components {
@Override
public Response deleteList(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_List_Components.toString());
componentManager.deleteComponents(vspId, new Version(versionId));
return Response.ok().build();
}
@Override
public Response create(ComponentRequestDto request, String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_Component.toString());
+
ComponentEntity component =
new MapComponentRequestDtoToComponentEntity().applyMapping(request, ComponentEntity.class);
component.setVspId(vspId);
@@ -102,7 +99,7 @@ public class ComponentsImpl implements Components {
@Override
public Response get(String vspId, String versionId, String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Component.toString());
+
CompositionEntityResponse<ComponentData> response =
componentManager.getComponent(vspId, new Version(versionId), componentId);
@@ -114,7 +111,6 @@ public class ComponentsImpl implements Components {
@Override
public Response delete(String vspId, String versionId, String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Component.toString());
componentManager.deleteComponent(vspId, new Version(versionId), componentId);
return Response.ok().build();
}
@@ -123,7 +119,6 @@ public class ComponentsImpl implements Components {
public Response update(ComponentRequestDto request, String vspId, String versionId,
String componentId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Component.toString());
ComponentEntity componentEntity =
new MapComponentRequestDtoToComponentEntity().applyMapping(request, ComponentEntity.class);
componentEntity.setVspId(vspId);
@@ -141,7 +136,6 @@ public class ComponentsImpl implements Components {
@Override
public Response getQuestionnaire(String vspId, String versionId, String componentId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_Component.toString());
QuestionnaireResponse questionnaireResponse =
componentManager.getQuestionnaire(vspId, new Version(versionId), componentId);
@@ -153,7 +147,6 @@ public class ComponentsImpl implements Components {
@Override
public Response updateQuestionnaire(String questionnaireData, String vspId, String versionId,
String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_Component.toString());
componentManager
.updateQuestionnaire(vspId, new Version(versionId), componentId, questionnaireData);
return Response.ok().build();
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java
index 081024a519..f655dfbb44 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java
@@ -1,8 +1,6 @@
package org.openecomp.sdcrests.vsp.rest.services;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.ComputeManager;
@@ -47,7 +45,7 @@ public class ComputeImpl implements Compute {
@Override
public Response list(String vspId, String versionId, String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_Computes.toString());
+
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
Collection<ListComputeResponse> computes =
@@ -65,7 +63,7 @@ public class ComputeImpl implements Compute {
@Override
public Response get(String vspId, String versionId, String componentId, String computeId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Compute.toString());
+
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
CompositionEntityResponse<ComputeData> response =
@@ -81,7 +79,7 @@ public class ComputeImpl implements Compute {
@Override
public Response create(ComputeDetailsDto request, String vspId, String versionId,
String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_Compute.toString());
+
ComputeEntity compute = new MapComputeDetailsDtoToComputeEntity().applyMapping(request,
ComputeEntity.class);
compute.setVspId(vspId);
@@ -100,7 +98,7 @@ public class ComputeImpl implements Compute {
@Override
public Response update(ComputeDetailsDto request, String vspId, String versionId,
String componentId, String computeFlavorId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Compute.toString());
+
ComputeEntity compute =
new MapComputeDetailsDtoToComputeEntity().applyMapping(request, ComputeEntity.class);
compute.setVspId(vspId);
@@ -119,7 +117,7 @@ public class ComputeImpl implements Compute {
@Override
public Response delete(String vspId, String versionId, String componentId, String computeFlavorId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Compute.toString());
+
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
computetManager.deleteCompute(vspId, version, componentId, computeFlavorId);
@@ -129,7 +127,7 @@ public class ComputeImpl implements Compute {
@Override
public Response getQuestionnaire(String vspId, String versionId, String componentId,
String computeFlavorId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_Compute.toString());
+
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
QuestionnaireResponse questionnaireResponse =
@@ -143,7 +141,7 @@ public class ComputeImpl implements Compute {
@Override
public Response updateQuestionnaire(String questionnaireData, String vspId, String versionId,
String componentId, String computeFlavorId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_Compute.toString());
+
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
computetManager.updateComputeQuestionnaire(vspId, version, componentId, computeFlavorId,
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java
index d1486b66b8..dc1610278a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java
@@ -1,8 +1,6 @@
package org.openecomp.sdcrests.vsp.rest.services;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.DeploymentFlavorManager;
import org.openecomp.sdc.vendorsoftwareproduct.DeploymentFlavorManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.DeploymentFlavorEntity;
@@ -41,7 +39,6 @@ public class DeploymentFlavorsImpl implements DeploymentFlavors {
@Override
public Response create(DeploymentFlavorRequestDto request, String vspId, String versionId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_Deployment_Flavor.toString());
DeploymentFlavorEntity deploymentFlavorEntity =
new MapDeploymentFlavorRequestDtoToDeploymentFlavorEntity()
.applyMapping(request, DeploymentFlavorEntity.class);
@@ -60,7 +57,6 @@ public class DeploymentFlavorsImpl implements DeploymentFlavors {
@Override
public Response list(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_List_Deployment_flavor.toString());
Collection<DeploymentFlavorEntity> deploymentFlavors =
deploymentFlavorManager.listDeploymentFlavors(vspId, new Version(versionId));
@@ -76,7 +72,6 @@ public class DeploymentFlavorsImpl implements DeploymentFlavors {
@Override
public Response get(String vspId, String versionId, String deploymentFlavorId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Deployment_flavor.toString());
CompositionEntityResponse<DeploymentFlavor> response = deploymentFlavorManager
.getDeploymentFlavor(vspId, new Version(versionId), deploymentFlavorId);
@@ -90,7 +85,6 @@ public class DeploymentFlavorsImpl implements DeploymentFlavors {
@Override
public Response getSchema(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Deployment_flavor.toString());
CompositionEntityResponse<DeploymentFlavor> response = deploymentFlavorManager
.getDeploymentFlavorSchema(vspId, new Version(versionId));
return Response.ok(response).build();
@@ -98,7 +92,6 @@ public class DeploymentFlavorsImpl implements DeploymentFlavors {
@Override
public Response delete(String vspId, String versionId, String deploymentFlavorId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Deployment_flavor.toString());
Version version = new Version(versionId);
deploymentFlavorManager.deleteDeploymentFlavor(vspId, version, deploymentFlavorId);
return Response.ok().build();
@@ -107,7 +100,6 @@ public class DeploymentFlavorsImpl implements DeploymentFlavors {
@Override
public Response update(DeploymentFlavorRequestDto request, String vspId, String versionId,
String deploymentFlavorId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Deployment_flavor.toString());
DeploymentFlavorEntity deploymentFlavorEntity =
new MapDeploymentFlavorRequestDtoToDeploymentFlavorEntity().applyMapping(request,
DeploymentFlavorEntity.class);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java
index b8e0f64cf2..066a4792c3 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java
@@ -2,8 +2,6 @@ package org.openecomp.sdcrests.vsp.rest.services;
import org.apache.commons.collections.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.ImageManager;
@@ -46,7 +44,6 @@ public class ImagesImpl implements Images {
@Override
public Response create(ImageRequestDto request, String vspId, String versionId,
String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_Image.toString());
ImageEntity image =
new MapImageRequestDtoToImageEntity().applyMapping(request, ImageEntity.class);
image.setVspId(vspId);
@@ -63,7 +60,6 @@ public class ImagesImpl implements Images {
@Override
public Response getImageSchema(String vspId, String versionId, String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.GET_Image_Schema.toString());
CompositionEntityResponse<Image> response = imageManager.getImageSchema(vspId);
return Response.ok(response).build();
}
@@ -71,7 +67,6 @@ public class ImagesImpl implements Images {
@Override
public Response get(String vspId, String versionId, String componentId, String imageId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.GET_Image.toString());
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
CompositionEntityResponse<Image> response =
@@ -82,7 +77,6 @@ public class ImagesImpl implements Images {
@Override
public Response list(String vspId, String versionId, String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_Images.toString());
Version vspVersion = new Version(versionId);
componentManager.validateComponentExistence(vspId, vspVersion, componentId);
Collection<ImageEntity> images = imageManager.listImages(vspId, vspVersion, componentId);
@@ -99,7 +93,6 @@ public class ImagesImpl implements Images {
@Override
public Response delete(String vspId, String versionId, String componentId, String imageId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Image.toString());
Version vspVersion = new Version(versionId);
componentManager.validateComponentExistence(vspId, vspVersion, componentId);
imageManager.deleteImage(vspId, vspVersion, componentId, imageId);
@@ -109,7 +102,6 @@ public class ImagesImpl implements Images {
@Override
public Response update(ImageRequestDto request, String vspId, String versionId,
String componentId, String imageId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Image.toString());
ImageEntity imageEntity = new MapImageRequestDtoToImageEntity().applyMapping(request,
ImageEntity.class);
imageEntity.setVspId(vspId);
@@ -129,7 +121,6 @@ public class ImagesImpl implements Images {
@Override
public Response getQuestionnaire(String vspId, String versionId, String componentId,
String imageId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_Compute.toString());
Version vspVersion = new Version(versionId);
componentManager.validateComponentExistence(vspId, vspVersion, componentId);
QuestionnaireResponse questionnaireResponse =
@@ -144,7 +135,6 @@ public class ImagesImpl implements Images {
@Override
public Response updateQuestionnaire(String questionnaireData, String vspId, String versionId,
String componentId, String imageId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_Compute.toString());
Version version = new Version(versionId);
componentManager.validateComponentExistence(vspId, version, componentId);
imageManager.updateImageQuestionnaire(vspId, version, componentId, imageId, questionnaireData);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java
index 5478327fc1..1177eedb9c 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java
@@ -21,8 +21,6 @@
package org.openecomp.sdcrests.vsp.rest.services;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.NetworkManager;
import org.openecomp.sdc.vendorsoftwareproduct.NetworkManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
@@ -59,7 +57,6 @@ public class NetworksImpl implements Networks {
@Override
public Response list(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_Network.toString());
Collection<NetworkEntity> networks =
networkManager.listNetworks(vspId, new Version(versionId));
@@ -74,7 +71,6 @@ public class NetworksImpl implements Networks {
@Override
public Response create(NetworkRequestDto request, String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_Network.toString());
NetworkEntity network =
new MapNetworkRequestDtoToNetworkEntity().applyMapping(request, NetworkEntity.class);
network.setVspId(vspId);
@@ -87,7 +83,6 @@ public class NetworksImpl implements Networks {
@Override
public Response get(String vspId, String versionId, String networkId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Network.toString());
CompositionEntityResponse<Network> response =
networkManager.getNetwork(vspId,
new Version(versionId), networkId
@@ -101,7 +96,6 @@ public class NetworksImpl implements Networks {
@Override
public Response delete(String vspId, String versionId, String networkId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Network.toString());
networkManager
.deleteNetwork(vspId, new Version(versionId),
networkId);
@@ -111,7 +105,6 @@ public class NetworksImpl implements Networks {
@Override
public Response update(NetworkRequestDto request, String vspId, String versionId,
String networkId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Network.toString());
NetworkEntity networkEntity =
new MapNetworkRequestDtoToNetworkEntity().applyMapping(request, NetworkEntity.class);
networkEntity.setVspId(vspId);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java
index 738609acba..cdd1053cd1 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java
@@ -21,8 +21,6 @@
package org.openecomp.sdcrests.vsp.rest.services;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.NicManager;
@@ -65,7 +63,6 @@ public class NicsImpl implements Nics {
@Override
public Response list(String vspId, String versionId, String componentId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_nics.toString());
Version vspVersion = new Version(versionId);
componentManager.validateComponentExistence(vspId, vspVersion, componentId);
Collection<NicEntity> nics = nicManager.listNics(vspId, vspVersion, componentId);
@@ -82,7 +79,6 @@ public class NicsImpl implements Nics {
@Override
public Response create(NicRequestDto request, String vspId, String versionId, String componentId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_nic.toString());
NicEntity nic = new MapNicRequestDtoToNicEntity().applyMapping(request, NicEntity.class);
nic.setVspId(vspId);
nic.setVersion(new Version(versionId));
@@ -101,7 +97,6 @@ public class NicsImpl implements Nics {
@Override
public Response get(String vspId, String versionId, String componentId, String nicId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_nic.toString());
Version vspVersion = new Version(versionId);
componentManager.validateComponentExistence(vspId, vspVersion, componentId);
CompositionEntityResponse<Nic> response =
@@ -116,7 +111,6 @@ public class NicsImpl implements Nics {
@Override
public Response delete(String vspId, String versionId, String componentId, String nicId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_nic.toString());
Version vspVersion = new Version(versionId);
componentManager.validateComponentExistence(vspId, vspVersion, componentId);
nicManager.deleteNic(vspId, vspVersion, componentId, nicId);
@@ -127,7 +121,6 @@ public class NicsImpl implements Nics {
public Response update(NicRequestDto request, String vspId, String versionId, String componentId,
String nicId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_nic.toString());
NicEntity nicEntity = new MapNicRequestDtoToNicEntity().applyMapping(request, NicEntity.class);
nicEntity.setVspId(vspId);
nicEntity.setVersion(new Version(versionId));
@@ -147,7 +140,6 @@ public class NicsImpl implements Nics {
@Override
public Response getQuestionnaire(String vspId, String versionId, String componentId, String nicId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_nic.toString());
Version vspVersion = new Version(versionId);
componentManager.validateComponentExistence(vspId, vspVersion, componentId);
QuestionnaireResponse questionnaireResponse =
@@ -162,7 +154,6 @@ public class NicsImpl implements Nics {
public Response updateQuestionnaire(String questionnaireData, String vspId, String versionId,
String componentId,
String nicId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_nic.toString());
Version vspVersion = new Version(versionId);
componentManager.validateComponentExistence(vspId, vspVersion, componentId);
nicManager
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
index aaee77df46..e6be1dcbe9 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
@@ -9,11 +9,6 @@ import org.openecomp.sdc.activitylog.ActivityLogManagerFactory;
import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
import org.openecomp.sdc.activitylog.dao.type.ActivityType;
import org.openecomp.sdc.common.errors.Messages;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManager;
import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManagerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.types.OrchestrationTemplateActionResponse;
@@ -52,13 +47,8 @@ public class OrchestrationTemplateCandidateImpl implements OrchestrationTemplate
private ActivityLogManager activityLogManager =
ActivityLogManagerFactory.getInstance().createInterface();
- private static final Logger logger =
- LoggerFactory.getLogger(OrchestrationTemplateCandidateImpl.class);
-
@Override
public Response upload(String vspId, String versionId, Attachment fileToUpload, String user) {
- MdcUtil.initMdc(LoggerServiceName.Upload_File.toString());
- logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.UPLOAD_HEAT + vspId);
String filename = fileToUpload.getContentDisposition().getParameter("filename");
UploadFileResponse uploadFileResponse = candidateManager
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
index ab67b68cd8..bc22230dde 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
@@ -21,11 +21,6 @@
package org.openecomp.sdcrests.vsp.rest.services;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.ProcessRequestDto;
import org.openecomp.sdcrests.vsp.rest.ComponentProcesses;
import org.openecomp.sdcrests.vsp.rest.Processes;
@@ -41,65 +36,54 @@ import javax.ws.rs.core.Response;
@Scope(value = "prototype")
public class ProcessesImpl implements Processes {
- private static final Logger logger = LoggerFactory.getLogger(ProcessesImpl.class);
@Autowired
private ComponentProcesses componentProcesses;
@Override
public Response list(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_Processes.toString());
return componentProcesses.list(vspId, versionId, null, user);
}
@Override
public Response deleteList(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_List_Processes.toString());
return componentProcesses.deleteList(vspId, versionId, null, user);
}
@Override
public Response create(ProcessRequestDto request, String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_Process.toString());
return componentProcesses.create(request, vspId, versionId, null, user);
}
@Override
public Response get(String vspId, String versionId, String processId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Processes.toString());
return componentProcesses.get(vspId, versionId, null, processId, user);
}
@Override
public Response delete(String vspId, String versionId, String processId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Processes.toString());
return componentProcesses.delete(vspId, versionId, null, processId, user);
}
@Override
public Response update(ProcessRequestDto request, String vspId, String versionId,
String processId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Process.toString());
return componentProcesses.update(request, vspId, versionId, null, processId, user);
}
@Override
public Response getUploadedFile(String vspId, String versionId, String processId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Uploaded_File_Processes.toString());
return componentProcesses.getUploadedFile(vspId, versionId, null, processId, user);
}
@Override
public Response deleteUploadedFile(String vspId, String versionId, String processId,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_Uploaded_File_Processes.toString());
return componentProcesses.deleteUploadedFile(vspId, versionId, null, processId, user);
}
@Override
public Response uploadFile(Attachment attachment, String vspId, String versionId,
String processId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Upload_File_Processes.toString());
- logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.UPLOAD_PROCESS_ARTIFACT + vspId);
return componentProcesses.uploadFile(attachment, vspId, versionId, null, processId, user);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
index 2ea6116ffd..fa6c778995 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
@@ -16,17 +16,6 @@
package org.openecomp.sdcrests.vsp.rest.services;
-import static javax.ws.rs.core.HttpHeaders.CONTENT_DISPOSITION;
-import static org.openecomp.sdc.itempermissions.notifications.NotificationConstants.PERMISSION_USER;
-import static org.openecomp.sdc.logging.messages.AuditMessages.SUBMIT_VSP_ERROR;
-import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.UniqueValues.VENDOR_SOFTWARE_PRODUCT_NAME;
-import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.VALIDATION_VSP_NAME;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.ITEM_ID;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.ITEM_NAME;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.SUBMIT_DESCRIPTION;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_ID;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_NAME;
-
import org.apache.commons.collections4.MapUtils;
import org.openecomp.core.util.UniqueValueUtil;
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
@@ -46,12 +35,7 @@ import org.openecomp.sdc.itempermissions.ItemPermissionsManagerFactory;
import org.openecomp.sdc.itempermissions.impl.types.PermissionTypes;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerConstants;
-import org.openecomp.sdc.logging.types.LoggerErrorCode;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
-import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.notification.dtos.Event;
import org.openecomp.sdc.notification.factories.NotificationPropagationManagerFactory;
import org.openecomp.sdc.notification.services.NotificationPropagationManager;
@@ -115,6 +99,17 @@ import java.util.Map;
import java.util.Optional;
import java.util.function.Predicate;
+import static javax.ws.rs.core.HttpHeaders.CONTENT_DISPOSITION;
+import static org.openecomp.sdc.itempermissions.notifications.NotificationConstants.PERMISSION_USER;
+import static org.openecomp.sdc.logging.messages.AuditMessages.SUBMIT_VSP_ERROR;
+import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.UniqueValues.VENDOR_SOFTWARE_PRODUCT_NAME;
+import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.VALIDATION_VSP_NAME;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.ITEM_ID;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.ITEM_NAME;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.SUBMIT_DESCRIPTION;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_ID;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_NAME;
+
@Named
@Service("vendorSoftwareProducts")
@@ -143,8 +138,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response createVsp(VspRequestDto vspRequestDto, String user) {
- MdcUtil.initMdc(LoggerServiceName.Create_VSP.toString());
- LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.CREATE_VSP + vspRequestDto.getName());
OnboardingMethod onboardingMethod = null;
try {
@@ -204,8 +197,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response listVsps(String versionStatus, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_VSP.toString());
-
Predicate<Item> itemPredicate;
if (VersionStatus.Certified.name().equals(versionStatus)) {
itemPredicate = item -> ItemType.vsp.name().equals(item.getType())
@@ -231,8 +222,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response getVsp(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_VSP.toString());
-
Version version = versioningManager.get(vspId, new Version(versionId));
VspDetails vspDetails = vendorSoftwareProductManager.getVsp(vspId, version);
vspDetails.setWritetimeMicroSeconds(version.getModificationTime().getTime());
@@ -281,7 +270,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response updateVsp(String vspId, String versionId, VspDescriptionDto vspDescriptionDto,
String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_VSP.toString());
VspDetails vspDetails =
new MapVspDescriptionDtoToVspDetails().applyMapping(vspDescriptionDto, VspDetails.class);
vspDetails.setId(vspId);
@@ -294,7 +282,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response deleteVsp(String vspId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Delete_VSP.toString());
vendorSoftwareProductManager.deleteVsp(vspId);
return Response.ok().build();
@@ -365,7 +352,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response getOrchestrationTemplate(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Uploaded_File.toString());
byte[] orchestrationTemplateFile =
vendorSoftwareProductManager.getOrchestrationTemplateFile(vspId, new Version(versionId));
@@ -379,7 +365,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response listPackages(String category, String subCategory, String user) {
- MdcUtil.initMdc(LoggerServiceName.List_Packages.toString());
List<PackageInfo> packageInfoList =
vendorSoftwareProductManager.listPackages(category, subCategory);
@@ -396,20 +381,14 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response getTranslatedFile(String vspId, String versionName, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Translated_File.toString());
-
List<Version> versions = versioningManager.list(vspId);
Version version;
- if (versionName == null) {
- version = versions.stream().filter(ver -> VersionStatus.Certified == ver.getStatus())
- .max(Comparator.comparingDouble(o -> Double.parseDouble(o.getName()))).orElseThrow(() -> {
- return new CoreException(new PackageNotFoundErrorBuilder(vspId).build());
- });
- } else {
+ if (versionName == null) version = versions.stream().filter(ver -> VersionStatus.Certified == ver.getStatus())
+ .max(Comparator.comparingDouble(o -> Double.parseDouble(o.getName())))
+ .orElseThrow(() -> new CoreException(new PackageNotFoundErrorBuilder(vspId).build()));
+ else {
version = versions.stream().filter(ver -> versionName.equals(ver.getName()))
- .findFirst().orElseThrow(() -> {
- return new CoreException(new PackageNotFoundErrorBuilder(vspId).build());
- });
+ .findFirst().orElseThrow(() -> new CoreException(new PackageNotFoundErrorBuilder(vspId).build()));
if (version.getStatus() != VersionStatus.Certified) {
throw new CoreException(new RequestedVersionInvalidErrorBuilder().build());
@@ -431,7 +410,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response getQuestionnaire(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_VSP.toString());
QuestionnaireResponse questionnaireResponse =
vendorSoftwareProductManager.getVspQuestionnaire(vspId, new Version(versionId));
@@ -449,7 +427,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response updateQuestionnaire(String questionnaireData, String vspId, String
versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_VSP.toString());
vendorSoftwareProductManager
.updateVspQuestionnaire(vspId, new Version(versionId), questionnaireData);
return Response.ok().build();
@@ -464,7 +441,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
@Override
public Response getVspInformationArtifact(String vspId, String versionId, String user) {
- MdcUtil.initMdc(LoggerServiceName.Get_Information_Artifact.toString());
File textInformationArtifact =
vendorSoftwareProductManager.getInformationArtifact(vspId, new Version(versionId));
@@ -494,8 +470,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
private Optional<ValidationResponse> submit(String vspId, Version version, String message,
String user) throws IOException {
- MdcUtil.initMdc(LoggerServiceName.Submit_VSP.toString());
- LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.SUBMIT_VSP + vspId);
ValidationResponse validationResponse = vendorSoftwareProductManager.validate(vspId, version);
Map<String, List<ErrorMessage>> compilationErrors =
@@ -582,8 +556,6 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
}
private Response createPackage(String vspId, Version version) throws IOException {
- MdcUtil.initMdc(LoggerServiceName.Create_Package.toString());
-
Version retrievedVersion = versioningManager.get(vspId, version);
if (retrievedVersion.getStatus() != VersionStatus.Certified) {
throw new CoreException(