Class BatchControlGlobalConfiguration
- All Implemented Interfaces:
ExtensionPoint,Describable<GlobalConfiguration>,Saveable,Loadable,OnMaster
ChangeRecord(CONFIG_TOGGLE) to the store (SPEC item 1).
e2e-03 DEF-08: the web form is validated before anything is bound. Each field has a
doCheck* method, so the message appears next to the field while typing, and
configure(org.kohsuke.stapler.StaplerRequest2, net.sf.json.JSONObject) refuses a submission holding an invalid value with a
Descriptor.FormException naming that field; nothing is saved then. The
setters (JCasC, scripts) still ignore non-positive values, so an invalid value can never be
persisted on any path.
e2e-03 DEF-10: BatchControl/Manage is enough to open and save this configuration
(getRequiredGlobalConfigPagePermission(), and BatchControlConfigurationLink for
a holder who cannot open core's system configuration page).
-
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 StringThetargetof aChangeType.CONFIG_CHANGErecord (D-52).Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) Stapler form validation (read-only).doCheckApproversText(String value) Stapler form validation of the approver list (read-only, D-53).doCheckGrantDurationOptions(String value, String maxGrantMinutes) Stapler form validation of the field named by its SPEC key (read-only).doCheckGrantDurationOptionsText(String value, String maxGrantMinutes) Stapler form validation (read-only); re-run when the maximum changes.doCheckIncidentResults(String value) Stapler form validation of the field named by its SPEC key (read-only).doCheckIncidentResultsText(String value) Stapler form validation (read-only).doCheckMaxGrantMinutes(String value) Stapler form validation (read-only).Stapler form validation (read-only).doCheckPendingTimeoutHours(String value) Stapler form validation (read-only).doCheckRetentionMonths(String value) Stapler form validation (read-only).get()intintintinte2e-03 DEF-10: this section is shown and saved forBatchControl/Manageholders (implied byOverall/Administer) rather than for administrators only.intbooleanbooleanbooleanbooleanWhether the Mailer plugin is installed and active; the configuration page shows theemailNotificationsoption only then (D-36).booleanvoidsave()S-25-06: a detached draft or candidate is never written toconfig.xml.voidsetAllowAdminSelfApproval(boolean allowAdminSelfApproval) voidsetApprovedRunTimeoutMinutes(int approvedRunTimeoutMinutes) voidsetApprovers(List<String> approvers) voidsetApproversText(String text) voidsetChangeControlEnabled(boolean enabled) S-15: turning change control off is a kill switch, not just a stop on new windows.voidsetEmailNotifications(boolean emailNotifications) voidsetGrantDurationOptions(List<Integer> grantDurationOptions) voidvoidsetIncidentResults(List<String> incidentResults) voidsetIncidentResultsText(String text) voidsetMaxGrantMinutes(int maxGrantMinutes) voidsetNotifyBeforeExpiryMinutes(int notifyBeforeExpiryMinutes) voidsetPendingTimeoutHours(int pendingTimeoutHours) voidsetRetentionMonths(int retentionMonths) voidsetRunControlEnabled(boolean enabled) Direct switch change (JCasC, script console).Methods 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, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, self, toArray, toList, toMap
-
Field Details
-
CONFIG_CHANGE_TARGET
Thetargetof aChangeType.CONFIG_CHANGErecord (D-52).- See Also:
-
-
Constructor Details
-
BatchControlGlobalConfiguration
public BatchControlGlobalConfiguration()
-
-
Method Details
-
save
public void save()S-25-06: a detached draft or candidate is never written toconfig.xml.- Specified by:
savein interfaceSaveable- Overrides:
savein classDescriptor<GlobalConfiguration>
-
get
-
getDisplayName
- Overrides:
getDisplayNamein classDescriptor<GlobalConfiguration>
-
getRequiredGlobalConfigPagePermission
e2e-03 DEF-10: this section is shown and saved forBatchControl/Manageholders (implied byOverall/Administer) rather than for administrators only.- Overrides:
getRequiredGlobalConfigPagePermissionin classDescriptor<GlobalConfiguration>
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configurein classGlobalConfiguration- Throws:
Descriptor.FormException
-
isRunControlEnabled
public boolean isRunControlEnabled() -
setRunControlEnabled
public void setRunControlEnabled(boolean enabled) Direct switch change (JCasC, script console). D-42 / security-09 S-01: this never fails the caller. The new value is applied in memory, the toggle record and side effects follow, and the configuration is then persisted; a failed write is logged at SEVERE and swallowed, so a boot-time JCasC apply cannot abort startup and a switch JCasC turns on is on. The web form path (configure(org.kohsuke.stapler.StaplerRequest2, net.sf.json.JSONObject)) stays transactional. -
isChangeControlEnabled
public boolean isChangeControlEnabled() -
setChangeControlEnabled
public void setChangeControlEnabled(boolean enabled) S-15: turning change control off is a kill switch, not just a stop on new windows. Setting the field false makessecurity.GrantAwareACLstop consulting grants immediately, and the revocation inafterSwitchesChanged(boolean, boolean)closes the windows that are already open, so they cannot come back to life when the switch is turned on again.The accepted cost, and the owner's deliberate choice: every change that is underway inside a permission window right now is cut off with no warning. A switch that instead left windows quietly conferring
Item/Configurefor up tomaxGrantMinutesafterwards was judged the worse of the two, so long as the cut is recorded — whichGrantService#revokeAllActivedoes, oneGRANT_REVOKErecord per closed window.On the form path the revocation runs only once the new value is durable; per D-42 a direct call revokes even if persisting then fails (revocation only removes permissions).
-
getApprovers
-
setApprovers
-
getApproversText
-
setApproversText
-
isAllowAdminSelfApproval
public boolean isAllowAdminSelfApproval() -
setAllowAdminSelfApproval
public void setAllowAdminSelfApproval(boolean allowAdminSelfApproval) -
getPendingTimeoutHours
public int getPendingTimeoutHours() -
setPendingTimeoutHours
public void setPendingTimeoutHours(int pendingTimeoutHours) -
getApprovedRunTimeoutMinutes
public int getApprovedRunTimeoutMinutes() -
setApprovedRunTimeoutMinutes
public void setApprovedRunTimeoutMinutes(int approvedRunTimeoutMinutes) -
getGrantDurationOptions
-
setGrantDurationOptions
-
getGrantDurationOptionsText
-
setGrantDurationOptionsText
-
getMaxGrantMinutes
public int getMaxGrantMinutes() -
setMaxGrantMinutes
public void setMaxGrantMinutes(int maxGrantMinutes) -
getIncidentResults
-
setIncidentResults
-
getIncidentResultsText
-
setIncidentResultsText
-
getRetentionMonths
public int getRetentionMonths() -
setRetentionMonths
public void setRetentionMonths(int retentionMonths) -
isEmailNotifications
public boolean isEmailNotifications() -
setEmailNotifications
@DataBoundSetter public void setEmailNotifications(boolean emailNotifications) -
getNotifyBeforeExpiryMinutes
public int getNotifyBeforeExpiryMinutes() -
setNotifyBeforeExpiryMinutes
@DataBoundSetter public void setNotifyBeforeExpiryMinutes(int notifyBeforeExpiryMinutes) -
isMailerAvailable
public boolean isMailerAvailable()Whether the Mailer plugin is installed and active; the configuration page shows theemailNotificationsoption only then (D-36). -
doCheckApproversText
Stapler form validation of the approver list (read-only, D-53). -
doCheckPendingTimeoutHours
Stapler form validation (read-only). -
doCheckApprovedRunTimeoutMinutes
Stapler form validation (read-only). -
doCheckMaxGrantMinutes
Stapler form validation (read-only). -
doCheckRetentionMonths
Stapler form validation (read-only). -
doCheckNotifyBeforeExpiryMinutes
Stapler form validation (read-only). -
doCheckGrantDurationOptionsText
@POST public FormValidation doCheckGrantDurationOptionsText(@QueryParameter String value, @QueryParameter String maxGrantMinutes) Stapler form validation (read-only); re-run when the maximum changes. -
doCheckIncidentResultsText
Stapler form validation (read-only). -
doCheckGrantDurationOptions
@POST public FormValidation doCheckGrantDurationOptions(@QueryParameter String value, @QueryParameter String maxGrantMinutes) Stapler form validation of the field named by its SPEC key (read-only). -
doCheckIncidentResults
Stapler form validation of the field named by its SPEC key (read-only).
-