in src/main/java/org/apache/sling/mongodb/impl/MongoDBContext.java [46:75]
public MongoDBContext(final DB database,
final String configuredRoot,
final String[] configuredFilterCollectionNames,
final EventAdmin eventAdmin) {
this.database = database;
if ( configuredRoot != null ) {
final String value = configuredRoot.trim();
if ( value.length() > 0 ) {
if ( value.endsWith("/") ) {
this.rootWithSlash = configuredRoot;
this.root = configuredRoot.substring(0, configuredRoot.length() - 1);
} else {
this.rootWithSlash = configuredRoot + "/";
this.root = configuredRoot;
}
} else {
this.root = "";
this.rootWithSlash = "/";
}
} else {
this.root = "";
this.rootWithSlash = "/";
}
if ( configuredFilterCollectionNames != null ) {
for(final String name : configuredFilterCollectionNames) {
this.filterCollectionNames.add(name);
}
}
this.eventAdmin = eventAdmin;
}