@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(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(method = RequestMethod.POST)
 public Channel add(@RequestBody Channel channel) throws DuplicatedEntryException {
   Channel ch = channelDao.createChannel(channel);
   channelService.generateConfigFile(ch);
   return ch;
 }