Class DeclarativeStageConditionalDescriptor<S extends DeclarativeStageConditional<S>>

    • Constructor Detail

      • DeclarativeStageConditionalDescriptor

        public DeclarativeStageConditionalDescriptor()
    • Method Detail

      • 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 if Descriptor.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)
      • allNames

        public static List<String> allNames()
      • getDescribableModels

        public static Map<String,​org.jenkinsci.plugins.structs.describable.DescribableModel> getDescribableModels()
        Get a map of name-to-DescribableModel of all known/registered descriptors.
        Returns:
        A map of name-to-DescribableModels
      • byName

        @Nullable
        public static DeclarativeStageConditionalDescriptor byName​(@NonNull
                                                                   String name)
        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.