com.atlassian.confluence.themes
Class ExperimentalUnsupportedTheme

java.lang.Object
  extended by com.atlassian.confluence.themes.ExperimentalUnsupportedTheme
All Implemented Interfaces:
Theme

public class ExperimentalUnsupportedTheme
extends Object
implements Theme

Like BasicTheme, but allows you to do some truly evil stuff like overriding Velocity results and turning off Sitemesh. Use of this theme will BREAK CONFLUENCE REGULARLY, even on point release upgrades.


Constructor Summary
ExperimentalUnsupportedTheme()
           
 
Method Summary
 String getBodyClass()
          Returns the class for the body element specified by the theme.
 ColourScheme getColourScheme()
           
 ThemedDecorator getDecorator(String path)
           
 Collection<? extends ThemeResource> getJavascript()
          Return the JavaScript resources for the theme.
 String getModuleKey()
          Returns the module key of the theme plugin module, or null if this theme doesn't come from a plugin.
 String getPluginKey()
          Return the key of the plugin which includes this theme.
 Collection<? extends ThemeResource> getStylesheets()
          Return the stylesheets for the theme.
 String getTopNavLocation()
          Returns the location of the Velocity file which renders the top navigation.
 String getXworkVelocityPath(String packageName, String actionName, String result, String template)
          If this theme defines any specific overrides for Velocity XWork results, process them through here.
 boolean hasSpaceSideBar()
          Tells whether this theme requires rendering of the Space IA sidebar.
 void init(ThemeModuleDescriptor moduleDescriptor)
          Initialise the theme details from the given theme module descriptor.
 boolean isDisableSitemesh()
          If this flag returns true, all requests for sitemesh templates w.r.t this theme will return NoDecorator, leading to a total bypassing of the sitemesh-based theme system.
 boolean isIncludeClassicStyles()
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExperimentalUnsupportedTheme

public ExperimentalUnsupportedTheme()
Method Detail

init

public void init(ThemeModuleDescriptor moduleDescriptor)
Description copied from interface: Theme
Initialise the theme details from the given theme module descriptor.

Specified by:
init in interface Theme

getColourScheme

public ColourScheme getColourScheme()
Specified by:
getColourScheme in interface Theme

getBodyClass

public String getBodyClass()
Description copied from interface: Theme
Returns the class for the body element specified by the theme.

Specified by:
getBodyClass in interface Theme

getDecorator

public ThemedDecorator getDecorator(String path)
Specified by:
getDecorator in interface Theme

getStylesheets

public Collection<? extends ThemeResource> getStylesheets()
Description copied from interface: Theme
Return the stylesheets for the theme.

Specified by:
getStylesheets in interface Theme
Returns:
a Collection of ThemeResources representing custom stylesheets for this theme, or an empty list if none exist.

getJavascript

public Collection<? extends ThemeResource> getJavascript()
Description copied from interface: Theme
Return the JavaScript resources for the theme.

Specified by:
getJavascript in interface Theme
Returns:
a Collection of ThemeResources representing custom JavaScript for this theme, or an empty list if none exist.

getPluginKey

public String getPluginKey()
Description copied from interface: Theme
Return the key of the plugin which includes this theme. May return null if the theme doesn't come from a plugin.

Specified by:
getPluginKey in interface Theme

isIncludeClassicStyles

@Deprecated
public boolean isIncludeClassicStyles()
Deprecated. 

Description copied from interface: Theme
Controls whether Confluence's 2.5 default styles will be included when rendering a theme stylesheet.

Old themes (prior to 2.6) provided stylesheets to be used in conjuction with the default stylesheet in Confluence 2.5. To facilitate this, the com.atlassian.confluence.core.actions.StylesheetAction continues to include this "classic" stylesheet above theme stylesheets when this method returns true.

For new themes, it is recommended that stylesheets be independent of Confluence's styles. In this case, this method returns false, and the StylesheetAction will only render the theme's stylesheet.

Specified by:
isIncludeClassicStyles in interface Theme
Returns:
true if the theme should include Confluence's classic styles when rendering, or false if the theme should not include any Confluence styles.

getModuleKey

public String getModuleKey()
Description copied from interface: Theme
Returns the module key of the theme plugin module, or null if this theme doesn't come from a plugin.

Specified by:
getModuleKey in interface Theme

getXworkVelocityPath

public String getXworkVelocityPath(String packageName,
                                   String actionName,
                                   String result,
                                   String template)
Description copied from interface: Theme
If this theme defines any specific overrides for Velocity XWork results, process them through here.

Specified by:
getXworkVelocityPath in interface Theme
Parameters:
packageName - the package name of the action being run
actionName - the name of the action being run
result - the result string of the action being run
template - the Velocity template path the action wants to process
Returns:
the Velocity template path the action should process, with any overrides applied

getTopNavLocation

public String getTopNavLocation()
Description copied from interface: Theme
Returns the location of the Velocity file which renders the top navigation.

Specified by:
getTopNavLocation in interface Theme

hasSpaceSideBar

public boolean hasSpaceSideBar()
Description copied from interface: Theme
Tells whether this theme requires rendering of the Space IA sidebar. The Space IA side bar is the one on the left, which contains a tree view of pages, a chronological view of the blogs, and so on.

Recommended value: false for themes that don't require rendering of the Space IA sidebar, true otherwise. This value is true for the default theme starting from Confluence 5.0.

Specified by:
hasSpaceSideBar in interface Theme
Returns:
whether this theme needs rendering of the Space IA side bar.

isDisableSitemesh

public boolean isDisableSitemesh()
Description copied from interface: Theme
If this flag returns true, all requests for sitemesh templates w.r.t this theme will return NoDecorator, leading to a total bypassing of the sitemesh-based theme system.

Specified by:
isDisableSitemesh in interface Theme
Returns:
true if this theme wants to turn off sitemesh


Copyright © 2003–2015 Atlassian. All rights reserved.