Class ConfigContextResolver
- java.lang.Object
-
- org.jenkinsci.plugins.configfiles.ConfigContextResolver
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class ConfigContextResolver extends Object implements ExtensionPoint
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ConfigContextResolver()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExtensionList<ConfigContextResolver>
all()
abstract ItemGroup
getConfigContext(ItemGroup itemGroup)
Optionally provides theItemGroup
from which configuration files should be retrieved for the provided one.
-
-
-
Method Detail
-
all
public static ExtensionList<ConfigContextResolver> all()
-
getConfigContext
public abstract ItemGroup getConfigContext(ItemGroup itemGroup)
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.
-
-