Class SupportAutomatedBundleConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
com.cloudbees.jenkins.support.config.SupportAutomatedBundleConfiguration
- All Implemented Interfaces:
ExtensionPoint,Describable<GlobalConfiguration>,Saveable,Loadable,OnMaster
@Extension
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Symbol("automatedBundleConfiguration")
public class SupportAutomatedBundleConfiguration
extends GlobalConfiguration
Global Configuration for the Automated Support Bundle Generation, see
SupportPlugin.PeriodicWorkImpl.- Author:
- Allan Burdajewicz
-
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
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) doCheckPeriod(String value) get()Gets the singleton instance.Get the list of applicable (and therefore selectable)Componentfor the automated bundle generation.Get the list ofComponentcurrently configured for automated bundle generation.Get the default list of Component Ids for the automated bundle generation.intbooleanisComponentSelected(Component component) booleanbooleanReturn if theenabledis enforced to false by the System PropertySupportPlugin.AUTO_BUNDLE_PERIOD_HOURS.booleanReturn if theperiodis enforced by the System PropertySupportPlugin.AUTO_BUNDLE_PERIOD_HOURS.parseRequest(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) Parse the stapler JSON output and retrieve configured components.voidsetComponentIds(List<String> componentIds) voidsetEnabled(boolean enabled) voidMethods 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, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, 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
-
Constructor Details
-
SupportAutomatedBundleConfiguration
public SupportAutomatedBundleConfiguration()
-
-
Method Details
-
get
Gets the singleton instance.- Returns:
- Singleton instance
-
getComponentIds
-
getDefaultComponentIds
Get the default list of Component Ids for the automated bundle generation.- Returns:
- a list of
String
-
isEnabled
public boolean isEnabled() -
getPeriod
public int getPeriod() -
isEnforcedPeriod
public boolean isEnforcedPeriod()Return if theperiodis enforced by the System PropertySupportPlugin.AUTO_BUNDLE_PERIOD_HOURS.- Returns:
- true if enforced by system property, false otherwise
-
setComponentIds
-
setEnabled
@DataBoundSetter public void setEnabled(boolean enabled) -
isEnforcedDisabled
public boolean isEnforcedDisabled()Return if theenabledis enforced to false by the System PropertySupportPlugin.AUTO_BUNDLE_PERIOD_HOURS. That is if the system property value is 0.- Returns:
- true if enforced by system property, false otherwise
-
setPeriod
-
getDisplayName
- Overrides:
getDisplayNamein classDescriptor<GlobalConfiguration>
-
getComponents
Get the list ofComponentcurrently configured for automated bundle generation.- Returns:
- The list of
Componentcurrently configured
-
isComponentSelected
-
getApplicableComponents
Get the list of applicable (and therefore selectable)Componentfor the automated bundle generation.- Returns:
- a list of
Component
-
configure
@POST public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configurein classGlobalConfiguration- Throws:
Descriptor.FormException
-
parseRequest
protected final List<String> parseRequest(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) Parse the stapler JSON output and retrieve configured components.- Parameters:
req- the request- Returns:
- the
DescribableListof components
-
getCategory
- Overrides:
getCategoryin classDescriptor<GlobalConfiguration>
-
doCheckPeriod
-