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
,OnMaster
@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Symbol("automatedBundleConfiguration") public class SupportAutomatedBundleConfiguration extends GlobalConfiguration
Global Configuration for the Automated Support Bundle Generation, seeSupportPlugin.PeriodicWorkImpl
.- Author:
- Allan Burdajewicz
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description SupportAutomatedBundleConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
FormValidation
doCheckPeriod(String value)
static SupportAutomatedBundleConfiguration
get()
Gets the singleton instance.static List<Component>
getApplicableComponents()
Get the list of applicable (and therefore selectable)Component
for the automated bundle generation.GlobalConfigurationCategory
getCategory()
List<String>
getComponentIds()
List<Component>
getComponents()
Get the list ofComponent
currently configured for automated bundle generation.static List<String>
getDefaultComponentIds()
Get the default list of Component Ids for the automated bundle generation.String
getDisplayName()
int
getPeriod()
boolean
isComponentSelected(Component component)
boolean
isEnabled()
boolean
isEnforcedDisabled()
Return if theenabled
is enforced to false by the System PropertySupportPlugin.AUTO_BUNDLE_PERIOD_HOURS
.boolean
isEnforcedPeriod()
Return if theperiod
is enforced by the System PropertySupportPlugin.AUTO_BUNDLE_PERIOD_HOURS
.protected List<String>
parseRequest(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
Parse the stapler JSON output and retrieve configured components.void
setComponentIds(List<String> componentIds)
void
setEnabled(boolean enabled)
void
setPeriod(Integer period)
-
Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, 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, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
get
@NonNull public static SupportAutomatedBundleConfiguration get()
Gets the singleton instance.- Returns:
- Singleton instance
-
getDefaultComponentIds
public static List<String> 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 theperiod
is enforced by the System PropertySupportPlugin.AUTO_BUNDLE_PERIOD_HOURS
.- Returns:
- true if enforced by system property, false otherwise
-
setEnabled
@DataBoundSetter public void setEnabled(boolean enabled)
-
isEnforcedDisabled
public boolean isEnforcedDisabled()
Return if theenabled
is 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
@DataBoundSetter public void setPeriod(Integer period)
-
getDisplayName
@NonNull public String getDisplayName()
- Overrides:
getDisplayName
in classDescriptor<GlobalConfiguration>
-
getComponents
public List<Component> getComponents()
Get the list ofComponent
currently configured for automated bundle generation.- Returns:
- The list of
Component
currently configured
-
isComponentSelected
public boolean isComponentSelected(Component component)
-
getApplicableComponents
public static List<Component> getApplicableComponents()
Get the list of applicable (and therefore selectable)Component
for the automated bundle generation.- Returns:
- a list of
Component
-
configure
@POST public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
- Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
parseRequest
protected final List<String> parseRequest(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
Parse the stapler JSON output and retrieve configured components.- Parameters:
req
- the request- Returns:
- the
DescribableList
of components
-
getCategory
@NonNull public GlobalConfigurationCategory getCategory()
- Overrides:
getCategory
in classDescriptor<GlobalConfiguration>
-
doCheckPeriod
public FormValidation doCheckPeriod(@QueryParameter String value)
-
-