route2CA.put(route, collectionAdapter);
return addRoute(route, type);
}
public Target resolve(Request request) {
RequestContext context = (RequestContext) request;
String uri = context.getTargetPath();
int idx = uri.indexOf('?');
if (idx != -1) {
uri = uri.substring(0, idx);
}
for(Map.Entry<Route, TargetType> entry : targets.entrySet()) {
if (entry.getKey().match(uri)) {
CollectionAdapter ca = route2CA.get(entry.getKey());
if (ca != null) {
context.setAttribute(DefaultWorkspaceManager.COLLECTION_ADAPTER_ATTRIBUTE, ca);
}
return getTarget(context, entry.getKey(), uri, entry.getValue());
}
}
return null;