Class WithScriptDescriptor<T extends WithScriptDescribable<T>>
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptDescriptor<T>
-
- Direct Known Subclasses:
DeclarativeAgentDescriptor
,DeclarativeStageConditionalDescriptor
public abstract class WithScriptDescriptor<T extends WithScriptDescribable<T>> extends Descriptor<T>
Descriptor forWithScriptDescribable
.- Author:
- Andrew Bayer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WithScriptDescriptor.WithScriptAllowlist
-
Nested 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 Modifier Constructor Description protected
WithScriptDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
The name for this type.String
getScriptClass()
The full package and class name for theWithScriptScript
class corresponding to this.T
newInstance()
Creates an instance of the correspondingWithScriptDescribable
with no arguments.T
newInstance(Map<String,Object> arguments)
Creates an instance of the correspondingWithScriptDescribable
from the given arguments.-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, 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, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getName
@NonNull public String getName()
The name for this type. Defaults to the first string in theSymbol
on the class.- Returns:
- The name.
-
getScriptClass
@NonNull public String getScriptClass()
The full package and class name for theWithScriptScript
class corresponding to this. Defaults to theWithScriptDescribable
class name with "Script" appended to the end.- Returns:
- The class name, defaulting to the
WithScriptDescribable
Descriptor.clazz
class name with "Script" appended.
-
newInstance
public T newInstance(Map<String,Object> arguments) throws Exception
Creates an instance of the correspondingWithScriptDescribable
from the given arguments.- Parameters:
arguments
- A map of strings/objects to be passed to the constructor.- Returns:
- An instantiated
WithScriptDescribable
- Throws:
Exception
- if there are issues instantiating
-
newInstance
public T newInstance() throws Exception
Creates an instance of the correspondingWithScriptDescribable
with no arguments.- Returns:
- An instantiated
WithScriptDescribable
- Throws:
Exception
- if there are issues instantiating
-
-