Package com.atlassian.confluence.themes
Class ThemeContext
- java.lang.Object
-
- com.atlassian.confluence.themes.ThemeContext
-
public class ThemeContext extends Object
Context object placed in the HttpServletRequest attributes that the theme manager can use to determine what the 'context' of the current request might be. Currently we just stick the space in here but there's room for expansion.
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTRIBUTE_KEY
-
Constructor Summary
Constructors Constructor Description ThemeContext(Space currentSpace, Theme spaceTheme, Theme globalTheme)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ThemeContextget(javax.servlet.ServletRequest request)ThemegetAppliedTheme()ThemegetGlobalTheme()SpacegetSpace()StringgetSpaceKey()ThemegetSpaceTheme()booleanhasGlobalTheme()booleanhasSpaceTheme()static booleanhasThemeContext(javax.servlet.ServletRequest request)static voidset(javax.servlet.ServletRequest request, Space currentSpace, Theme currentTheme, Theme globalTheme)
-
-
-
Field Detail
-
ATTRIBUTE_KEY
public static final String ATTRIBUTE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
set
public static void set(javax.servlet.ServletRequest request, Space currentSpace, Theme currentTheme, Theme globalTheme)
-
get
public static ThemeContext get(javax.servlet.ServletRequest request)
-
hasThemeContext
public static boolean hasThemeContext(javax.servlet.ServletRequest request)
- Returns:
- true if the request has some theme context
- Since:
- 7.5
-
getSpace
public Space getSpace()
-
hasSpaceTheme
public boolean hasSpaceTheme()
-
getSpaceTheme
public Theme getSpaceTheme()
-
hasGlobalTheme
public boolean hasGlobalTheme()
-
getGlobalTheme
public Theme getGlobalTheme()
-
getSpaceKey
public String getSpaceKey()
-
getAppliedTheme
public Theme getAppliedTheme()
-
-