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;
@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";
private final String containerName = GlobalConstants.DEFAULT.toString();
public Devices() {
- ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+ ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
}
@Override
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;
@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";
private final String containerName = GlobalConstants.DEFAULT.toString();
public Flows() {
- ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+ ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
}
@Override
@Controller
@RequestMapping("/")
-public class OneWeb {
+public class DaylightWeb {
@RequestMapping(value = "")
public String index(Model model) {
IUserManager userManager = (IUserManager) ServiceHelper
@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>();
@Controller
@RequestMapping("/admin")
-public class OneWebAdmin {
+public class DaylightWebAdmin {
@RequestMapping("/users")
@ResponseBody
public List<UserConfig> getUsers() {
*
*
*/
-public interface IOneWeb {
+public interface IDaylightWeb {
public String getWebName();
public String getWebId();
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;
@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";
private final String containerName = GlobalConstants.DEFAULT.toString();
public Troubleshoot() {
- ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+ ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
}
@Override