diff --git a/core/src/main/java/hudson/Plugin.java b/core/src/main/java/hudson/Plugin.java index 20f671e8dc..0c08ecb35b 100644 --- a/core/src/main/java/hudson/Plugin.java +++ b/core/src/main/java/hudson/Plugin.java @@ -48,7 +48,7 @@ import com.thoughtworks.xstream.XStream; * Base class of Hudson plugin. * *

- * A plugin needs to derive from this class. + * A plugin may derive from this class. * *

* One instance of a plugin is created by Hudson, and used as the entry point diff --git a/core/src/main/java/hudson/model/labels/LabelAtomProperty.java b/core/src/main/java/hudson/model/labels/LabelAtomProperty.java index e0dfd53259..41a1d7189b 100644 --- a/core/src/main/java/hudson/model/labels/LabelAtomProperty.java +++ b/core/src/main/java/hudson/model/labels/LabelAtomProperty.java @@ -40,6 +40,17 @@ import java.util.Collections; * Plugins can contribute this extension point to add additional data or UI actions to {@link LabelAtom}. * {@link LabelAtomProperty}s show up in the configuration screen of a label, and they are persisted * with the {@link LabelAtom} object. + * + *

Implementation hints

+ * * * @author Kohsuke Kawaguchi * @since 1.373 diff --git a/core/src/main/java/jenkins/model/GlobalConfiguration.java b/core/src/main/java/jenkins/model/GlobalConfiguration.java index b6e873f952..92eabc4ea7 100644 --- a/core/src/main/java/jenkins/model/GlobalConfiguration.java +++ b/core/src/main/java/jenkins/model/GlobalConfiguration.java @@ -6,17 +6,28 @@ import hudson.model.Describable; import hudson.model.Descriptor; /** - * Convenient base class for extensions that contributes to the system configuration page but nothing else. + * Convenient base class for extensions that contributes to the system configuration page but nothing + * else, or to manage the global configuration of a plugin implementing several extension points. * *

- * All {@link Descriptor}s are capable of contributing fragment to the system config page, so - * this extension point is is really only for those who don't want to contribute anything else. - * If you are implementing other extension points and that would like to expose some global configuration, - * you can do so with global.groovy from your {@link Descriptor} instance. + * All {@link 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 {@link 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: + *

* *

Views

*

- * Subtypes of this class should define config.groovy that gets pulled into the system configuration page. + * Subtypes of this class should define a config.groovy file or config.jelly file + * that gets pulled into the system configuration page. * * * @author Kohsuke Kawaguchi