Package hudson.model

Class ViewDescriptor

    • Constructor Detail

      • ViewDescriptor

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

        protected ViewDescriptor()
    • 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 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.
      • 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