Package hudson.model
Class ViewDescriptor
- java.lang.Object
-
- hudson.model.Descriptor<View>
-
- hudson.model.ViewDescriptor
-
- Direct Known Subclasses:
AllView.DescriptorImpl,ListView.DescriptorImpl,MyView.DescriptorImpl,ProxyView.DescriptorImpl
public abstract class ViewDescriptor extends Descriptor<View>
DescriptorforView.- Since:
- 1.269
- Author:
- Kohsuke Kawaguchi
-
-
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 Modifier Constructor Description protectedViewDescriptor()protectedViewDescriptor(Class<? extends View> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FormValidationcheckDisplayName(View view, String value)Validation of the display name field.AutoCompletionCandidatesdoAutoCompleteCopyNewItemFrom(String value, ItemGroup<?> container)Auto-completion for the "copy from" field in the new job page.List<Descriptor<ListViewColumn>>getColumnsDescriptors()PossibleListViewColumnDescriptors that can be used with this view.StringgetDisplayName()Returns the human-readable name of this type of view.List<Descriptor<ViewJobFilter>>getJobFiltersDescriptors()PossibleViewJobFiltertypes that can be used with this view.StringgetNewViewDetailPage()Jelly fragment included in the "new view" page.booleanisApplicable(Class<? extends ViewGroup> ownerType)booleanisApplicableIn(ViewGroup owner)booleanisInstantiable()Some special views are not instantiable, and for those this method returns false.-
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, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getDisplayName
@NonNull public String getDisplayName()
Returns the human-readable name of this type of view. Used in the view creation screen. The string should look like "Abc Def Ghi".- Overrides:
getDisplayNamein classDescriptor<View>
-
isInstantiable
public boolean isInstantiable()
Some special views are not instantiable, and for those this method returns false.
-
getNewViewDetailPage
public final String getNewViewDetailPage()
Jelly fragment included in the "new view" page.
-
doAutoCompleteCopyNewItemFrom
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public AutoCompletionCandidates doAutoCompleteCopyNewItemFrom(@QueryParameter String value, @AncestorInPath ItemGroup<?> container)
Auto-completion for the "copy from" field in the new job page.
-
getColumnsDescriptors
public List<Descriptor<ListViewColumn>> getColumnsDescriptors()
PossibleListViewColumnDescriptors that can be used with this view.
-
getJobFiltersDescriptors
public List<Descriptor<ViewJobFilter>> getJobFiltersDescriptors()
PossibleViewJobFiltertypes that can be used with this view.
-
checkDisplayName
protected FormValidation checkDisplayName(@NonNull View view, @CheckForNull String value)
Validation of the display name field.- Parameters:
view- the view to check the new display name of.value- the proposed new display name.- Returns:
- the validation result.
- Since:
- 2.37
-
isApplicable
public boolean isApplicable(Class<? extends ViewGroup> ownerType)
Returns true if thisViewtype is applicable to the givenViewGrouptype.Default implementation returns
truealways.- Returns:
- true to indicate applicable, in which case the view will be instantiable within the type of owner.
- Since:
- 2.37
-
isApplicableIn
public boolean isApplicableIn(ViewGroup owner)
Returns true if thisViewtype is applicable in the specificViewGroup.Default implementation returns
isApplicable(Class)for theViewGroup’sObject.getClass().- Returns:
- true to indicate applicable, in which case the view will be instantiable within the given owner.
- Since:
- 2.37
-
-