From ccc77a1f4f9ec898ee54ac4695f22b59cb56828f Mon Sep 17 00:00:00 2001 From: Colin Dixon Date: Thu, 4 Apr 2013 17:38:42 -0500 Subject: [PATCH] Renaming OneWeb to DaylightWeb Change-Id: Ic8f89bc249aadd81fec3416322122259ef51b89a Signed-off-by: Colin Dixon --- .../org/opendaylight/controller/devices/web/Devices.java | 6 +++--- .../java/org/opendaylight/controller/flows/web/Flows.java | 6 +++--- .../controller/web/{OneWeb.java => DaylightWeb.java} | 8 ++++---- .../web/{OneWebAdmin.java => DaylightWebAdmin.java} | 2 +- .../controller/web/{IOneWeb.java => IDaylightWeb.java} | 2 +- .../controller/troubleshoot/web/Troubleshoot.java | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) rename opendaylight/web/root/src/main/java/org/opendaylight/controller/web/{OneWeb.java => DaylightWeb.java} (95%) rename opendaylight/web/root/src/main/java/org/opendaylight/controller/web/{OneWebAdmin.java => DaylightWebAdmin.java} (99%) rename opendaylight/web/root/src/main/java/org/opendaylight/controller/web/{IOneWeb.java => IDaylightWeb.java} (94%) diff --git a/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java b/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java index 5be771af96..ece5959dc0 100644 --- a/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java +++ b/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java @@ -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 diff --git a/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java b/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java index d75d14c623..4cc35e2f92 100644 --- a/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java +++ b/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java @@ -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 diff --git a/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWeb.java b/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWeb.java similarity index 95% rename from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWeb.java rename to opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWeb.java index d1237c760e..296a8fbbd6 100644 --- a/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWeb.java +++ b/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWeb.java @@ -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> bundles() { - Object[] instances = ServiceHelper.getGlobalInstances(IOneWeb.class, + Object[] instances = ServiceHelper.getGlobalInstances(IDaylightWeb.class, this, null); Map> bundles = new HashMap>(); Map 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(); diff --git a/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWebAdmin.java b/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWebAdmin.java similarity index 99% rename from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWebAdmin.java rename to opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWebAdmin.java index a22d749c5c..bc3d39aa21 100644 --- a/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWebAdmin.java +++ b/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWebAdmin.java @@ -28,7 +28,7 @@ import com.google.gson.Gson; @Controller @RequestMapping("/admin") -public class OneWebAdmin { +public class DaylightWebAdmin { @RequestMapping("/users") @ResponseBody public List getUsers() { diff --git a/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IOneWeb.java b/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IDaylightWeb.java similarity index 94% rename from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IOneWeb.java rename to opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IDaylightWeb.java index 72a3812297..84bbd94bae 100644 --- a/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IOneWeb.java +++ b/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IDaylightWeb.java @@ -15,7 +15,7 @@ import org.opendaylight.controller.sal.authorization.UserLevel; * * */ -public interface IOneWeb { +public interface IDaylightWeb { public String getWebName(); public String getWebId(); diff --git a/opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java b/opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java index a4083d1624..903fa7b5d1 100644 --- a/opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java +++ b/opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java @@ -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 -- 2.36.6