Package io.jenkins.plugins.thememanager
Class ThemeManagerPageDecorator
- java.lang.Object
-
- hudson.model.Descriptor<PageDecorator>
-
- hudson.model.PageDecorator
-
- io.jenkins.plugins.thememanager.ThemeManagerPageDecorator
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PageDecorator>
,Saveable
,OnMaster
@Extension @Symbol("themeManager") public class ThemeManagerPageDecorator extends PageDecorator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.PageDecorator
ALL
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description ThemeManagerPageDecorator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
Theme
findTheme()
Finds the active theme.ThemeManagerFactory
findThemeFactory()
static ThemeManagerPageDecorator
get()
GlobalConfigurationCategory
getCategory()
String
getHeaderHtml()
Get the complete header HTML for all configured theme elements.ThemeManagerFactory
getTheme()
String
getThemeKey()
boolean
isDisableUserThemes()
boolean
isRespectSystemAppearance()
void
setDisableUserThemes(boolean disableUserThemes)
void
setTheme(ThemeManagerFactory theme)
boolean
shouldInjectCss()
Filter to only inject CSS into "normal" Jenkins pages.-
Methods inherited from class hudson.model.PageDecorator
all, getDescriptor, getUrl
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
get
public static ThemeManagerPageDecorator get()
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
- Overrides:
configure
in classDescriptor<PageDecorator>
-
getCategory
@NonNull public GlobalConfigurationCategory getCategory()
- Overrides:
getCategory
in classDescriptor<PageDecorator>
-
setTheme
@DataBoundSetter public void setTheme(ThemeManagerFactory theme)
-
getTheme
public ThemeManagerFactory getTheme()
-
isDisableUserThemes
public boolean isDisableUserThemes()
-
setDisableUserThemes
@DataBoundSetter public void setDisableUserThemes(boolean disableUserThemes)
-
findTheme
@NonNull public Theme findTheme()
Finds the active theme. Checks User and then global theme.- Returns:
- the active theme, or a no-op theme if not selected
-
findThemeFactory
@NonNull public ThemeManagerFactory findThemeFactory()
-
getHeaderHtml
public String getHeaderHtml()
Get the complete header HTML for all configured theme elements.
-
getThemeKey
public String getThemeKey()
-
isRespectSystemAppearance
public boolean isRespectSystemAppearance()
-
shouldInjectCss
public boolean shouldInjectCss()
Filter to only inject CSS into "normal" Jenkins pages. Some plugins replace the whole layout of Jenkins and we don't want to disturb them.- Returns:
- true if it is okay to inject CSS
-
-