*/
@SuppressWarnings({"rawtypes", "unchecked"})
public ContenthubFeeder getContenthubFeeder(Object session, List<String> contentProperties) throws RepositoryAccessException,
ContenthubFeederException {
ContenthubFeeder feeder = null;
for (ContenthubFeeder f : boundedFeeders) {
if (f.canFeedWith(session)) {
feeder = f;
}
}
if (feeder != null) {
final Dictionary props = new Hashtable();
props.put(ContenthubFeeder.PROP_SESSION, session);
props.put(ContenthubFeeder.PROP_CONTENT_PROPERTIES, contentProperties != null ? contentProperties
: new ArrayList<String>());
feeder.setConfigs(props);
} else {
log.warn("Failed to obtain a suitable ContenthubFeeder instance for session: {}", session);
throw new ContenthubFeederException(String.format(
"Failed to obtain a suitable ContenthubFeeder instance for session: %s", session));
}