|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.Descriptor<TopLevelItem>
hudson.model.TopLevelItemDescriptor
public abstract class TopLevelItemDescriptor
Descriptor for TopLevelItems.
| Nested Class Summary |
|---|
| 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 |
| Fields inherited from interface hudson.model.Saveable |
|---|
NOOP |
| Constructor Summary | |
|---|---|
protected |
TopLevelItemDescriptor()
Infers the type of the corresponding TopLevelItem from the outer class. |
protected |
TopLevelItemDescriptor(Class<? extends TopLevelItem> clazz)
|
| Method Summary | |
|---|---|
static ExtensionList<TopLevelItemDescriptor> |
all()
Returns all the registered TopLevelItem descriptors. |
abstract String |
getDisplayName()
Human readable name of this kind of configurable object. |
boolean |
isApplicable(Descriptor descriptor)
TopLevelItemDescriptors often uses other descriptors to decorate itself. |
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 Jobs. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected 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.
| Method Detail |
|---|
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 job type that wants to eliminate options that the user would see.
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 abstract String getDisplayName()
Used as the caption when the user chooses what job type to create. The descriptor implementation also needs to have newJobDetail.jelly script, which will be used to render the text below the caption that explains the job type.
getDisplayName in class Descriptor<TopLevelItem>
@Deprecated
public TopLevelItem newInstance(org.kohsuke.stapler.StaplerRequest req)
throws Descriptor.FormException
Jobs.
newInstance in class Descriptor<TopLevelItem>Descriptor.FormExceptionpublic 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||