diff options
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src')
7 files changed, 0 insertions, 217 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 a866278cf3..09a4ca8ebe 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 @@ -2,7 +2,6 @@ package org.openecomp.sdcrests.vendorlicense.rest.services; import org.openecomp.sdc.logging.context.MdcUtil; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.types.LoggerServiceName; import org.openecomp.sdc.vendorlicense.VendorLicenseManager; import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory; @@ -28,7 +27,6 @@ import java.util.Collection; @Service("entitlementPoolLimits") @Scope(value = "prototype") public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); private VendorLicenseManager vendorLicenseManager = VendorLicenseManagerFactory.getInstance().createInterface(); @@ -40,8 +38,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { String versionId, String entitlementPoolId, String user) { - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId, "EP id", entitlementPoolId); - MdcUtil.initMdc(LoggerServiceName.Create_LIMIT.toString()); Version version = new Version(versionId); vendorLicenseManager @@ -61,9 +57,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { /*StringWrapperResponse result = createdLimit != null ? new StringWrapperResponse(createdLimit.getId()) : null;*/ - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId, "EP id", entitlementPoolId); - //return Response.ok(result).build(); return Response.ok(createdLimitDto != null ? createdLimitDto : null).build(); } @@ -71,8 +64,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { @Override public Response listLimits(String vlmId, String versionId, String entitlementPoolId, String user) { - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId, "EP id", entitlementPoolId); - MdcUtil.initMdc(LoggerServiceName.List_EP.toString()); Version version = new Version(versionId); vendorLicenseManager @@ -87,18 +78,12 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { for (LimitEntity limit : limits) { result.add(outputMapper.applyMapping(limit, LimitEntityDto.class)); } - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId, "EP id", entitlementPoolId); - return Response.ok(result).build(); } @Override public Response getLimit(String vlmId, String versionId, String entitlementPoolId, String limitId, String user) { - mdcDataDebugMessage - .debugEntryMessage("VLM id, EP id, Limit Id", vlmId, entitlementPoolId, limitId); - MdcUtil.initMdc(LoggerServiceName.Get_LIMIT.toString()); Version version = new Version(versionId); @@ -113,10 +98,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { LimitEntityDto entitlementPoolEntityDto = limit == null ? null : new MapLimitEntityToLimitDto().applyMapping(limit, LimitEntityDto.class); - - mdcDataDebugMessage - .debugExitMessage("VLM id, EP id, Limit Id", vlmId, entitlementPoolId, limitId); - return Response.ok(entitlementPoolEntityDto).build(); } @@ -127,9 +108,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { String entitlementPoolId, String limitId, String user) { - mdcDataDebugMessage - .debugEntryMessage("VLM id", vlmId, "EP id", entitlementPoolId, "limit Id", limitId); - MdcUtil.initMdc(LoggerServiceName.Update_LIMIT.toString()); Version version = new Version(versionId); @@ -145,10 +123,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { limitEntity.setParent(parent); vendorLicenseManager.updateLimit(limitEntity); - - mdcDataDebugMessage - .debugExitMessage("VLM id", vlmId, "EP id", entitlementPoolId, "limit Id", limitId); - return Response.ok().build(); } @@ -163,8 +137,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { */ public Response deleteLimit(String vlmId, String versionId, String entitlementPoolId, String limitId, String user) { - mdcDataDebugMessage.debugEntryMessage("VLM id, Verison Id, EP id, Limit Id", vlmId, versionId, - entitlementPoolId, limitId); MdcUtil.initMdc(LoggerServiceName.Delete_LIMIT.toString()); Version version = new Version(versionId); @@ -179,10 +151,6 @@ public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits { limitInput.setParent(parent); vendorLicenseManager.deleteLimit(limitInput); - - mdcDataDebugMessage.debugExitMessage("VLM id, Verison Id, EP id, Limit Id", vlmId, versionId, - entitlementPoolId, limitId); - 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 8c31303b3b..07151d2232 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 @@ -21,7 +21,6 @@ package org.openecomp.sdcrests.vendorlicense.rest.services; import org.openecomp.sdc.logging.context.MdcUtil; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.types.LoggerServiceName; import org.openecomp.sdc.vendorlicense.VendorLicenseManager; import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory; @@ -45,8 +44,6 @@ import java.util.Collection; @Service("entitlementPools") @Scope(value = "prototype") public class EntitlementPoolsImpl implements EntitlementPools { - - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); private VendorLicenseManager vendorLicenseManager = VendorLicenseManagerFactory.getInstance().createInterface(); @@ -59,8 +56,6 @@ public class EntitlementPoolsImpl implements EntitlementPools { * @return the response */ public Response listEntitlementPools(String vlmId, String versionId, String user) { - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - MdcUtil.initMdc(LoggerServiceName.List_EP.toString()); Collection<EntitlementPoolEntity> entitlementPools = vendorLicenseManager.listEntitlementPools(vlmId, new Version(versionId)); @@ -71,9 +66,6 @@ public class EntitlementPoolsImpl implements EntitlementPools { for (EntitlementPoolEntity ep : entitlementPools) { result.add(outputMapper.applyMapping(ep, EntitlementPoolEntityDto.class)); } - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); - return Response.ok(result).build(); } @@ -87,9 +79,6 @@ public class EntitlementPoolsImpl implements EntitlementPools { */ public Response createEntitlementPool(EntitlementPoolRequestDto request, String vlmId, String versionId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - MdcUtil.initMdc(LoggerServiceName.Create_EP.toString()); EntitlementPoolEntity entitlementPoolEntity = new MapEntitlementPoolRequestDtoToEntitlementPoolEntity() @@ -102,9 +91,6 @@ public class EntitlementPoolsImpl implements EntitlementPools { StringWrapperResponse result = createdEntitlementPool != null ? new StringWrapperResponse(createdEntitlementPool.getId()) : null; - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); - return Response.ok(result).build(); } @@ -119,9 +105,6 @@ public class EntitlementPoolsImpl implements EntitlementPools { */ public Response updateEntitlementPool(EntitlementPoolRequestDto request, String vlmId, String versionId, String entitlementPoolId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, EP id", vlmId, entitlementPoolId); - MdcUtil.initMdc(LoggerServiceName.Update_EP.toString()); EntitlementPoolEntity entitlementPoolEntity = new MapEntitlementPoolRequestDtoToEntitlementPoolEntity() @@ -131,9 +114,6 @@ public class EntitlementPoolsImpl implements EntitlementPools { entitlementPoolEntity.setId(entitlementPoolId); vendorLicenseManager.updateEntitlementPool(entitlementPoolEntity); - - mdcDataDebugMessage.debugExitMessage("VLM id, EP id", vlmId, entitlementPoolId); - return Response.ok().build(); } @@ -148,9 +128,6 @@ public class EntitlementPoolsImpl implements EntitlementPools { */ public Response getEntitlementPool(String vlmId, String versionId, String entitlementPoolId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, EP id", vlmId, entitlementPoolId); - MdcUtil.initMdc(LoggerServiceName.Get_EP.toString()); EntitlementPoolEntity epInput = new EntitlementPoolEntity(); epInput.setVendorLicenseModelId(vlmId); @@ -161,9 +138,6 @@ public class EntitlementPoolsImpl implements EntitlementPools { EntitlementPoolEntityDto entitlementPoolEntityDto = entitlementPool == null ? null : new MapEntitlementPoolEntityToEntitlementPoolEntityDto() .applyMapping(entitlementPool, EntitlementPoolEntityDto.class); - - mdcDataDebugMessage.debugExitMessage("VLM id, EP id", vlmId, entitlementPoolId); - return Response.ok(entitlementPoolEntityDto).build(); } @@ -177,18 +151,12 @@ public class EntitlementPoolsImpl implements EntitlementPools { */ public Response deleteEntitlementPool(String vlmId, String versionId, String entitlementPoolId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, EP id", vlmId, entitlementPoolId); - MdcUtil.initMdc(LoggerServiceName.Delete_EP.toString()); EntitlementPoolEntity epInput = new EntitlementPoolEntity(); epInput.setVendorLicenseModelId(vlmId); epInput.setId(entitlementPoolId); epInput.setVersion(new Version(versionId)); vendorLicenseManager.deleteEntitlementPool(epInput); - - mdcDataDebugMessage.debugExitMessage("VLM id, EP id", vlmId, entitlementPoolId); - 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/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 9f87f98bb5..77aeac8404 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 @@ -22,7 +22,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.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.types.LoggerServiceName; import org.openecomp.sdc.vendorlicense.VendorLicenseManager; import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory; @@ -56,16 +55,11 @@ import java.util.HashSet; @Service("featureGroups") @Scope(value = "prototype") public class FeatureGroupsImpl implements FeatureGroups { - - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); private VendorLicenseManager vendorLicenseManager = VendorLicenseManagerFactory.getInstance().createInterface(); @Override public Response listFeatureGroups(String vlmId, String versionId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - MdcUtil.initMdc(LoggerServiceName.List_FG.toString()); Collection<FeatureGroupEntity> featureGroupEntities = vendorLicenseManager.listFeatureGroups(vlmId, new Version(versionId)); @@ -84,18 +78,12 @@ public class FeatureGroupsImpl implements FeatureGroups { outputMapper.doMapping(fg, fgDto); results.add(fgDto); } - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); - return Response.ok(results).build(); } @Override public Response createFeatureGroup(FeatureGroupRequestDto request, String vlmId, String versionId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - MdcUtil.initMdc(LoggerServiceName.Create_FG.toString()); FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity() .applyMapping(request, FeatureGroupEntity.class); @@ -109,18 +97,12 @@ public class FeatureGroupsImpl implements FeatureGroups { StringWrapperResponse result = createdFeatureGroup != null ? new StringWrapperResponse(createdFeatureGroup.getId()) : null; - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); - return Response.ok(result).build(); } @Override public Response updateFeatureGroup(FeatureGroupUpdateRequestDto request, String vlmId, String versionId, String featureGroupId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, FG id", vlmId, featureGroupId); - MdcUtil.initMdc(LoggerServiceName.Update_FG.toString()); FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity() .applyMapping(request, FeatureGroupEntity.class); @@ -132,18 +114,12 @@ public class FeatureGroupsImpl implements FeatureGroups { .updateFeatureGroup(featureGroupEntity, request.getAddedLicenseKeyGroupsIds(), request.getRemovedLicenseKeyGroupsIds(), request.getAddedEntitlementPoolsIds(), request.getRemovedEntitlementPoolsIds()); - - mdcDataDebugMessage.debugExitMessage("VLM id, FG id", vlmId, featureGroupId); - return Response.ok().build(); } @Override public Response getFeatureGroup(String vlmId, String versionId, String featureGroupId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, FG id", vlmId, featureGroupId); - MdcUtil.initMdc(LoggerServiceName.Get_FG.toString()); FeatureGroupEntity fgInput = new FeatureGroupEntity(); fgInput.setVendorLicenseModelId(vlmId); @@ -183,27 +159,18 @@ public class FeatureGroupsImpl implements FeatureGroups { } } - - mdcDataDebugMessage.debugExitMessage("VLM id, FG id", vlmId, featureGroupId); - return Response.ok(fgmDto).build(); } @Override public Response deleteFeatureGroup(String vlmId, String versionId, String featureGroupId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, FG id", vlmId, featureGroupId); - MdcUtil.initMdc(LoggerServiceName.Delete_FG.toString()); FeatureGroupEntity fgInput = new FeatureGroupEntity(); fgInput.setVendorLicenseModelId(vlmId); fgInput.setVersion(new Version(versionId)); fgInput.setId(featureGroupId); vendorLicenseManager.deleteFeatureGroup(fgInput); - - mdcDataDebugMessage.debugExitMessage("VLM id, FG id", vlmId, featureGroupId); - 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/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 210aadce42..5be30d861b 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 @@ -22,7 +22,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.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.types.LoggerServiceName; import org.openecomp.sdc.vendorlicense.VendorLicenseManager; import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory; @@ -53,8 +52,6 @@ import java.util.HashSet; @Service("licenseAgreements") @Scope(value = "prototype") public class LicenseAgreementsImpl implements LicenseAgreements { - - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); private VendorLicenseManager vendorLicenseManager = VendorLicenseManagerFactory.getInstance().createInterface(); @@ -67,9 +64,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements { * @return the response */ public Response listLicenseAgreements(String vlmId, String versionId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - MdcUtil.initMdc(LoggerServiceName.List_LA.toString()); Collection<LicenseAgreementEntity> licenseAgreements = vendorLicenseManager.listLicenseAgreements(vlmId, new Version(versionId)); @@ -84,9 +78,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements { outputMapper.doMapping(lae, laeDto); results.add(laeDto); } - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); - return Response.ok(results).build(); } @@ -100,9 +91,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements { */ public Response createLicenseAgreement(LicenseAgreementRequestDto request, String vlmId, String versionId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - MdcUtil.initMdc(LoggerServiceName.Create_LA.toString()); LicenseAgreementEntity licenseAgreementEntity = new MapLicenseAgreementDescriptorDtoToLicenseAgreementEntity() @@ -116,9 +104,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements { StringWrapperResponse result = createdLicenseAgreement != null ? new StringWrapperResponse(createdLicenseAgreement.getId()) : null; - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); - return Response.ok(result).build(); } @@ -133,9 +118,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements { */ public Response updateLicenseAgreement(LicenseAgreementUpdateRequestDto request, String vlmId, String versionId, String licenseAgreementId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, LA id", vlmId, licenseAgreementId); - MdcUtil.initMdc(LoggerServiceName.Update_LA.toString()); LicenseAgreementEntity licenseAgreementEntity = new MapLicenseAgreementDescriptorDtoToLicenseAgreementEntity() @@ -147,9 +129,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements { vendorLicenseManager .updateLicenseAgreement(licenseAgreementEntity, request.getAddedFeatureGroupsIds(), request.getRemovedFeatureGroupsIds()); - - mdcDataDebugMessage.debugExitMessage("VLM id, LA id", vlmId, licenseAgreementId); - return Response.ok().build(); } @@ -164,9 +143,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements { */ public Response getLicenseAgreement(String vlmId, String versionId, String licenseAgreementId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, LA id", vlmId, licenseAgreementId); - MdcUtil.initMdc(LoggerServiceName.Get_LA.toString()); LicenseAgreementModel licenseAgreementModel = vendorLicenseManager .getLicenseAgreementModel(vlmId, new Version(versionId), licenseAgreementId); @@ -195,9 +171,6 @@ public class LicenseAgreementsImpl implements LicenseAgreements { lamDto.getFeatureGroups().add(fgeDto); } } - - mdcDataDebugMessage.debugExitMessage("VLM id, LA id", vlmId, licenseAgreementId); - return Response.ok(lamDto).build(); } @@ -212,14 +185,8 @@ public class LicenseAgreementsImpl implements LicenseAgreements { */ public Response deleteLicenseAgreement(String vlmId, String versionId, String licenseAgreementId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, LA id", vlmId, licenseAgreementId); - MdcUtil.initMdc(LoggerServiceName.Delete_LA.toString()); vendorLicenseManager.deleteLicenseAgreement(vlmId, new Version(versionId), licenseAgreementId); - - mdcDataDebugMessage.debugExitMessage("VLM id, LA id", vlmId, 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 3aef837bd3..164ea28a7a 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,6 @@ package org.openecomp.sdcrests.vendorlicense.rest.services; import org.openecomp.sdc.logging.context.MdcUtil; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.types.LoggerServiceName; import org.openecomp.sdc.vendorlicense.VendorLicenseManager; import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory; @@ -27,8 +26,6 @@ import java.util.Collection; @Service("licenseKeyGroupLimits") @Scope(value = "prototype") public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { - - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); private VendorLicenseManager vendorLicenseManager = VendorLicenseManagerFactory.getInstance().createInterface(); @@ -41,9 +38,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { String versionId, String licenseKeyGroupId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId, "LKG id", licenseKeyGroupId); - MdcUtil.initMdc(LoggerServiceName.Create_LIMIT.toString()); Version version = new Version(versionId); vendorLicenseManager.getLicenseKeyGroup( @@ -62,9 +56,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { /*StringWrapperResponse result = createdLimit != null ? new StringWrapperResponse(createdLimit.getId()) : null;*/ - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId, "LKG id", licenseKeyGroupId); - //return Response.ok(result).build(); return Response.ok(createdLimitDto != null ? createdLimitDto : null).build(); } @@ -72,8 +63,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { @Override public Response listLimits(String vlmId, String versionId, String licenseKeyGroupId, String user) { - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId, "LKG id", licenseKeyGroupId); - MdcUtil.initMdc(LoggerServiceName.List_EP.toString()); Version version = new Version(versionId); vendorLicenseManager @@ -88,9 +77,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { for (LimitEntity limit : limits) { result.add(outputMapper.applyMapping(limit, LimitEntityDto.class)); } - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId, "LKG id", licenseKeyGroupId); - return Response.ok(result).build(); } @@ -101,9 +87,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { String licenseKeyGroupId, String limitId, String user) { - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId, "LKG id", licenseKeyGroupId, "limit Id", - limitId); - MdcUtil.initMdc(LoggerServiceName.Update_LIMIT.toString()); Version version = new Version(versionId); @@ -119,10 +102,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { limitEntity.setParent(parent); vendorLicenseManager.updateLimit(limitEntity); - - mdcDataDebugMessage - .debugExitMessage("VLM id", vlmId, "LKG id", licenseKeyGroupId, "limit Id", limitId); - return Response.ok().build(); } @@ -137,8 +116,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { */ public Response deleteLimit(String vlmId, String versionId, String licenseKeyGroupId, String limitId, String user) { - mdcDataDebugMessage.debugEntryMessage("VLM id, Verison Id, LKG id, Limit Id", vlmId, versionId, - licenseKeyGroupId, limitId); MdcUtil.initMdc(LoggerServiceName.Delete_LIMIT.toString()); Version version = new Version(versionId); @@ -153,19 +130,12 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { limitInput.setParent(parent); vendorLicenseManager.deleteLimit(limitInput); - - mdcDataDebugMessage.debugExitMessage("VLM id, Verison Id, LKG id, Limit Id", vlmId, versionId, - licenseKeyGroupId, limitId); - return Response.ok().build(); } @Override public Response getLimit(String vlmId, String versionId, String licenseKeyGroupId, String limitId, String user) { - mdcDataDebugMessage.debugEntryMessage("VLM id, LKG id, Limit Id", vlmId, licenseKeyGroupId, - limitId); - MdcUtil.initMdc(LoggerServiceName.Get_LIMIT.toString()); Version version = new Version(versionId); vendorLicenseManager @@ -179,10 +149,6 @@ public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits { LimitEntityDto entitlementPoolEntityDto = limit == null ? null : new MapLimitEntityToLimitDto().applyMapping(limit, LimitEntityDto.class); - - mdcDataDebugMessage - .debugExitMessage("VLM id, LKG id, Limit Id", vlmId, licenseKeyGroupId, limitId); - return Response.ok(entitlementPoolEntityDto).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/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 6fe33d77ae..4c24d59b63 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 @@ -21,7 +21,6 @@ package org.openecomp.sdcrests.vendorlicense.rest.services; import org.openecomp.sdc.logging.context.MdcUtil; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.types.LoggerServiceName; import org.openecomp.sdc.vendorlicense.VendorLicenseManager; import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory; @@ -47,8 +46,6 @@ import java.util.Collection; @Scope(value = "prototype") @Validated public class LicenseKeyGroupsImpl implements LicenseKeyGroups { - - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); private VendorLicenseManager vendorLicenseManager = VendorLicenseManagerFactory.getInstance().createInterface(); @@ -61,9 +58,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { * @return the response */ public Response listLicenseKeyGroups(String vlmId, String versionId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - MdcUtil.initMdc(LoggerServiceName.List_LKG.toString()); Collection<LicenseKeyGroupEntity> licenseKeyGroups = vendorLicenseManager.listLicenseKeyGroups(vlmId, new Version(versionId)); @@ -74,9 +68,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { for (LicenseKeyGroupEntity ep : licenseKeyGroups) { result.add(outputMapper.applyMapping(ep, LicenseKeyGroupEntityDto.class)); } - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); - return Response.ok(result).build(); } @@ -90,9 +81,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { */ public Response createLicenseKeyGroup(LicenseKeyGroupRequestDto request, String vlmId, String versionId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - MdcUtil.initMdc(LoggerServiceName.Create_LKG.toString()); LicenseKeyGroupEntity licenseKeyGroupEntity = new MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity() @@ -105,9 +93,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { StringWrapperResponse result = createdLicenseKeyGroup != null ? new StringWrapperResponse(createdLicenseKeyGroup.getId()) : null; - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); - return Response.ok(result).build(); } @@ -123,9 +108,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { public Response updateLicenseKeyGroup(LicenseKeyGroupRequestDto request, String vlmId, String versionId, String licenseKeyGroupId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, LKG id", vlmId, licenseKeyGroupId); - MdcUtil.initMdc(LoggerServiceName.Update_LKG.toString()); LicenseKeyGroupEntity licenseKeyGroupEntity = new MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity() @@ -135,9 +117,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { licenseKeyGroupEntity.setId(licenseKeyGroupId); vendorLicenseManager.updateLicenseKeyGroup(licenseKeyGroupEntity); - - mdcDataDebugMessage.debugExitMessage("VLM id, LKG id", vlmId, licenseKeyGroupId); - return Response.ok().build(); } @@ -152,9 +131,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { */ public Response getLicenseKeyGroup(String vlmId, String versionId, String licenseKeyGroupId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, LKG id", vlmId, licenseKeyGroupId); - MdcUtil.initMdc(LoggerServiceName.Get_LKG.toString()); LicenseKeyGroupEntity lkgInput = new LicenseKeyGroupEntity(); lkgInput.setVendorLicenseModelId(vlmId); @@ -165,9 +141,6 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { LicenseKeyGroupEntityDto licenseKeyGroupEntityDto = licenseKeyGroup == null ? null : new MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto() .applyMapping(licenseKeyGroup, LicenseKeyGroupEntityDto.class); - - mdcDataDebugMessage.debugExitMessage("VLM id, LKG id", vlmId, licenseKeyGroupId); - return Response.ok(licenseKeyGroupEntityDto).build(); } @@ -181,18 +154,12 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { */ public Response deleteLicenseKeyGroup(String vlmId, String versionId, String licenseKeyGroupId, String user) { - - mdcDataDebugMessage.debugEntryMessage("VLM id, LKG id", vlmId, licenseKeyGroupId); - MdcUtil.initMdc(LoggerServiceName.Delete_LKG.toString()); LicenseKeyGroupEntity lkgInput = new LicenseKeyGroupEntity(); lkgInput.setVendorLicenseModelId(vlmId); lkgInput.setVersion(new Version(versionId)); lkgInput.setId(licenseKeyGroupId); vendorLicenseManager.deleteLicenseKeyGroup(lkgInput); - - mdcDataDebugMessage.debugExitMessage("VLM id, LKG id", vlmId, licenseKeyGroupId); - 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/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 e1a60386e4..85c0b275b7 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 @@ -34,7 +34,6 @@ 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.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.messages.AuditMessages; import org.openecomp.sdc.logging.types.LoggerServiceName; import org.openecomp.sdc.notification.dtos.Event; @@ -94,8 +93,6 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { 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."; private static final Logger LOGGER = LoggerFactory.getLogger(VendorLicenseModelsImpl.class); - private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage(); - private ItemPermissionsManager permissionsManager = ItemPermissionsManagerFactory.getInstance() .createInterface(); private NotificationPropagationManager notifier = @@ -111,7 +108,6 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { @Override public Response listLicenseModels(String versionStatus, String user) { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null); MdcUtil.initMdc(LoggerServiceName.List_VLM.toString()); Predicate<Item> itemPredicate; @@ -133,14 +129,11 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { itemManager.list(itemPredicate).stream() .sorted((o1, o2) -> o2.getModificationTime().compareTo(o1.getModificationTime())) .forEach(vspItem -> results.add(mapper.applyMapping(vspItem, ItemDto.class))); - - MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null); return Response.ok(results).build(); } @Override public Response createLicenseModel(VendorLicenseModelRequestDto request, String user) { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null); LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.CREATE_VLM + request.getVendorName()); MdcUtil.initMdc(LoggerServiceName.Create_VLM.toString()); @@ -172,15 +165,12 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { activityLogManager.logActivity(new ActivityLogEntity(vlm.getId(), version, ActivityType.Create, user, true, "", "")); - - MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null); return Response.ok(itemCreationDto).build(); } @Override public Response updateLicenseModel(VendorLicenseModelRequestDto request, String vlmId, String versionId, String user) { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VLM_ID, vlmId); MdcUtil.initMdc(LoggerServiceName.Update_VLM.toString()); VendorLicenseModelEntity vlm = @@ -190,14 +180,11 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { vlm.setVersion(new Version(versionId)); vendorLicenseManager.updateVendorLicenseModel(vlm); - - MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VLM_ID, vlmId); return Response.ok().build(); } @Override public Response getLicenseModel(String vlmId, String versionId, String user) { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VLM_ID, vlmId); MdcUtil.initMdc(LoggerServiceName.Get_VLM.toString()); Version version = versioningManager.get(vlmId, new Version(versionId)); @@ -222,20 +209,13 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { VendorLicenseModelEntityDto vlmDto = new MapVendorLicenseModelEntityToDto().applyMapping(vlm, VendorLicenseModelEntityDto.class); - - MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VLM_ID, vlmId); return Response.ok(vlmDto).build(); } @Override public Response deleteLicenseModel(String vlmId, String versionId, String user) { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VLM_ID, vlmId); - MdcUtil.initMdc(LoggerServiceName.Delete_VLM.toString()); vendorLicenseManager.deleteVendorLicenseModel(vlmId, new Version(versionId)); - - MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VLM_ID, vlmId); - return Response.ok().build(); } |