public abstract class TopLevelItemDescriptor extends Descriptor<TopLevelItem>
Descriptor for TopLevelItems.Descriptor.FormException, Descriptor.PropertyType, Descriptor.Selfclazz| Modifier | Constructor and Description |
|---|---|
protected |
TopLevelItemDescriptor()
Infers the type of the corresponding
TopLevelItem from the outer class. |
protected |
TopLevelItemDescriptor(Class<? extends TopLevelItem> clazz) |
| Modifier and Type | Method and Description |
|---|---|
static ExtensionList<TopLevelItemDescriptor> |
all()
Returns all the registered
TopLevelItem descriptors. |
void |
checkApplicableIn(ItemGroup parent)
Checks if this top level item is applicable within the specified item group.
|
String |
getDisplayName()
Human readable name of this kind of configurable object.
|
boolean |
isApplicable(Descriptor descriptor)
TopLevelItemDescriptors often uses other descriptors to decorate itself. |
boolean |
isApplicableIn(ItemGroup parent)
TopLevelItemDescriptors often may want to limit the scope within which they can be created. |
abstract TopLevelItem |
newInstance(ItemGroup parent,
String name)
Creates a new
TopLevelItem for the specified parent. |
TopLevelItem |
newInstance(org.kohsuke.stapler.StaplerRequest req)
Deprecated.
since 2007-01-19.
This is not a valid operation for
Items. |
TopLevelItem |
newInstance(String name)
Deprecated.
as of 1.390
Use
newInstance(ItemGroup, String) |
boolean |
testInstance(TopLevelItem i)
Tests if the given instance belongs to this descriptor, in the sense
that this descriptor can produce items like the given one.
|
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMapprotected TopLevelItemDescriptor(Class<? extends TopLevelItem> clazz)
protected TopLevelItemDescriptor()
TopLevelItem from the outer class.
This version works when you follow the common convention, where a descriptor
is written as the static nested class of the describable class.public boolean isApplicable(Descriptor descriptor)
TopLevelItemDescriptors often uses other descriptors to decorate itself.
This method allows the subtype of TopLevelItemDescriptors to filter them out.
This is useful for a workflow/company specific item type that wants to eliminate options that the user would see.
public boolean isApplicableIn(ItemGroup parent)
TopLevelItemDescriptors often may want to limit the scope within which they can be created.
This method allows the subtype of TopLevelItemDescriptors to filter them out.public final void checkApplicableIn(ItemGroup parent)
This is just a convenience function.
public boolean testInstance(TopLevelItem i)
TopLevelItemDescriptors that act like a wizard and produces different
object types than Descriptor.clazz can override this method to augment
instance-descriptor relationship.
public String getDisplayName()
Class.getSimpleName() on Descriptor.clazz, so for example MyThing from some.pkg.MyThing.DescriptorImpl.
Historically some implementations returned null as a way of hiding the descriptor from the UI,
but this is generally managed by an explicit method such as isEnabled or isApplicable.
Used as the caption when the user chooses what item type to create. The descriptor implementation also needs to have newInstanceDetail.jelly script, which will be used to render the text below the caption that explains the item type.
getDisplayName in class Descriptor<TopLevelItem>@Deprecated public TopLevelItem newInstance(org.kohsuke.stapler.StaplerRequest req) throws Descriptor.FormException
Items.newInstance in class Descriptor<TopLevelItem>Descriptor.FormException@Deprecated public TopLevelItem newInstance(String name)
newInstance(ItemGroup, String)TopLevelItem.public abstract TopLevelItem newInstance(ItemGroup parent, String name)
TopLevelItem for the specified parent.public static ExtensionList<TopLevelItemDescriptor> all()
TopLevelItem descriptors.Copyright © 2019. All rights reserved.