class FeedGroupMap implements ConfigurationChangeListener {

	@Override
	public void onRemove(Entity entity) throws IvoryException {
		if (entity.getEntityType().equals(EntityType.FEED)) {
			Feed feed = (Feed) entity;
			if (StringUtils.isEmpty(feed.getGroups())) {
				return;
			}
			String[] groups = feed.getGroups().split(",");
			for (String group : groups) {
				groupsMapping.get(group).getFeeds().remove(entity.getName());
				if (groupsMapping.get(group).getFeeds().size() == 0) {
					groupsMapping.remove(group);
				}
			}

		}

	}

	private  FeedGroupMap();

}