Class InteractiveInputGlobalConfig

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

@Extension @Symbol("interactiveInput") public class InteractiveInputGlobalConfig extends GlobalConfiguration
Global, JCasC-compatible configuration for the plugin (§6.4, §8.8).

Maps to the JCasC path unclassified.interactiveInput. Every capability is opt-in via Features; the bell cadence and default SLA live in Polling and Sla.

This class also holds the two authorization switches (userScopedNotifications, lockToBuildStarter). They govern who may see/answer a question, so they belong under System (functional config) rather than Appearance (look-and-feel) — review item B18. Both default off and only ever restrict access on top of the core permission checks in QuestionStore — they never widen it.

  • Field Details

    • DEFAULT_RETENTION_DAYS

      public static final int DEFAULT_RETENTION_DAYS
      Default retention for answered/aborted/expired questions before compaction (§8.2).
      See Also:
    • DEFAULT_AUTOMATION_REPLY_NAME

      public static final String DEFAULT_AUTOMATION_REPLY_NAME
      Default display label for automation (AI) replies posted under an Interactive View comment.
      See Also:
  • Constructor Details

    • InteractiveInputGlobalConfig

      public InteractiveInputGlobalConfig()
  • Method Details

    • get

      public static InteractiveInputGlobalConfig get()
      Returns:
      the singleton instance, or null only in the unusual case that the extension is not registered (e.g. some minimal test harnesses). Callers should treat null as "all defaults" via the *OrDefault helpers below.
    • getFeatures

      @NonNull public Features getFeatures()
    • setFeatures

      @DataBoundSetter public void setFeatures(@NonNull Features features)
    • getPolling

      @NonNull public Polling getPolling()
    • setPolling

      @DataBoundSetter public void setPolling(@NonNull Polling polling)
    • getSla

      @NonNull public Sla getSla()
    • setSla

      @DataBoundSetter public void setSla(@NonNull Sla sla)
    • getRetentionDays

      public int getRetentionDays()
    • setRetentionDays

      @DataBoundSetter public void setRetentionDays(int retentionDays)
    • isUserScopedNotifications

      public boolean isUserScopedNotifications()
    • setUserScopedNotifications

      @DataBoundSetter public void setUserScopedNotifications(boolean userScopedNotifications)
    • isLockToBuildStarter

      public boolean isLockToBuildStarter()
    • setLockToBuildStarter

      @DataBoundSetter public void setLockToBuildStarter(boolean lockToBuildStarter)
    • isReopenBuildDialogEveryVisit

      public boolean isReopenBuildDialogEveryVisit()
    • setReopenBuildDialogEveryVisit

      @DataBoundSetter public void setReopenBuildDialogEveryVisit(boolean reopenBuildDialogEveryVisit)
    • getAutomationReplyName

      @NonNull public String getAutomationReplyName()
      Returns:
      the global display label for automation (AI) replies; never blank (defaulted).
    • setAutomationReplyName

      @DataBoundSetter public void setAutomationReplyName(String automationReplyName)
    • 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
    • featuresOrDefault

      @NonNull public static Features featuresOrDefault()
    • pollingIntervalSecondsOrDefault

      public static int pollingIntervalSecondsOrDefault()
    • defaultSlaMinutesOrDefault

      public static int defaultSlaMinutesOrDefault()
    • retentionDaysOrDefault

      public static int retentionDaysOrDefault()
    • automationReplyNameOrDefault

      @NonNull public static String automationReplyNameOrDefault()
      Returns:
      the configured global display label for automation (AI) replies, or the built-in default when unset. Used by the REST comment endpoint to label an automated reply that does not carry its own per-reply override.
    • userScopedNotificationsEnabled

      public static boolean userScopedNotificationsEnabled()
      Returns:
      whether notification surfaces are scoped to the build starter. Off by default.
    • lockToBuildStarterEnabled

      public static boolean lockToBuildStarterEnabled()
      Returns:
      whether only the build starter (or an admin) may answer. Off by default.
    • reopenBuildDialogEveryVisitEnabled

      public static boolean reopenBuildDialogEveryVisitEnabled()
      Returns:
      whether the build-page auto-open dialog should re-open on every visit (mode B). Off by default, which selects the gentler mode A (open once per browser session per build, dismissible). Controls bell.js auto-popup behaviour; only ever takes effect when the rich modal is enabled and a build is actually waiting for input.