Class AbstractFolderPropertyDescriptor
java.lang.Object
hudson.model.Descriptor<AbstractFolderProperty<?>>
com.cloudbees.hudson.plugins.folder.AbstractFolderPropertyDescriptor
- Direct Known Subclasses:
FolderCredentialsProvider.FolderCredentialsProperty.DescriptorImpl
,FolderPropertyDescriptor
public abstract class AbstractFolderPropertyDescriptor
extends Descriptor<AbstractFolderProperty<?>>
Category of
AbstractFolderProperty
.- Since:
- 4.11-beta-1
-
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<AbstractFolderPropertyDescriptor>
getApplicableDescriptors
(Class<? extends AbstractFolder> containerType) Gets theFolderPropertyDescriptor
s applicable for a given folder type.boolean
isApplicable
(Class<? extends AbstractFolder> containerType) Returns true if thisAbstractFolderProperty
type is applicable to the given folder type.newInstance
(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, 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, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
AbstractFolderPropertyDescriptor
public AbstractFolderPropertyDescriptor()
-
-
Method Details
-
newInstance
public AbstractFolderProperty<?> newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException - Overrides:
newInstance
in classDescriptor<AbstractFolderProperty<?>>
- Returns:
- null to avoid setting an instance of
AbstractFolderProperty
to the target folder. - Throws:
Descriptor.FormException
-
isApplicable
Returns true if thisAbstractFolderProperty
type is applicable to the given folder type.The default implementation of this method checks if the given folder type is assignable to the type parameter of
AbstractFolderProperty
, but subtypes can extend this to change this behavior.- Parameters:
containerType
- the type of folder.- Returns:
- true to indicate applicable, in which case the property will be displayed in the configuration screen of this folder.
-
getApplicableDescriptors
public static List<AbstractFolderPropertyDescriptor> getApplicableDescriptors(Class<? extends AbstractFolder> containerType) Gets theFolderPropertyDescriptor
s applicable for a given folder type.- Parameters:
containerType
- the type of folder.- Returns:
- the applicable descriptors.
-