Skip to content
l0rdn1kk0n edited this page Jul 22, 2012 · 9 revisions

superhero theme

Usage

Theme Provider

public interface ThemeProvider {

    Theme byName(final String name);

    List<Theme> available();

    Theme defaultTheme();
}

Active Theme Provider

public interface ActiveThemeProvider {

    /**
     * returns the current active theme (can user/session specific). If none is
     * set a default theme should be returned (implementation specific).
     * There is a session scoped implementation: {@code SessionThemeProvider}
     *
     * @return the current active theme
     */
    Theme getActiveTheme();

    /**
     * sets the active theme by its name. 
     * 
     * @param themeName the theme name
     */
    void setActiveTheme(String themeName);

    /**
     * sets the active theme
     * 
     * @param theme the theme to set
     */
    void setActiveTheme(Theme theme);
}
``
Clone this wiki locally