public class

DefaultStylesheetManager

extends Object
implements StylesheetManager
java.lang.Object
   ↳ com.atlassian.confluence.themes.DefaultStylesheetManager

Summary

Public Constructors
DefaultStylesheetManager()
Public Methods
void addGlobalStylesheet(String style)
Adds a global stylesheet to customize the look and feel of Confluence
void addSpaceStylesheet(String spaceKey, String style)
Adds a space stylesheet to customize the look and feel of a single space within Confluence.
String getGlobalStylesheet()
Retrieve the custom global stylesheet
String getSpaceStylesheet(String spaceKey)
Retrieve the custom stylesheet that has been stored against a space.
String getSpaceStylesheet(String spaceKey, boolean shouldLookGlobal)
Retrieve the custom stylesheet that has been stored against a space.
void removeGlobalStylesheet()
removes the global Confluence stylesheet
void removeSpaceStylesheet(String spaceKey)
Removes a space specific stylesheet
void setBandanaManager(BandanaManager bandanaManager)
void setEventManager(EventManager eventManager)
void setSpaceManager(SpaceManager spaceManager)
void setThemeManager(ThemeManager themeManager)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.themes.StylesheetManager

Public Constructors

public DefaultStylesheetManager ()

Public Methods

public void addGlobalStylesheet (String style)

Adds a global stylesheet to customize the look and feel of Confluence

Parameters
style A String representing the css styles for Confluence

public void addSpaceStylesheet (String spaceKey, String style)

Adds a space stylesheet to customize the look and feel of a single space within Confluence.

Parameters
spaceKey The key of the Confluence space to which the syle should be applied
style A String representing the css styles for the space

public String getGlobalStylesheet ()

Retrieve the custom global stylesheet

Returns
  • style A String containing the css styles for Confluence

public String getSpaceStylesheet (String spaceKey)

Retrieve the custom stylesheet that has been stored against a space.

If no stylesheet is stored against the space, the global stylesheet will be applied if one exists. However, if a space theme is set, the global styles will be ignored.

Parameters
spaceKey The key of the Confluence space for which you want to retrieve the style
Returns
  • A String containing the css styles for the space

public String getSpaceStylesheet (String spaceKey, boolean shouldLookGlobal)

Retrieve the custom stylesheet that has been stored against a space.

Parameters
spaceKey The key of the Confluence space for which you want to retrieve the style
shouldLookGlobal determines whether it should look for a global style if no space style exists
Returns
  • A String containing the css styles for the space

public void removeGlobalStylesheet ()

removes the global Confluence stylesheet

public void removeSpaceStylesheet (String spaceKey)

Removes a space specific stylesheet

Parameters
spaceKey The key of the Confluence space from which to remove the style

public void setBandanaManager (BandanaManager bandanaManager)

public void setEventManager (EventManager eventManager)

public void setSpaceManager (SpaceManager spaceManager)

public void setThemeManager (ThemeManager themeManager)