pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.core
Class HomepageRedirector

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.core.HomepageRedirector

public final class HomepageRedirector
extends Controller

redirects to the first visible SitemapNode in the current Locale.

Version:
$Revision: 2043 $
Author:
Thomas Weber

Nested Class Summary
static class HomepageRedirector.GoToHomepageRequest
          a simple request bean for locales.
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Constructor Summary
HomepageRedirector()
           
 
Method Summary
 void goToHomepage(HomepageRedirector.GoToHomepageRequest bean)
          redirects to the first visible SitemapNode in the current Locale.
protected static boolean redirect(ServiceRequest request, java.util.Locale locale)
          tries to redirect to the given locale.
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HomepageRedirector

public HomepageRedirector()
Method Detail

goToHomepage

@Action(value="homepage", generate=true)
@Permission(value="user")
public void goToHomepage(@RequestBean
                                                             HomepageRedirector.GoToHomepageRequest bean)
redirects to the first visible SitemapNode in the current Locale.

Parameters:
bean - the request bean

redirect

protected static boolean redirect(ServiceRequest request,
                                  java.util.Locale locale)
tries to redirect to the given locale.

Parameters:
request - the current request
locale - the given locale
Returns:
true, if the redirect event was successfully set. Otherwise false