com.atlassian.confluence.themes
Class DefaultTheme

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

public class DefaultTheme
extends java.lang.Object
implements Theme

Represents the default Confluence theme with stylesheets.


Field Summary
static java.lang.String MODULE_KEY
           
static java.lang.String PLUGIN_KEY
           
static java.lang.String STYLESHEET_MODULE_KEY
           
static java.lang.String STYLESHEET_NAME
           
 
Method Summary
 ColourScheme getColourScheme()
          Returns null because this object doesn't represent a colour scheme.
 ThemedDecorator getDecorator(java.lang.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()
           
 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.
 void init(ThemeModuleDescriptor moduleDescriptor)
          Initialise the theme details from the given theme module descriptor.
 boolean isIncludeClassicStyles()
          Controls whether Confluence's 2.5 default styles will be included when rendering a theme stylesheet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLESHEET_NAME

public static final java.lang.String STYLESHEET_NAME
See Also:
Constant Field Values

PLUGIN_KEY

public static final java.lang.String PLUGIN_KEY
See Also:
Constant Field Values

MODULE_KEY

public static final java.lang.String MODULE_KEY
See Also:
Constant Field Values

STYLESHEET_MODULE_KEY

public static final java.lang.String STYLESHEET_MODULE_KEY
See Also:
Constant Field Values
Method Detail

getColourScheme

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.

Specified by:
getColourScheme in interface Theme

getDecorator

public ThemedDecorator getDecorator(java.lang.String path)
Returns null because this object doesn't attempt to list the default decorators, which are still loaded directly from the classpath.

Specified by:
getDecorator in interface Theme

getStylesheets

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

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

getPluginKey

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

getModuleKey

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

isIncludeClassicStyles

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

getInstance

public static Theme getInstance()


Copyright © 2003-2010 Atlassian. All Rights Reserved.