Class DeclarativeStageConditionalDescriptor<S extends DeclarativeStageConditional<S>>
java.lang.Object
hudson.model.Descriptor<T>
org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptDescriptor<S>
org.jenkinsci.plugins.pipeline.modeldefinition.when.DeclarativeStageConditionalDescriptor<S>
- Direct Known Subclasses:
GlobalStageConditionalDescriptor
public abstract class DeclarativeStageConditionalDescriptor<S extends DeclarativeStageConditional<S>>
extends WithScriptDescriptor<S>
Base descriptor for
DeclarativeStageConditional.-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptDescriptor
WithScriptDescriptor.WithScriptAllowlistNested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionall()Get allDeclarativeStageConditionalDescriptors.allNames()Get the descriptor for a given name or null if not found.intHow many nested conditions are allowed.Get a map of name-to-DescribableModelof all known/registered descriptors.booleanWhether this conditional can be rendered in the Directive Generator.booleanWhether this conditional is an invisible global conditional.abstract org.codehaus.groovy.ast.expr.ExpressiontransformToRuntimeAST(org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTWhenContent original) Methods inherited from class org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptDescriptor
getName, getScriptClass, newInstance, newInstanceMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
DeclarativeStageConditionalDescriptor
public DeclarativeStageConditionalDescriptor()
-
-
Method Details
-
getAllowedChildrenCount
public int getAllowedChildrenCount()How many nested conditions are allowed. -1 for unlimited, 0 for none, anything greater than 0 for requiring exactly that many nested conditions. -
inDirectiveGenerator
public boolean inDirectiveGenerator()Whether this conditional can be rendered in the Directive Generator. Defaults to whether there's a config page - which we determine by checking to see ifDescriptor.getConfigPage()returns something other than its default "config.jelly". It will if there's an actual config.jelly or config.groovy either for this class or an ancestor. -
isInvisible
public boolean isInvisible()Whether this conditional is an invisible global conditional. Defaults to false. -
transformToRuntimeAST
public abstract org.codehaus.groovy.ast.expr.Expression transformToRuntimeAST(@CheckForNull org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTWhenContent original) -
all
Get allDeclarativeStageConditionalDescriptors.- Returns:
- a list of all
DeclarativeStageConditionalDescriptors registered, except for invisible global conditionals.
-
forGenerator
-
allInvisible
-
allNames
-
getDescribableModels
public static Map<String,org.jenkinsci.plugins.structs.describable.DescribableModel> getDescribableModels()Get a map of name-to-DescribableModelof all known/registered descriptors.- Returns:
- A map of name-to-
DescribableModels
-
byName
Get the descriptor for a given name or null if not found.- Parameters:
name- The name for the descriptor to look up- Returns:
- The corresponding descriptor or null if not found.
-