class DownloadHistory implements Processor {

	@Override
	public void process(Exchange exchange) throws Exception {
		Message msg = exchange.getIn();

		User user = msg.getHeader(Configuration.USER, User.class);
		Content content = msg.getHeader(Configuration.CONTENT, Content.class);
		if (content != null) {
			contentManager.saveInHistory(content, user);
		} else {
			LOGGER.error("Is not a content or can't be parsed. File: {}", msg.getHeader(Configuration.FILE_NAME, String.class));
		}
	}

}