Class InteractiveInputAppearanceConfig

java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.interactiveinput.config.InteractiveInputAppearanceConfig
All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, Loadable, OnMaster

@Extension @Symbol("interactiveInputAppearance") public class InteractiveInputAppearanceConfig extends GlobalConfiguration
Appearance-facing configuration for the plugin's notification surfaces (§6.4).

Kept deliberately separate from InteractiveInputGlobalConfig (which holds functional flags under Manage Jenkins → System): Jenkins core guidance is that look-and-feel settings belong in their own AppearanceCategory class so they surface under Manage Jenkins → Appearance. Because AppearanceCategory has no @Symbol, JCasC maps this block to the appearance.interactiveInputAppearance path (verified against GlobalConfigurationCategoryConfigurator).

Look-and-feel switches plus an icon chooser:

  • notificationCentre — the global bell (off by default). When on, it lists all answerable questions on the dashboard but scopes to the current pipeline's questions when viewing a job/build.
  • perProjectCentre — per-pipeline/per-build surfaces (sidebar page, build-history "awaiting input" badge, per-build audit view). On by default.
  • jobPageBox — the large inline box on the job page. On by default; independently switchable so an operator can keep the badge/sidebar without the big box.
  • tabNotificationBadge — on by default. Mirrors the viewer's pending count in the browser tab (a "(N)" title prefix and a small dot painted on top of the existing favicon) when the header bell is enabled. It never replaces the site favicon, so a custom favicon (e.g. from the Simple Theme plugin) is preserved.
  • viewBuildCard — the Interactive View card on the build overview (experimental layout). On by default; turn off to hide the card and its top-nav tab while the dedicated review page, sidebar link and badge stay reachable.
  • outputBuildCard — the Interactive Output card on the build page. On by default; gates both the experimental overview card and the classic summary row, while the dedicated output page stays reachable.
  • icon — which Ionicon represents interactive input across the bell, badge and sidebar.

The authorization switches that govern who may see/answer a question (userScopedNotifications, lockToBuildStarter) are not look-and-feel and live under Manage Jenkins → System in InteractiveInputGlobalConfig (unclassified.interactiveInput), per Jenkins core guidance (review item B18).

  • Field Details

    • ICON_CHOICES

      public static final List<String> ICON_CHOICES
      Selectable icon stems. Most are Ionicons (rendered via the -outline variant from ionicons-api); CUSTOM_SYMBOLS lists the ones this plugin ships itself (Ionicons has no robot glyph, so robot is a bundled symbol under src/main/resources/images/symbols).
    • DEFAULT_ICON

      public static final String DEFAULT_ICON
      Default icon: a megaphone conveying "needs attention / announcement".
      See Also:
  • Constructor Details

    • InteractiveInputAppearanceConfig

      public InteractiveInputAppearanceConfig()
  • Method Details

    • get

      @CheckForNull public static InteractiveInputAppearanceConfig get()
      Returns:
      the singleton, or null only if the extension is not registered (some minimal test harnesses). Callers should prefer the *Enabled/*OrDefault helpers.
    • getCategory

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

      public boolean isNotificationCentre()
    • setNotificationCentre

      @DataBoundSetter public void setNotificationCentre(boolean notificationCentre)
    • isPerProjectCentre

      public boolean isPerProjectCentre()
    • setPerProjectCentre

      @DataBoundSetter public void setPerProjectCentre(boolean perProjectCentre)
    • isJobPageBox

      public boolean isJobPageBox()
    • setJobPageBox

      @DataBoundSetter public void setJobPageBox(boolean jobPageBox)
    • isTabNotificationBadge

      public boolean isTabNotificationBadge()
    • setTabNotificationBadge

      @DataBoundSetter public void setTabNotificationBadge(boolean tabNotificationBadge)
    • isViewBuildCard

      public boolean isViewBuildCard()
    • setViewBuildCard

      @DataBoundSetter public void setViewBuildCard(boolean viewBuildCard)
    • isOutputBuildCard

      public boolean isOutputBuildCard()
    • setOutputBuildCard

      @DataBoundSetter public void setOutputBuildCard(boolean outputBuildCard)
    • getIcon

      @NonNull public String getIcon()
    • setIcon

      @DataBoundSetter public void setIcon(@CheckForNull String icon)
    • getIconClassName

      @NonNull public String getIconClassName()
      Returns:
      the theme-aware Jenkins symbol class for the configured icon (via ionicons-api).
    • iconClassName

      @NonNull public static String iconClassName(@CheckForNull String iconStem)
      Parameters:
      iconStem - an icon stem (validated against ICON_CHOICES; unknown values fall back to DEFAULT_ICON)
      Returns:
      the Jenkins symbol class rendered as an SVG: symbol-<name> plugin-interactive-ci for plugin-shipped symbols (CUSTOM_SYMBOLS), otherwise symbol-<name>-outline plugin-ionicons-api
    • notificationCentreEnabled

      public static boolean notificationCentreEnabled()
      Returns:
      whether the global notification bell should render. Off by default.
    • perProjectCentreEnabled

      public static boolean perProjectCentreEnabled()
      Returns:
      whether per-pipeline/per-build surfaces are enabled. On by default.
    • jobPageBoxEnabled

      public static boolean jobPageBoxEnabled()
      Returns:
      whether the large inline job-page box is enabled. On by default.
    • tabNotificationBadgeEnabled

      public static boolean tabNotificationBadgeEnabled()
      Returns:
      whether the browser-tab pending badge (title + favicon dot) is enabled. On by default.
    • viewBuildCardEnabled

      public static boolean viewBuildCardEnabled()
      Returns:
      whether the Interactive View card on the build overview is enabled. On by default.
    • outputBuildCardEnabled

      public static boolean outputBuildCardEnabled()
      Returns:
      whether the Interactive Output card on the build page is enabled. On by default.
    • iconClassNameOrDefault

      @NonNull public static String iconClassNameOrDefault()
      Returns:
      the configured icon's symbol class, or the default's when unconfigured.
    • doFillIconItems

      @POST @NonNull public ListBoxModel doFillIconItems()
      Populates the icon dropdown on the Appearance config page (label ⇒ stem). @POST for the Security Scan CSRF check; Jenkins.ADMINISTER because this page is overall config.
    • configure

      public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException
      Overrides:
      configure in class GlobalConfiguration
      Throws:
      Descriptor.FormException