Renaming OneWeb to DaylightWeb 08/108/2
authorColin Dixon <ckd@us.ibm.com>
Thu, 4 Apr 2013 22:38:42 +0000 (17:38 -0500)
committerColin Dixon <ckd@us.ibm.com>
Thu, 4 Apr 2013 22:52:49 +0000 (17:52 -0500)
Change-Id: Ic8f89bc249aadd81fec3416322122259ef51b89a
Signed-off-by: Colin Dixon <ckd@us.ibm.com>
opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java
opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java
opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWeb.java [moved from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWeb.java with 95% similarity]
opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWebAdmin.java [moved from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWebAdmin.java with 99% similarity]
opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IDaylightWeb.java [moved from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IOneWeb.java with 94% similarity]
opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java

index 5be771a..ece5959 100644 (file)
@@ -19,7 +19,7 @@ import java.util.concurrent.ConcurrentMap;
 
 import org.codehaus.jackson.map.ObjectMapper;
 import org.opendaylight.controller.usermanager.IUserManager;
-import org.opendaylight.controller.web.IOneWeb;
+import org.opendaylight.controller.web.IDaylightWeb;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -48,7 +48,7 @@ import com.google.gson.Gson;
 
 @Controller
 @RequestMapping("/")
-public class Devices implements IOneWeb {
+public class Devices implements IDaylightWeb {
     private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER;
     private final String WEB_NAME = "Devices";
     private final String WEB_ID = "devices";
@@ -56,7 +56,7 @@ public class Devices implements IOneWeb {
     private final String containerName = GlobalConstants.DEFAULT.toString();
 
     public Devices() {
-        ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+        ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
     }
 
     @Override
index d75d14c..4cc35e2 100644 (file)
@@ -29,7 +29,7 @@ import org.opendaylight.controller.switchmanager.ISwitchManager;
 import org.opendaylight.controller.switchmanager.Switch;
 import org.opendaylight.controller.switchmanager.SwitchConfig;
 import org.opendaylight.controller.usermanager.IUserManager;
-import org.opendaylight.controller.web.IOneWeb;
+import org.opendaylight.controller.web.IDaylightWeb;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -42,7 +42,7 @@ import com.google.gson.Gson;
 
 @Controller
 @RequestMapping("/")
-public class Flows implements IOneWeb {
+public class Flows implements IDaylightWeb {
        private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER;
     private static final String WEB_NAME = "Flows";
     private static final String WEB_ID = "flows";
@@ -50,7 +50,7 @@ public class Flows implements IOneWeb {
     private final String containerName = GlobalConstants.DEFAULT.toString();
 
     public Flows() {
-        ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+        ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
     }
 
     @Override
@@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 @Controller
 @RequestMapping("/")
-public class OneWeb {
+public class DaylightWeb {
     @RequestMapping(value = "")
     public String index(Model model) {
        IUserManager userManager = (IUserManager) ServiceHelper
@@ -48,15 +48,15 @@ public class OneWeb {
     @RequestMapping(value = "web.json")
     @ResponseBody
     public Map<String, Map<String, Object>> bundles() {
-        Object[] instances = ServiceHelper.getGlobalInstances(IOneWeb.class,
+        Object[] instances = ServiceHelper.getGlobalInstances(IDaylightWeb.class,
                 this, null);
         Map<String, Map<String, Object>> bundles = new HashMap<String, Map<String, Object>>();
         Map<String, Object> entry;
-        IOneWeb bundle;
+        IDaylightWeb bundle;
         String userName = SecurityContextHolder.getContext().getAuthentication().getName();
         IUserManager userManger = (IUserManager) ServiceHelper.getGlobalInstance(IUserManager.class, this);
         for (Object instance : instances) {
-            bundle = (IOneWeb) instance;
+            bundle = (IDaylightWeb) instance;
             if (userManger != null &&
                        bundle.isAuthorized(userManger.getUserLevel(userName))) {
                    entry = new HashMap<String, Object>();
index a4083d1..903fa7b 100644 (file)
@@ -36,7 +36,7 @@ import org.opendaylight.controller.sal.utils.NetUtils;
 import org.opendaylight.controller.sal.utils.ServiceHelper;
 import org.opendaylight.controller.statisticsmanager.IStatisticsManager;
 import org.opendaylight.controller.switchmanager.ISwitchManager;
-import org.opendaylight.controller.web.IOneWeb;
+import org.opendaylight.controller.web.IDaylightWeb;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -45,7 +45,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 @Controller
 @RequestMapping("/")
-public class Troubleshoot implements IOneWeb {
+public class Troubleshoot implements IDaylightWeb {
     private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER;
     private final String WEB_NAME = "Troubleshoot";
     private final String WEB_ID = "troubleshoot";
@@ -53,7 +53,7 @@ public class Troubleshoot implements IOneWeb {
     private final String containerName = GlobalConstants.DEFAULT.toString();
 
     public Troubleshoot() {
-        ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+        ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
     }
 
     @Override