public abstract class GlobalConfiguration extends Descriptor<GlobalConfiguration> implements ExtensionPoint, Describable<GlobalConfiguration>
All Descriptor
s are capable of contributing fragment to the system config page. If you are
implementing other extension points that need to expose some global configuration, you can do so
with global.groovy or global.jelly from your Descriptor
instance. However
each global.* file will appear as its own section in the global configuration page.
An option to present a single section for your plugin in the Jenkins global configuration page is to use this class to manage the configuration for your plugin and its extension points. To access properties defined in your GlobalConfiguration subclass, here are two possibilities:
Inject
into your other Extension
s (so this does not work
for classes not annotated with Extension
)GlobalConfiguration.all().get(<your GlobalConfiguration subclass>.class)
Subtypes of this class should define a config.groovy file or config.jelly file that gets pulled into the system configuration page.
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
ExtensionPoint.LegacyInstancesAreScopedToHudson
clazz
Modifier | Constructor and Description |
---|---|
protected |
GlobalConfiguration() |
Modifier and Type | Method and Description |
---|---|
static ExtensionList<GlobalConfiguration> |
all()
Returns all the registered
GlobalConfiguration descriptors. |
GlobalConfigurationCategory |
getCategory()
Every
GlobalConfiguration belongs to a specific category. |
Descriptor<GlobalConfiguration> |
getDescriptor()
Gets the descriptor for this instance.
|
String |
getGlobalConfigPage() |
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
public final Descriptor<GlobalConfiguration> getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass() == b.getClass()
then by default
a.getDescriptor() == b.getDescriptor()
as well.
(In rare cases a single implementation class may be used for instances with distinct descriptors.)
getDescriptor
in interface Describable<GlobalConfiguration>
public GlobalConfigurationCategory getCategory()
GlobalConfiguration
belongs to a specific category.GlobalConfiguration
.public String getGlobalConfigPage()
getGlobalConfigPage
in class Descriptor<GlobalConfiguration>
public static ExtensionList<GlobalConfiguration> all()
GlobalConfiguration
descriptors.Copyright © 2018. All rights reserved.