Package io.jenkins.plugins.casc.core
Class MavenConfigurator
- java.lang.Object
-
- io.jenkins.plugins.casc.BaseConfigurator<GlobalMavenConfig>
-
- io.jenkins.plugins.casc.core.MavenConfigurator
-
- All Implemented Interfaces:
Configurator<GlobalMavenConfig>
@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class MavenConfigurator extends BaseConfigurator<GlobalMavenConfig>
A mix-in configurator to support bothMaven.DescriptorImpl
andGlobalMavenConfig
which both are areDescriptor
s for the "tools" category using a conflictingSymbol
.We can't blame them for this, as the former is a
BuildStepDescriptor
while the later is aGlobalConfiguration
, so from their point of view the symbol is unique for implemented extension point. Just we don't distinguish derived classes fromDescriptor
as distinct APIs.- Author:
- Nicolas De Loof
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.jenkins.plugins.casc.BaseConfigurator
BaseConfigurator.TypePair
-
-
Constructor Summary
Constructors Constructor Description MavenConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Attribute<GlobalMavenConfig,?>>
describe()
Determine the list of Attribute available for configuration of the managed component.CNode
describe(GlobalMavenConfig instance, ConfigurationContext context)
Describe a component as a Configuration NodesCNode
to be exported as yaml.Class<GlobalMavenConfig>
getTarget()
Target type this configurator can handle.protected GlobalMavenConfig
instance(Mapping mapping, ConfigurationContext context)
Build or identify the target component this configurator has to handle based on the provided configuration node.-
Methods inherited from class io.jenkins.plugins.casc.BaseConfigurator
check, compare, configure, configure, createAttribute, equals, exclusions, handleUnknown, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.jenkins.plugins.casc.Configurator
canConfigure, describeStructure, getAttributes, getConfigurators, getDisplayName, getImplementedAPI, getName, getNames
-
-
-
-
Method Detail
-
getTarget
public Class<GlobalMavenConfig> getTarget()
Description copied from interface:Configurator
Target type this configurator can handle.
-
instance
protected GlobalMavenConfig instance(Mapping mapping, ConfigurationContext context)
Description copied from class:BaseConfigurator
Build or identify the target component this configurator has to handle based on the provided configuration node.- Specified by:
instance
in classBaseConfigurator<GlobalMavenConfig>
- Parameters:
mapping
- configuration for target component. Implementation may consume some entries to create a fresh new instance.- Returns:
- instance to be configured, but not yet fully configured, see
BaseConfigurator.configure(Mapping, Object, boolean, ConfigurationContext)
-
describe
@NonNull public Set<Attribute<GlobalMavenConfig,?>> describe()
Description copied from interface:Configurator
Determine the list of Attribute available for configuration of the managed component.- Specified by:
describe
in interfaceConfigurator<GlobalMavenConfig>
- Overrides:
describe
in classBaseConfigurator<GlobalMavenConfig>
- Returns:
- A set of
Attribute
s that describes this object
-
describe
@CheckForNull public CNode describe(GlobalMavenConfig instance, ConfigurationContext context) throws Exception
Description copied from interface:Configurator
Describe a component as a Configuration NodesCNode
to be exported as yaml. Only export attributes which are not set to default value.- Throws:
Exception
-
-