diff options
author | 2018-01-16 17:37:58 +0200 | |
---|---|---|
committer | 2018-01-17 08:02:30 +0000 | |
commit | 397259ecc15404b40e5589203db2637115426170 (patch) | |
tree | 3eccfea59351e5cbe440d9079dd48d7c2f5b55ad /openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main | |
parent | 4f0e3326c4c83bac26a30f77c8bf55139b38aa2c (diff) |
Removed MDC from two modules
Change-Id: Ib1d4df731fa6b6626d49042df9a7bf902940be27
Issue-ID: SDC-772
Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main')
2 files changed, 5 insertions, 44 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java index 33e3b4c545..b02f6a527e 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java @@ -25,12 +25,6 @@ import org.openecomp.core.util.UniqueValueUtil; import org.openecomp.core.utilities.CommonMethods; import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.errors.ErrorCode; -import org.openecomp.sdc.datatypes.error.ErrorLevel; -import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage; -import org.openecomp.sdc.logging.types.LoggerConstants; -import org.openecomp.sdc.logging.types.LoggerErrorCode; -import org.openecomp.sdc.logging.types.LoggerErrorDescription; -import org.openecomp.sdc.logging.types.LoggerTragetServiceName; import org.openecomp.sdc.vendorlicense.VendorLicenseConstants; import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDao; import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDaoFactory; @@ -207,9 +201,6 @@ public class VendorLicenseFacadeImpl implements VendorLicenseFacade { VendorLicenseModelEntity vendorLicenseModel = vendorLicenseModelDao.get(new VendorLicenseModelEntity(vlmId, version)); if (vendorLicenseModel == null) { - MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB, - LoggerTragetServiceName.GET_VLM, ErrorLevel.ERROR.name(), - LoggerErrorCode.DATA_ERROR.getErrorCode(), LoggerErrorDescription.ENTITY_NOT_FOUND); throw new CoreException(new VendorLicenseModelNotFoundErrorBuilder(vlmId).build()); } return vendorLicenseModel; @@ -217,7 +208,6 @@ public class VendorLicenseFacadeImpl implements VendorLicenseFacade { @Override public LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement) { - //licenseAgreement.setId(CommonMethods.nextUuId()); VersioningUtil.validateEntitiesExistence(licenseAgreement.getFeatureGroupIds(), new FeatureGroupEntity(licenseAgreement.getVendorLicenseModelId(), licenseAgreement.getVersion(), @@ -296,16 +286,6 @@ public class VendorLicenseFacadeImpl implements VendorLicenseFacade { public Collection<ErrorCode> validateLicensingData(String vlmId, Version version, String licenseAgreementId, Collection<String> featureGroupIds) { - // TODO: 5/21/2017 validate version exists and final -/* try { - VersionInfo versionInfo = getVersionInfo(vlmId, VersionableEntityAction.Read, ""); - if (version == null || !version.isFinal() - || !versionInfo.getViewableVersions().contains(version)) { - return Collections.singletonList(new RequestedVersionInvalidErrorBuilder().build()); - } - } catch (CoreException exception) { - return Collections.singletonList(exception.code()); - }*/ List<ErrorCode> errorMessages = new ArrayList<>(); @@ -385,9 +365,6 @@ public class VendorLicenseFacadeImpl implements VendorLicenseFacade { if (CollectionUtils.isNotEmpty(licenseAgreements)) { licenseAgreements.forEach(licenseAgreement -> { if (CollectionUtils.isEmpty(licenseAgreement.getFeatureGroupIds())) { - MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB, - LoggerTragetServiceName.SUBMIT_ENTITY, ErrorLevel.ERROR.name(), - LoggerErrorCode.DATA_ERROR.getErrorCode(), LoggerErrorDescription.SUBMIT_ENTITY); throw new CoreException( new SubmitUncompletedLicenseModelErrorBuilder( SUBMIT_UNCOMPLETED_VLM_MSG_LA_MISSING_FG).build()); @@ -399,9 +376,6 @@ public class VendorLicenseFacadeImpl implements VendorLicenseFacade { FeatureGroupEntity featureGroupEntity = featureGroupDao.get(new FeatureGroupEntity(vendorLicenseModelId, version, fg)); if (CollectionUtils.isEmpty(featureGroupEntity.getEntitlementPoolIds())) { - MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB, - LoggerTragetServiceName.SUBMIT_ENTITY, ErrorLevel.ERROR.name(), - LoggerErrorCode.DATA_ERROR.getErrorCode(), LoggerErrorDescription.SUBMIT_ENTITY); throw new CoreException( new SubmitUncompletedLicenseModelErrorBuilder( SUBMIT_UNCOMPLETED_VLM_MSG_FG_MISSING_EP).build()); diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java index 456348688e..76635b3132 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java @@ -1,31 +1,21 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ +/* + * Copyright © 2016-2017 European Support Limited + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ============LICENSE_END========================================================= */ package org.openecomp.sdc.vendorlicense.healing.impl; -import org.openecomp.sdc.datatypes.error.ErrorLevel; -import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage; -import org.openecomp.sdc.logging.types.LoggerConstants; -import org.openecomp.sdc.logging.types.LoggerErrorCode; -import org.openecomp.sdc.logging.types.LoggerErrorDescription; -import org.openecomp.sdc.logging.types.LoggerTragetServiceName; import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDao; import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDaoFactory; import org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDao; @@ -68,9 +58,6 @@ public class SimpleHealingServiceImpl implements HealingService { toHeal.setVersionUuId(UUID.randomUUID().toString()); licenseKeyGroupDao.update((LicenseKeyGroupEntity) toHeal); } else { - MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB, - LoggerTragetServiceName.SELF_HEALING, ErrorLevel.ERROR.name(), - LoggerErrorCode.DATA_ERROR.getErrorCode(), LoggerErrorDescription.UNSUPPORTED_OPERATION); throw new UnsupportedOperationException( "Unsupported operation for 1610 release/1607->1610 migration."); } |