Package io.jenkins.plugins.casc.core
Class ItemsRootConfigurator
java.lang.Object
io.jenkins.plugins.casc.core.ItemsRootConfigurator
- All Implemented Interfaces:
Configurator<Jenkins>,RootElementConfigurator<Jenkins>
@Extension
public class ItemsRootConfigurator
extends Object
implements RootElementConfigurator<Jenkins>
-
Field Summary
Fields inherited from interface io.jenkins.plugins.casc.RootElementConfigurator
LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheck(CNode config, ConfigurationContext context) Run the same logic asConfigurator.configure(CNode, ConfigurationContext)in dry-run mode.configure(CNode config, ConfigurationContext context) Configures/creates a Jenkins object based on a tree.describe()Determine the list of Attribute available for configuration of the managed component.describe(Jenkins instance, ConfigurationContext context) Describe a component as a Configuration NodesCNodeto be exported as yaml.getName()Get a configurator name.Target type this configurator can handle.getTargetComponent(ConfigurationContext context) Retrieve the target component managed by this RootElementConfiguratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jenkins.plugins.casc.Configurator
canConfigure, describeStructure, getAttributes, getConfigurators, getDisplayName, getImplementedAPI, getNamesMethods inherited from interface io.jenkins.plugins.casc.RootElementConfigurator
isRootElement
-
Constructor Details
-
ItemsRootConfigurator
public ItemsRootConfigurator()
-
-
Method Details
-
getName
Description copied from interface:ConfiguratorGet a configurator name. This should return the default name for the configurator, used for exporting yaml seeConfigurator.getNames()for all possible names which will be considered when configuring.- Specified by:
getNamein interfaceConfigurator<Jenkins>- Returns:
- short name for this component when used in a configuration.yaml file
-
getTarget
Description copied from interface:ConfiguratorTarget type this configurator can handle.- Specified by:
getTargetin interfaceConfigurator<Jenkins>
-
getTargetComponent
Description copied from interface:RootElementConfiguratorRetrieve the target component managed by this RootElementConfigurator- Specified by:
getTargetComponentin interfaceRootElementConfigurator<Jenkins>- Parameters:
context-- Returns:
-
configure
@NonNull public Jenkins configure(CNode config, ConfigurationContext context) throws ConfiguratorException Description copied from interface:ConfiguratorConfigures/creates a Jenkins object based on a tree.- Specified by:
configurein interfaceConfigurator<Jenkins>- Parameters:
config- Map/List/primitive objects (think YAML) that represents the configuration from which a Jenkins object is configured.context- Fully configured Jenkins object used as the starting point for this configuration.- Returns:
- Fully configured Jenkins object that results from this configuration. if no new objects got created, but some existing objects may have been modified, return updated target object.
- Throws:
ConfiguratorException- if something went wrong, depends on the concrete implementation
-
check
Description copied from interface:ConfiguratorRun the same logic asConfigurator.configure(CNode, ConfigurationContext)in dry-run mode. Used to verify configuration is fine before being actually applied to a live jenkins controller.- Specified by:
checkin interfaceConfigurator<Jenkins>- Parameters:
config- Map/List/primitive objects (think YAML) that represents the configuration from which a Jenkins object is configured.context- Fully configured Jenkins object used as the starting point for this configuration.- Throws:
ConfiguratorException- on configuration error
-
describe
Description copied from interface:ConfiguratorDescribe a component as a Configuration NodesCNodeto be exported as yaml. Only export attributes which are not set to default value.- Specified by:
describein interfaceConfigurator<Jenkins>
-
describe
Description copied from interface:ConfiguratorDetermine the list of Attribute available for configuration of the managed component.- Specified by:
describein interfaceConfigurator<Jenkins>- Returns:
- A set of
Attributes that describes this object
-