public class

DefaultTheme

extends Object
implements Theme
java.lang.Object
   ↳ com.atlassian.confluence.themes.DefaultTheme

Class Overview

Represents the default Confluence theme with stylesheets.

Summary

Constants
String PLUGIN_KEY
String STYLESHEET_MODULE_KEY
String STYLESHEET_NAME
Public Methods
ColourScheme getColourScheme()
Returns null because this object doesn't represent a colour scheme.
ThemedDecorator getDecorator(String path)
Returns null because this object doesn't attempt to list the default decorators, which are still loaded directly from the classpath.
static Theme getInstance()
String getPluginKey()
Return the key of the plugin which includes this theme.
Collection<? extends ThemeStylesheet> getStylesheets()
Return the stylesheets for the theme.
void init(ThemeModuleDescriptor moduleDescriptor)
boolean isIncludeClassicStyles()
Controls whether Confluence's 2.5 default styles will be included when rendering a theme stylesheet.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.themes.Theme

Constants

public static final String PLUGIN_KEY

Constant Value: "com.atlassian.confluence.themes.default"

public static final String STYLESHEET_MODULE_KEY

Constant Value: "com.atlassian.confluence.themes.default:styles"

public static final String STYLESHEET_NAME

Constant Value: "default-theme.css"

Public Methods

public ColourScheme getColourScheme ()

Returns null because this object doesn't represent a colour scheme. All callers assume a null colour scheme means use the custom colour scheme for a particular space, which is the correct behaviour.

public ThemedDecorator getDecorator (String path)

Returns null because this object doesn't attempt to list the default decorators, which are still loaded directly from the classpath.

public static Theme getInstance ()

public String getPluginKey ()

Return the key of the plugin which includes this theme. May return null if the theme doesn't come from a plugin.

public Collection<? extends ThemeStylesheet> getStylesheets ()

Return the stylesheets for the theme.

Returns
  • a Collection of ThemeStylesheets representing custom stylesheets for this theme, or an empty list if none exist.

public void init (ThemeModuleDescriptor moduleDescriptor)

public boolean isIncludeClassicStyles ()

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 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.
Returns
  • true if the theme should include Confluence's classic styles when rendering, or false if the theme should not include any Confluence styles.