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 ofAbstractFolderProperty
.- 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
Constructors Constructor Description AbstractFolderPropertyDescriptor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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.AbstractFolderProperty<?>
newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
-
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, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
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
public boolean isApplicable(Class<? extends AbstractFolder> containerType)
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.
-
-