From 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 31 Dec 2018 17:21:27 +0200 Subject: Merge from ECOMP's repository Main Features -------------- - Async-Instantiation jobs mechanism major update; still WIP (package `org.onap.vid.job`) - New features in View/Edit: Activate fabric configuration; show related networks; soft delete - Support AAI service-tree traversal (`AAIServiceTree`) - In-memory cache for SDC models and certain A&AI queries (`CacheProviderWithLoadingCache`) - Upgrade TOSCA Parser and add parsing options; fix malformed TOSCA models - Resolve Cloud-Owner values for MSO - Pass X-ONAP headers to MSO Infrastructure -------------- - Remove codehaus' jackson mapper; use soley fasterxml 2.9.7 - Surefire invokes both TestNG and JUnit tests - Support Kotlin source files - AaiController2 which handles errors in a "Spring manner" - Inline generated-sources and remove jsonschema2pojo Quality -------- - Cumulative bug fixes (A&AI API, UI timeouts, and many more) - Many Sonar issues cleaned-up - Some unused classes removed - Minor changes in vid-automation project, allowing some API verification to run Hard Merges ------------ - HTTP Clients (MSO, A&AI, WebConfig, OutgoingRequestHeadersTest) - Moved `package org.onap.vid.controllers` to `controller`, without plural -- just to keep semantic sync with ECOMP. Reference commit in ECOMP: 3d1141625 Issue-ID: VID-378 Change-Id: I9c8d1e74caa41815891d441fc0760bb5f29c5788 Signed-off-by: Ittay Stern --- .../org/onap/vid/services/RoleGenaratorServiceImpl.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java') diff --git a/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java index 500f5ac7f..3ff8db0e5 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java @@ -23,16 +23,11 @@ package org.onap.vid.services; import io.joshworks.restclient.http.HttpResponse; import jline.internal.Log; -import org.onap.vid.aai.AaiClientInterface; -import org.onap.vid.aai.AaiOverTLSClientInterface; -import org.onap.vid.aai.AaiResponse; -import org.onap.vid.aai.ServiceSubscription; -import org.onap.vid.aai.Services; +import org.onap.vid.aai.*; import org.onap.vid.model.ModelConstants; import org.onap.vid.model.Subscriber; import org.onap.vid.model.SubscriberList; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import java.util.HashMap; @@ -46,7 +41,6 @@ public class RoleGenaratorServiceImpl implements RoleGeneratorService { AaiClientInterface client; @Autowired - @Qualifier("aaiClientForCodehausMapping") AaiOverTLSClientInterface aaiOverTLSClient; public static final String DB_NAME = "vid_portal"; @@ -73,8 +67,9 @@ public class RoleGenaratorServiceImpl implements RoleGeneratorService { } private String addAvailableRolesCombination(Boolean firstRun, SubscriberList subscribers) { - String query, availableRoles=""; - HashMap servicesNames = new HashMap(); + String query; + String availableRoles=""; + HashMap servicesNames = new HashMap<>(); for (Subscriber subscriber: subscribers.customer) { AaiResponse subscriberResponse = client.getSubscriberData(subscriber.globalCustomerId); for(ServiceSubscription service: subscriberResponse.getT().serviceSubscriptions.serviceSubscription) { @@ -146,13 +141,12 @@ public class RoleGenaratorServiceImpl implements RoleGeneratorService { } private String insertAvailableRolesToFnRole(){ - String query="INSERT INTO fn_role (ROLE_NAME, ACTIVE_YN, PRIORITY)\r\n" + + return "INSERT INTO fn_role (ROLE_NAME, ACTIVE_YN, PRIORITY)\r\n" + "SELECT RNAME, 'Y', 5\r\n" + "FROM available_roles\r\n" + "WHERE NOT EXISTS (SELECT ROLE_NAME\r\n" + "FROM fn_role \r\n" + "where RNAME = ROLE_NAME);\r\n"; - return query; } -- cgit 1.2.3-korg