class BroadcastingResourceConverter extends AbstractConverter<BroadcastingMessageResource, BroadcastingMessage> {

	@Override
	public BroadcastingMessage convert(final BroadcastingMessageResource source, final BroadcastingMessage target) {
		
		target.setContent(source.getContent());
		target.setTopic(source.getTopic());
		target.setRecipients(source.getRecipients());
 		
		if (source.getGroups() != null) {
			List<Group> groups = convertGroups(source);
			target.setGroups(groups);
		}
		
		return target;
	}

}