summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@att.com>2017-09-20 13:20:42 +0300
committerOfir Sonsino <os0695@att.com>2017-09-20 13:37:03 +0300
commit9dfd7e28c1eb348fcb4a2de8c6faae2a01b34942 (patch)
treec273862f59b0b64c19ccfea5f59ab574071cb323 /vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java
parentc3722d135481cfab5978c84853d8229d1e7d9cb3 (diff)
Global Read only role, Support VID specific Roles
Issue-ID: VID-46 , VID-47 Change-Id: Ib100d20ac40a65d39e27a6e2741b19a173a2b8ea Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java')
-rw-r--r--vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java
index 9a258a109..1e13d0eb6 100644
--- a/vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java
+++ b/vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java
@@ -4,13 +4,17 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.io.IOUtils;
import org.json.JSONObject;
import org.json.JSONTokener;
+import org.openecomp.vid.aai.AaiClient;
+import org.openecomp.vid.aai.AaiClientInterface;
import org.openecomp.vid.asdc.AsdcClient;
import org.openecomp.vid.asdc.local.LocalAsdcClient;
import org.openecomp.vid.asdc.memory.InMemoryAsdcClient;
-import org.openecomp.vid.asdc.rest.RestfulAsdcClient;
import org.openecomp.vid.asdc.parser.ToscaParserImpl2;
+import org.openecomp.vid.asdc.rest.RestfulAsdcClient;
import org.openecomp.vid.properties.AsdcClientConfiguration;
import org.openecomp.vid.properties.AsdcClientConfiguration.AsdcClientType;
+import org.openecomp.vid.services.AaiService;
+import org.openecomp.vid.services.AaiServiceImpl;
import org.openecomp.vid.services.VidService;
import org.openecomp.vid.services.VidServiceImpl;
import org.springframework.context.annotation.Bean;
@@ -40,12 +44,24 @@ public class WebConfig {
return new ObjectMapper();
}
+
+
@Bean
public VidService vidService(AsdcClient asdcClient) {
return new VidServiceImpl(asdcClient);
}
@Bean
+ public AaiService getAaiService(){
+ return new AaiServiceImpl();
+ }
+
+ @Bean
+ public AaiClientInterface getAaiClientInterface(){
+ return new AaiClient();
+ }
+
+ @Bean
public AsdcClient asdcClient(AsdcClientConfiguration asdcClientConfig) throws IOException {
switch (asdcClientConfig.getAsdcClientType()) {
case IN_MEMORY: