private String findVersionFromChannel(Channel channel) {
   for (DistChannelMap map : channel.getDistChannelMaps()) {
     ChannelVersion ver = ChannelVersion.getChannelVersionForDistChannelMap(map);
     if (ver != null) {
       return ver.getVersion();
     }
   }
   return null;
 }
  private List findChannelsByVersion(User user, String version) {

    if (version == null) {
      return null;
    }
    List<Channel> channels = ChannelFactory.listRedHatBaseChannels(user);
    List toReturn = new ArrayList();
    for (Channel chan : channels) {
      for (DistChannelMap map : chan.getDistChannelMaps()) {
        if (ChannelVersion.getChannelVersionForDistChannelMap(map).getVersion().equals(version)) {
          toReturn.add(chan);
          break;
        }
      }
    }
    return toReturn;
  }