Class SCMNavigatorDescriptor

    • Constructor Detail

      • SCMNavigatorDescriptor

        protected SCMNavigatorDescriptor()
      • SCMNavigatorDescriptor

        protected SCMNavigatorDescriptor​(Class<? extends SCMNavigator> clazz)
    • Method Detail

      • getTraitsDefaults

        @NonNull
        public List<SCMTrait<? extends SCMTrait<?>>> getTraitsDefaults()
        Returns the default traits for this SCMSource.
        Returns:
        An empty list if not overridden.
      • getDescription

        @NonNull
        public String getDescription()
        A description of this kind of SCMNavigator. This description can contain HTML code but it is recommended to use text plain in order to avoid how it should be represented.
        Returns:
        A string with the description. TopLevelItemDescriptor.getDescription().
        Since:
        1.2
      • getIconFilePathPattern

        @CheckForNull
        public String getIconFilePathPattern()
        Represents a file path pattern to get the Item icon in different sizes. For example: plugin/plugin-shortname/images/:size/item.png, where :size represents the different icon sizes used commonly in Jenkins project: 16x16, 24x24, 32x32 or 48x48
        Returns:
        A string or null if it is not defined. TopLevelItemDescriptor.getIconFilePathPattern()
        Since:
        1.2
      • getIconClassName

        @CheckForNull
        public String getIconClassName()
        Get the Item's Icon class specification e.g. 'icon-notepad'. Note: do NOT include icon size specifications (such as 'icon-sm').
        Specified by:
        getIconClassName in interface IconSpec
        Returns:
        The Icon class specification e.g. 'icon-notepad'.
      • getPronoun

        @CheckForNull
        public String getPronoun()
        Get the term used in the UI to represent this kind of SCMNavigator. Must start with a capital letter.
        Returns:
        the term or null to fall back to the calling context's default.
        Since:
        2.0
      • newInstance

        @CheckForNull
        public abstract SCMNavigator newInstance​(@CheckForNull
                                                 String name)
        Creates a default navigator, if there should be one displayed. May be interpreted by jenkins.branch.CustomOrganizationFolderDescriptor. If returning non-null, you should also provide a getDescription() implementation
        Parameters:
        name - a name supplied by the user which may be used as a hint for preconfiguration
        Returns:
        a navigator with a default configuration, or null if it should not be advertised this way