Package com.atlassian.confluence.themes
Class DefaultThemeManager
- java.lang.Object
-
- com.atlassian.confluence.themes.DefaultThemeManager
-
- All Implemented Interfaces:
ThemeManager
public class DefaultThemeManager extends Object implements ThemeManager
For CONF-9959, this manager will only retrieve theme settings from bandana if the system has been successfully upgraded. This check is done via the UpgradeManager and is done to avoid SQL on missing tables while we try and display an upgrade error to a client.
-
-
Constructor Summary
Constructors Constructor Description DefaultThemeManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<ThemeModuleDescriptor>getAvailableThemeDescriptors()ThemegetGlobalTheme()Gets the globally configured theme.StringgetGlobalThemeKey()ThemegetSpaceTheme(String spaceKey)Retrieve the theme configured for an identified space.StringgetSpaceThemeKey(String spaceKey)voidsetAuditingContext(AuditingContext auditingContext)voidsetBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)Deprecated.since 7.7 usesetThemeKeyDao(ThemeKeyDao)with aBandanaThemeKeyDaovoidsetEventManager(com.atlassian.event.EventManager eventManager)voidsetGlobalTheme(String themeCompleteKey)voidsetPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)voidsetSpaceTheme(String spaceKey, String themeCompleteKey)voidsetThemeKeyDao(ThemeKeyDao themeKeyDao)voidsetUpgradedFlag(UpgradedFlag upgradedFlag)voidsetUpgradeManager(UpgradeManager upgradeManager)Deprecated.since 7.20 usesetUpgradedFlag(UpgradedFlag)
-
-
-
Method Detail
-
getGlobalTheme
public Theme getGlobalTheme()
Description copied from interface:ThemeManagerGets the globally configured theme. If no theme is configured or the globally configured theme is a plugin that cannot be found, then theDefaultThemeshould be returned.- Specified by:
getGlobalThemein interfaceThemeManager- Returns:
- a theme, not null.
-
getGlobalThemeKey
public String getGlobalThemeKey()
- Specified by:
getGlobalThemeKeyin interfaceThemeManager
-
getSpaceTheme
public Theme getSpaceTheme(String spaceKey)
Retrieve the theme configured for an identified space. If no theme is found for the space then the global theme will be returned.- Specified by:
getSpaceThemein interfaceThemeManager
-
getSpaceThemeKey
public String getSpaceThemeKey(String spaceKey)
- Specified by:
getSpaceThemeKeyin interfaceThemeManager
-
setGlobalTheme
public void setGlobalTheme(String themeCompleteKey)
- Specified by:
setGlobalThemein interfaceThemeManager
-
setSpaceTheme
public void setSpaceTheme(String spaceKey, String themeCompleteKey)
- Specified by:
setSpaceThemein interfaceThemeManager
-
getAvailableThemeDescriptors
public List<ThemeModuleDescriptor> getAvailableThemeDescriptors()
- Specified by:
getAvailableThemeDescriptorsin interfaceThemeManager
-
setBandanaManager
@Deprecated public void setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)
Deprecated.since 7.7 usesetThemeKeyDao(ThemeKeyDao)with aBandanaThemeKeyDao
-
setThemeKeyDao
public void setThemeKeyDao(ThemeKeyDao themeKeyDao)
- Since:
- 7.7
-
setEventManager
public void setEventManager(com.atlassian.event.EventManager eventManager)
-
setUpgradeManager
@Deprecated public void setUpgradeManager(UpgradeManager upgradeManager)
Deprecated.since 7.20 usesetUpgradedFlag(UpgradedFlag)
-
setUpgradedFlag
public void setUpgradedFlag(UpgradedFlag upgradedFlag)
- Since:
- 7.20
-
setAuditingContext
public void setAuditingContext(AuditingContext auditingContext)
-
setPluginAccessor
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
-
-