Package hudson.model
Class FreeStyleProject.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<TopLevelItem>
-
- hudson.model.TopLevelItemDescriptor
-
- hudson.model.AbstractProject.AbstractProjectDescriptor
-
- hudson.model.FreeStyleProject.DescriptorImpl
-
- Enclosing class:
- FreeStyleProject
@Extension(ordinal=1000.0) @Symbol({"freeStyle","freeStyleJob"}) public static class FreeStyleProject.DescriptorImpl extends AbstractProject.AbstractProjectDescriptor
-
-
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
-
-
Constructor Summary
Constructors Constructor Description DescriptorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCategoryId()Used to categorize this kind of item type.StringgetDescription()A description of this kind of item type.StringgetDisplayName()Human readable name of this kind of configurable object.StringgetIconClassName()Get the Item's Icon class specification e.g.StringgetIconFilePathPattern()Represents a file path pattern to get the Item icon in different sizes.FreeStyleProjectnewInstance(ItemGroup parent, String name)Creates a newTopLevelItemfor the specified parent.-
Methods inherited from class hudson.model.AbstractProject.AbstractProjectDescriptor
doAutoCompleteAssignedLabelString, doAutoCompleteLabel, doAutoCompleteUpstreamProjects, doCheckAssignedLabelString, doCheckCustomWorkspace, doCheckDisplayNameOrNull, doCheckLabel, getApplicableSCMCheckoutStrategyDescriptors, isApplicable, validateLabelExpression
-
Methods inherited from class hudson.model.TopLevelItemDescriptor
all, checkApplicableIn, getIconFilePath, isApplicableIn, newInstance, newInstance, testInstance
-
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, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getDisplayName
@NonNull public String getDisplayName()
Description copied from class:TopLevelItemDescriptorHuman readable name of this kind of configurable object. Should be overridden for most descriptors, if the display name is visible somehow. As a fallback it usesClass.getSimpleName()onDescriptor.clazz, so for exampleMyThingfromsome.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 asisEnabledorisApplicable.Used as the caption when the user chooses what item type to create. The descriptor implementation also needs to have
newInstanceDetail.jellyscript, which will be used to render the text below the caption that explains the item type.- Overrides:
getDisplayNamein classTopLevelItemDescriptor
-
newInstance
public FreeStyleProject newInstance(ItemGroup parent, String name)
Description copied from class:TopLevelItemDescriptorCreates a newTopLevelItemfor the specified parent.- Specified by:
newInstancein classTopLevelItemDescriptor
-
getDescription
public String getDescription()
Description copied from class:TopLevelItemDescriptorA description of this kind of item type. This description can contain HTML code but it is recommended that you use plain text in order to be consistent with the rest of Jenkins. This method should be called from a thread where Stapler is handling an HTTP request, otherwise it will return an empty string.- Overrides:
getDescriptionin classTopLevelItemDescriptor- Returns:
- A string, by default the value from newInstanceDetail view is taken.
-
getCategoryId
public String getCategoryId()
Description copied from class:TopLevelItemDescriptorUsed to categorize this kind of item type. @seeItemCategory- Overrides:
getCategoryIdin classTopLevelItemDescriptor- Returns:
- A string with the category identifier,
ItemCategory.UncategorizedCategory.getId()by default.
-
getIconFilePathPattern
public String getIconFilePathPattern()
Description copied from class:TopLevelItemDescriptorRepresents a file path pattern to get the Item icon in different sizes. For example: plugin/plugin-shortname/images/:size/item.png, where:sizerepresents the different icon sizes used commonly in Jenkins project: 16x16, 24x24, 32x32 or 48x48- Overrides:
getIconFilePathPatternin classTopLevelItemDescriptor- Returns:
- A string or null if it is not defined.
- See Also:
getIconFilePathPattern()
-
getIconClassName
public String getIconClassName()
Description copied from class:TopLevelItemDescriptorGet the Item's Icon class specification e.g. 'icon-notepad'.Note: do NOT include icon size specifications (such as 'icon-sm').
- Specified by:
getIconClassNamein interfaceIconSpec- Overrides:
getIconClassNamein classTopLevelItemDescriptor- Returns:
- The Icon class specification e.g. 'icon-notepad'.
-
-