}
// test if this is a call from flow
boolean isRedirect = (environment.getObjectModel().remove("cocoon:forward") == null);
final SitemapSourceInfo info = SitemapSourceInfo.parseURI(environment, uri);
Environment newEnv = new ForwardEnvironmentWrapper(environment, info);
if (isRedirect) {
((ForwardEnvironmentWrapper) newEnv).setInternalRedirect(true);
}
if (facade != null) {
// Change the facade delegate
facade.setDelegate((ForwardEnvironmentWrapper)newEnv);
newEnv = facade;
}
// Get the processor that should process this request
ConcreteTreeProcessor processor;
if (newEnv.getURIPrefix().equals("")) {
processor = ((TreeProcessor)getRootProcessor()).concreteProcessor;
} else {
processor = this;
}