| Method from org.apache.cocoon.environment.ForwardRedirector Detail: |
abstract protected void cocoonRedirect(String uri) throws IOException, ProcessingException
|
public void globalRedirect(boolean sessionMode,
String url) throws IOException, ProcessingException {
if (getLogger().isInfoEnabled()) {
getLogger().info("Redirecting to '" + url + "'");
}
// FIXME : how to handle global redirect to cocoon: ?
if (url.startsWith("cocoon:")) {
cocoonRedirect(url);
} else if (env instanceof MutableEnvironmentFacade ) {
((MutableEnvironmentFacade)env).getDelegate().globalRedirect(sessionMode, url);
} else if (env instanceof EnvironmentWrapper) {
((EnvironmentWrapper)env).globalRedirect(sessionMode,url);
} else {
this.env.redirect(sessionMode, url);
}
this.hasRedirected = true;
}
Unconditionally redirects to a given URL, even it this redirector is part of a
subpipeline. |
public boolean hasRedirected() {
return this.hasRedirected;
}
Perform check on whether redirection has occured or not |
public void permanentRedirect(boolean sessionMode,
String url) throws IOException, ProcessingException {
if (getLogger().isInfoEnabled()) {
getLogger().info("Redirecting to '" + url + "'");
}
if (url.startsWith("cocoon:")) {
cocoonRedirect(url);
} else if (env instanceof PermanentRedirector) {
((PermanentRedirector)env).permanentRedirect(sessionMode, url);
} else {
this.env.redirect(sessionMode, url);
}
this.hasRedirected = true;
}
|
public void redirect(boolean sessionMode,
String url) throws IOException, ProcessingException {
if (getLogger().isInfoEnabled()) {
getLogger().info("Redirecting to '" + url + "'");
}
if (url.startsWith("cocoon:")) {
cocoonRedirect(url);
} else {
this.env.redirect(sessionMode, url);
}
this.hasRedirected = true;
}
Redirects to a given URL. If this URL starts with "cocoon:", then an internal
redirect is performed. Otherwise, an external redirect is send to the
environment. |
public void sendStatus(int sc) {
env.setStatus(sc);
this.hasRedirected = true;
}
|