aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/data-provider/provider
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2023-12-15 18:39:48 +0530
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2023-12-15 18:40:01 +0530
commit6c18268df5546ec1ddea146fa663d70395edcae8 (patch)
treef737bc6aceb23cce633dcbbafa7a11b09e58bffd /sdnr/wt/data-provider/provider
parentdfd91573b7567e1dab482f17111ab8f809553d99 (diff)
Inventory TreeView Fixed
WhiteBoardPattern annotations removed from DataTreeHttpServlet Servlet registration using bind method Issue-ID: CCSDK-3976 Change-Id: I2138b5b7f9ad4618bee1626e322449b83c5ee77a Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/data-provider/provider')
-rw-r--r--sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java11
-rw-r--r--sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java5
2 files changed, 8 insertions, 8 deletions
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java
index 2f7b9e3fc..39239fdf7 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java
@@ -32,7 +32,6 @@ import java.util.List;
import java.util.Optional;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@@ -41,9 +40,6 @@ import org.json.JSONObject;
import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.InventoryTreeProvider;
import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.DataTreeObject;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Entity;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardServletName;
-import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardServletPattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -52,12 +48,13 @@ import org.slf4j.LoggerFactory;
*
*/
-@HttpWhiteboardServletPattern("/tree/*")
-@HttpWhiteboardServletName("DataTreeHttpServlet")
-@Component(service = Servlet.class)
+//@HttpWhiteboardServletPattern("/tree/*")
+//@HttpWhiteboardServletName("DataTreeHttpServlet")
+//@Component(service = Servlet.class)
public class DataTreeHttpServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
+ public static final String URI_PRE = "/tree";
private InventoryTreeProvider dataTreeProvider;
private static final Logger LOG = LoggerFactory.getLogger(DataTreeHttpServlet.class);
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java
index 71ff7a85b..d7ae4cc51 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java
@@ -102,7 +102,9 @@ public class DataProviderImpl implements IEntityDataProvider, AutoCloseable {
public void onUnbindService(HttpService httpService) {
httpService.unregister(AboutHttpServlet.URI_PRE);
+ httpService.unregister(DataTreeHttpServlet.URI_PRE);
this.aboutServlet = null;
+ this.treeServlet = null;
}
public void onBindService(HttpService httpService)
@@ -111,7 +113,8 @@ public class DataProviderImpl implements IEntityDataProvider, AutoCloseable {
LOG.warn("Unable to inject HttpService into loader.");
} else {
httpService.registerServlet(AboutHttpServlet.URI_PRE, aboutServlet, null, null);
- LOG.info("about servlet registered.");
+ httpService.registerServlet(DataTreeHttpServlet.URI_PRE, treeServlet, null, null);
+ LOG.info("about servlet and tree servlet registered.");
}
}