Class ConfigContextResolver
- All Implemented Interfaces:
ExtensionPoint
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<ConfigContextResolver>
all()
abstract ItemGroup
getConfigContext
(ItemGroup itemGroup) Optionally provides theItemGroup
from which configuration files should be retrieved for the provided one.
-
Constructor Details
-
ConfigContextResolver
public ConfigContextResolver()
-
-
Method Details
-
all
-
getConfigContext
Optionally provides theItemGroup
from which configuration files should be retrieved for the provided one.Examples of expected usage:
In promoted-builds-plugin, the itemGroup used as context for a promotion run is a
hudson.plugins.promoted_builds.JobPropertyImpl
which is not supported by the configuration file retrieval logic inConfigFiles.getByIdOrNull(ItemGroup, String)
.However, as the
hudson.plugins.promoted_builds.JobPropertyImpl
has an owner property containing the promoted build, it is possible for the promoted-builds-plugin to implement this extension by returning the owner's parent when the itemGroup provided to thegetConfigContext(ItemGroup)
method is an instance ofhudson.plugins.promoted_builds.JobPropertyImpl
, and null if it is of any other type.This will allow for the configuration file retrieval code to revert to the standard logic from the owner's parent starting point.
-