com.atlassian.confluence.themes
Interface Theme

All Known Implementing Classes:
BasicTheme, DefaultTheme, ExperimentalUnsupportedTheme

public interface Theme


Method Summary
 java.lang.String getBodyClass()
          Returns the class for the body element specified by the theme.
 ColourScheme getColourScheme()
           
 ThemedDecorator getDecorator(java.lang.String path)
           
 java.util.Collection<? extends ThemeResource> getJavascript()
          Return the JavaScript resources for the theme.
 java.lang.String getModuleKey()
          Returns the module key of the theme plugin module, or null if this theme doesn't come from a plugin.
 java.lang.String getPluginKey()
          Return the key of the plugin which includes this theme.
 java.util.Collection<? extends ThemeResource> getStylesheets()
          Return the stylesheets for the theme.
 java.lang.String getTopNavLocation()
          Deprecated. since 5.0 - with the common header themes shouldn't specify their own top navigation anymore. This method is no longer called from anywhere within Confluence.
 java.lang.String getXworkVelocityPath(java.lang.String packageName, java.lang.String actionName, java.lang.String result, java.lang.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. Since 3.5. Themes should include their own stylesheets and not rely on Confluence's legacy styles.
 

Method Detail

getColourScheme

ColourScheme getColourScheme()

getBodyClass

java.lang.String getBodyClass()
Returns the class for the body element specified by the theme.


getDecorator

ThemedDecorator getDecorator(java.lang.String path)

getStylesheets

java.util.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.

getJavascript

java.util.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.

init

void init(ThemeModuleDescriptor moduleDescriptor)
Initialise the theme details from the given theme module descriptor.


getPluginKey

java.lang.String getPluginKey()
Return the key of the plugin which includes this theme. May return null if the theme doesn't come from a plugin.


getModuleKey

java.lang.String getModuleKey()
Returns the module key of the theme plugin module, or null if this theme doesn't come from a plugin.


isIncludeClassicStyles

@Deprecated
boolean isIncludeClassicStyles()
Deprecated. Since 3.5. Themes should include their own stylesheets and not rely on Confluence's legacy styles.

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.

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

isDisableSitemesh

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

getXworkVelocityPath

java.lang.String getXworkVelocityPath(java.lang.String packageName,
                                      java.lang.String actionName,
                                      java.lang.String result,
                                      java.lang.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

getTopNavLocation

java.lang.String getTopNavLocation()
Deprecated. since 5.0 - with the common header themes shouldn't specify their own top navigation anymore. This method is no longer called from anywhere within Confluence.

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


hasSpaceSideBar

boolean hasSpaceSideBar()
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.

Returns:
whether this theme needs rendering of the Space IA side bar.
Since:
5.0


Copyright © 2003-2014 Atlassian. All Rights Reserved.