Class Theme

java.lang.Object
io.jenkins.plugins.thememanager.Theme

public class Theme extends Object
Holds URLs to CSS and JavaScript files.

Initialise it with builder()

  • Method Details

    • getCssUrls

      public List<String> getCssUrls()
      Returns:
      list of CSS URLs for the theme.
    • getJavascriptUrls

      public List<String> getJavascriptUrls()
      Returns:
      list of JavaScript URLs for the theme.
    • isBlueOceanCompatible

      public boolean isBlueOceanCompatible()
      Whether the theme should be served on Blue Ocean.
      Returns:
      if the theme is compatible with blue ocean.
    • isRespectSystemAppearance

      public boolean isRespectSystemAppearance()
    • getProperties

      public List<String> getProperties(String artifactId)
      Additional information that theme authors can provide to influence other plugins

      e.g. the Prism API plugin can read properties and use a default theme based on this information.

      Parameters:
      artifactId - the plugin to retrieve the properties for
      Returns:
      the properties associated with the plugin requested
    • getProperty

      @Deprecated public Optional<String> getProperty(String artifactId, String propertyName)
      Deprecated.
      use getThemeManagerProperty from JavaScript instead
      Do not use this as it doesn't support system themes. Additional information that theme authors can provide to influence other plugins

      e.g. the Prism API plugin can read properties and use a default theme based on this information.

      Parameters:
      artifactId - the plugin to retrieve the properties for
      propertyName - the property to retrieve
      Returns:
      the properties associated with the plugin requested
    • builder

      public static Theme.Builder builder()
      Constructs the builder for the theme.
      Returns:
      an empty builder for building the theme.