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>
Descriptor
forView
.- 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 protected
ViewDescriptor()
protected
ViewDescriptor(Class<? extends View> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FormValidation
checkDisplayName(View view, String value)
Validation of the display name field.AutoCompletionCandidates
doAutoCompleteCopyNewItemFrom(String value, ItemGroup<?> container)
Auto-completion for the "copy from" field in the new job page.List<Descriptor<ListViewColumn>>
getColumnsDescriptors()
PossibleListViewColumnDescriptor
s that can be used with this view.String
getDisplayName()
Returns the human-readable name of this type of view.List<Descriptor<ViewJobFilter>>
getJobFiltersDescriptors()
PossibleViewJobFilter
types that can be used with this view.String
getNewViewDetailPage()
Jelly fragment included in the "new view" page.boolean
isApplicable(Class<? extends ViewGroup> ownerType)
boolean
isApplicableIn(ViewGroup owner)
boolean
isInstantiable()
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, 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:
getDisplayName
in 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()
PossibleListViewColumnDescriptor
s that can be used with this view.
-
getJobFiltersDescriptors
public List<Descriptor<ViewJobFilter>> getJobFiltersDescriptors()
PossibleViewJobFilter
types 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 thisView
type is applicable to the givenViewGroup
type.Default implementation returns
true
always.- 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 thisView
type 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
-
-