From 9dfd7e28c1eb348fcb4a2de8c6faae2a01b34942 Mon Sep 17 00:00:00 2001 From: Ofir Sonsino Date: Wed, 20 Sep 2017 13:20:42 +0300 Subject: Global Read only role, Support VID specific Roles Issue-ID: VID-46 , VID-47 Change-Id: Ib100d20ac40a65d39e27a6e2741b19a173a2b8ea Signed-off-by: Ofir Sonsino --- .../java/org/openecomp/vid/controller/WebConfig.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java') 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 9a258a10..1e13d0eb 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,11 +44,23 @@ 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()) { -- cgit 1.2.3-korg