summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2018-05-01 10:10:09 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-05-01 07:50:22 +0000
commit53d5049c1b4acab91c90e491abdee7cc0b1c0cc5 (patch)
tree67985ea3cfe8d860aa12ded33beb84fe5ec04cf1 /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services
parent0258442c39183fdd7e4812054d095cafdcab420d (diff)
Remove vsp and vlm redundant properties
Change-Id: I1faf9af304c7c97303e98744b036f9b1c0db8f0c Issue-ID: SDC-343 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services')
-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.java20
1 files changed, 8 insertions, 12 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/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 0e645dd4e9..f596a8dd1b 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
@@ -28,7 +28,6 @@ import static org.openecomp.sdcrests.vendorlicense.types.VendorLicenseModelActio
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
-import java.util.Optional;
import java.util.function.Predicate;
import javax.inject.Named;
import javax.ws.rs.core.Response;
@@ -163,19 +162,16 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels {
public Response getLicenseModel(String vlmId, String versionId, String user) {
Version version = versioningManager.get(vlmId, new Version(versionId));
VendorLicenseModelEntity vlm = vendorLicenseManager.getVendorLicenseModel(vlmId, version);
- vlm.setWritetimeMicroSeconds(version.getModificationTime().getTime());
try {
- Optional<Version> healedVersion = HealingManagerFactory.getInstance().createInterface()
- .healItemVersion(vlmId, version, ItemType.vlm,
- false);
-
- if (healedVersion.isPresent()) {
- vlm.setVersion(healedVersion.get());
- if (version.getStatus() == VersionStatus.Certified) {
- submitHealedVersion(vlmId, healedVersion.get(), versionId, user);
- }
- }
+ HealingManagerFactory.getInstance().createInterface()
+ .healItemVersion(vlmId, version, ItemType.vlm, false)
+ .ifPresent(healedVersion -> {
+ vlm.setVersion(healedVersion);
+ if (version.getStatus() == VersionStatus.Certified) {
+ submitHealedVersion(vlmId, healedVersion, versionId, user);
+ }
+ });
} catch (Exception e) {
LOGGER.error(String.format("Error while auto healing VLM with Id %s and version %s", vlmId, versionId), e);
}