Class PrismAppearanceConfiguration

java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.util.GlobalConfigurationItem
io.jenkins.plugins.prism.PrismAppearanceConfiguration
All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, Loadable, OnMaster

@Extension @Symbol("prism") public class PrismAppearanceConfiguration extends io.jenkins.plugins.util.GlobalConfigurationItem
Global system configuration for Prism. These configuration options are used globally for all jobs and require administrator permissions.

The following settings can be configured:

  • Theme: Prism supports several themes that can be used to adapt the look and feel. You can configure the default theme used for all Jenkins jobs.
  • Source code protection: you can require Item.WORKSPACE permission to view rendered source code.
Author:
Ullrich Hafner
  • Constructor Details

    • PrismAppearanceConfiguration

      public PrismAppearanceConfiguration()
      Creates the global configuration and loads the initial values from the corresponding XML file.
  • Method Details

    • getCategory

      @NonNull public GlobalConfigurationCategory getCategory()
      Overrides:
      getCategory in class Descriptor<GlobalConfiguration>
    • getInstance

      public static PrismAppearanceConfiguration getInstance()
      Returns the singleton instance of this PrismAppearanceConfiguration.
      Returns:
      the singleton instance
    • setTheme

      @DataBoundSetter public void setTheme(PrismTheme theme)
      Sets the active theme to be used when rendering the source code with prism.
      Parameters:
      theme - the theme to use
    • getTheme

      public PrismTheme getTheme()
    • isProtectSourceCodeByPermission

      public boolean isProtectSourceCodeByPermission()
      Returns whether the source code view should be protected by the Item.WORKSPACE permission.
      Returns:
      true the source code view should be protected, false otherwise
    • setProtectSourceCodeByPermission

      @DataBoundSetter public void setProtectSourceCodeByPermission(boolean protectSourceCodeByPermission)
      Enables or disables the protection of the source code view by the Item.WORKSPACE permission.
      Parameters:
      protectSourceCodeByPermission - true to enable the protection, false to disable it
    • doFillThemeItems

      @POST public ListBoxModel doFillThemeItems()
      Returns all available themes.
      Returns:
      a model with all available themes