public class

BasicTheme

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

Class Overview

A theme that is loaded from a Confluence plugin.

Summary

Public Constructors
BasicTheme()
Public Methods
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.
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.
@Deprecated boolean isIncludeClassicStyles()
This method is deprecated. Since 3.5. Themes should include their own stylesheets and not rely on Confluence's legacy styles.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.themes.Theme

Public Constructors

public BasicTheme ()

Public Methods

public String getBodyClass ()

Returns the class for the body element specified by the theme.

public ColourScheme getColourScheme ()

public ThemedDecorator getDecorator (String path)

public Collection<? extends ThemeResource> getJavascript ()

Return the JavaScript resources for the theme.

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

public String getModuleKey ()

Returns the module key of the theme plugin module, or null if this theme doesn't come from a plugin.

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 ThemeResource> getStylesheets ()

Return the stylesheets for the theme.

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

public String getTopNavLocation ()

Returns the location of the Velocity file which renders the top navigation.

public 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.

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

public void init (ThemeModuleDescriptor moduleDescriptor)

Initialise the theme details from the given theme module descriptor.

public 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.

Returns
  • true if this theme wants to turn off sitemesh

@Deprecated public boolean isIncludeClassicStyles ()

This method is deprecated.
Since 3.5. Themes should include their own stylesheets and not rely on Confluence's legacy styles.

Classic (pre 2.5) styles are no longer supported by Confluecne, hence this will always returns false.

Returns
  • true if the theme should include Confluence's classic styles when rendering, or false if the theme should not include any Confluence styles.