Package hudson.model

Class ViewDescriptor

java.lang.Object
hudson.model.Descriptor<View>
hudson.model.ViewDescriptor
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Direct Known Subclasses:
AllView.DescriptorImpl, ListView.DescriptorImpl, MyView.DescriptorImpl, ProxyView.DescriptorImpl

public abstract class ViewDescriptor extends Descriptor<View>
Since:
1.269
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • ViewDescriptor

      protected ViewDescriptor(Class<? extends View> clazz)
    • ViewDescriptor

      protected ViewDescriptor()
  • Method Details

    • 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 class Descriptor<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()
      Possible ListViewColumnDescriptors that can be used with this view.
    • getJobFiltersDescriptors

      public List<Descriptor<ViewJobFilter>> getJobFiltersDescriptors()
      Possible ViewJobFilter 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 this View type is applicable to the given ViewGroup 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 this View type is applicable in the specific ViewGroup.

      Default implementation returns isApplicable(Class) for the ViewGroup’s Object.getClass().

      Returns:
      true to indicate applicable, in which case the view will be instantiable within the given owner.
      Since:
      2.37