summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest
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/openecomp-sdc-rest-webapp/vendor-license-rest
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/openecomp-sdc-rest-webapp/vendor-license-rest')
-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
7 files changed, 8 insertions, 78 deletions
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);