@PreAuthorize("hasRole('ROLE_ADMIN')")
 @RequestMapping(value = "/{cid}", method = RequestMethod.DELETE)
 public Channel delete(@PathVariable Long cid) {
   Channel ch = channelDao.deleteChannel(cid);
   channelService.removeConfigFile(ch);
   return ch;
 }
 @PreAuthorize("hasRole('ROLE_ADMIN')")
 @RequestMapping(value = "/{cid}", method = RequestMethod.PUT)
 public Channel update(@RequestBody Channel channel) throws DuplicatedEntryException {
   Channel ch = channelDao.updateChannel(channel);
   channelService.generateConfigFile(ch);
   return ch;
 }
 @PreAuthorize("hasRole('ROLE_ADMIN')")
 @RequestMapping(method = RequestMethod.POST)
 public Channel add(@RequestBody Channel channel) throws DuplicatedEntryException {
   Channel ch = channelDao.createChannel(channel);
   channelService.generateConfigFile(ch);
   return ch;
 }
 @PreAuthorize("hasRole('ROLE_ADMIN')")
 @RequestMapping(value = "/systems", method = RequestMethod.GET)
 public List<String> getAllSystems() {
   return channelDao.getAllSystems();
 }
 @PreAuthorize("hasRole('ROLE_ADMIN')")
 @RequestMapping(method = RequestMethod.GET, params = "sys")
 public List<Channel> getBySystems(@RequestParam(value = "sys", required = true) String sysChars) {
   return channelDao.getChannelsBySystems(sysChars);
 }
 @PreAuthorize("hasRole('ROLE_ADMIN')")
 @RequestMapping(method = RequestMethod.GET)
 public List<Channel> getAll() {
   return channelDao.getAllChannels();
 }