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.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault display label for automation (AI) replies posted under an Interactive View comment.static final intDefault retention for answered/aborted/expired questions before compaction (§8.2).Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) static intstatic Featuresstatic InteractiveInputGlobalConfigget()intgetSla()booleanbooleanbooleanstatic booleanstatic intstatic booleanstatic intvoidsetAutomationReplyName(String automationReplyName) voidsetFeatures(Features features) voidsetLockToBuildStarter(boolean lockToBuildStarter) voidsetPolling(Polling polling) voidsetReopenBuildDialogEveryVisit(boolean reopenBuildDialogEveryVisit) voidsetRetentionDays(int retentionDays) voidvoidsetUserScopedNotifications(boolean userScopedNotifications) static booleanMethods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Field Details
-
DEFAULT_RETENTION_DAYS
public static final int DEFAULT_RETENTION_DAYSDefault retention for answered/aborted/expired questions before compaction (§8.2).- See Also:
-
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
- Returns:
- the singleton instance, or
nullonly in the unusual case that the extension is not registered (e.g. some minimal test harnesses). Callers should treatnullas "all defaults" via the*OrDefaulthelpers below.
-
getFeatures
-
setFeatures
-
getPolling
-
setPolling
-
getSla
-
setSla
-
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
- Returns:
- the global display label for automation (AI) replies; never blank (defaulted).
-
setAutomationReplyName
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configurein classGlobalConfiguration- Throws:
Descriptor.FormException
-
featuresOrDefault
-
pollingIntervalSecondsOrDefault
public static int pollingIntervalSecondsOrDefault() -
defaultSlaMinutesOrDefault
public static int defaultSlaMinutesOrDefault() -
retentionDaysOrDefault
public static int retentionDaysOrDefault() -
automationReplyNameOrDefault
- Returns:
- the configured global display label for automation (AI) replies, or the built-in
defaultwhen 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.jsauto-popup behaviour; only ever takes effect when the rich modal is enabled and a build is actually waiting for input.
-