Package io.jenkins.plugins.thememanager
Class ThemeManagerFactory
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<ThemeManagerFactory>
-
- io.jenkins.plugins.thememanager.ThemeManagerFactory
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ThemeManagerFactory>
- Direct Known Subclasses:
NoOpThemeManagerFactory
public abstract class ThemeManagerFactory extends AbstractDescribableImpl<ThemeManagerFactory> implements ExtensionPoint
Pluggable ability to add additional built-in themes. The descriptor's display name will be used for the UI labelSince the user can configure this class, you must have a
DataBoundConstructor
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ThemeManagerFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getCssUrl()
Expected CSS URL assuming your CSS file is named after your theme.ThemeManagerFactoryDescriptor
getDescriptor()
String
getJavaScriptUrl()
Expected JavaScript URL assuming your JavaScript file is named after your theme.abstract Theme
getTheme()
String
toAssetUrl(String asset)
Arbitrary asset URL.
-
-
-
Method Detail
-
getTheme
public abstract Theme getTheme()
-
getCssUrl
public String getCssUrl()
Expected CSS URL assuming your CSS file is named after your theme. You can also change the CSS file name by overriding:ThemeManagerFactoryDescriptor.getThemeCssSuffix()
See
toAssetUrl(String)
for arbitrary files- Returns:
- CSS url in the form '$JENKINS_URL/theme-$themeId/theme.css.
-
toAssetUrl
public String toAssetUrl(String asset)
Arbitrary asset URL. Useful if you want additional css or js files- Parameters:
asset
- additional-stylesheet.css- Returns:
- Asset url in the form '$JENKINS_URL/theme-$themeId/$asset-parameter
-
getJavaScriptUrl
public String getJavaScriptUrl()
Expected JavaScript URL assuming your JavaScript file is named after your theme. You can also change the CSS file name by overriding:ThemeManagerFactoryDescriptor.getThemeJsSuffix()
See
toAssetUrl(String)
for arbitrary files- Returns:
- JavaScript url in the form '$JENKINS_URL/theme-$themeId/theme.js.
-
getDescriptor
public ThemeManagerFactoryDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<ThemeManagerFactory>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<ThemeManagerFactory>
-
-