step.core.collections.CollectionFactoryConfigurationParser Maven / Gradle / Ivy
The newest version!
package step.core.collections;
import ch.exense.commons.app.Configuration;
import step.core.collections.delegating.DelegatingCollectionFactory;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.Properties;
import java.util.Set;
public class CollectionFactoryConfigurationParser {
protected static final String PREFIX = "datasource.";
protected static final String TYPE = ".type";
protected static final String APPLIES_TO = ".collections";
protected static final String PROPERTIES = ".properties.";
protected static final String ALL = "all";
protected static final String SEPARATOR = ",";
protected static final String DOT = "\\.";
protected static final String DB_PREFIX = "db.";
public static DelegatingCollectionFactory parseConfiguration(Configuration configuration) {
DelegatingCollectionFactory delegatingCollectionFactory = new DelegatingCollectionFactory();
// Iterate over all configured collection factories and instantiate them
Set