Package jenkins.scm.api
Class SCMHeadCategory
- Direct Known Subclasses:
- ChangeRequestSCMHeadCategory,- TagSCMHeadCategory,- UncategorizedSCMHeadCategory
Base class for categories of 
SCMHead, for example: branches, tags, change requests, mainlines, features, etc.- Since:
- 2.0
- 
Constructor SummaryConstructorsConstructorDescriptionSCMHeadCategory(String urlName, org.jvnet.localizer.Localizable pronoun) SCMHeadCategory(org.jvnet.localizer.Localizable pronoun) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic List<SCMHeadCategory>addUncategorizedIfMissing(List<SCMHeadCategory> categories) Ensures that the supplied list of categories includes theUncategorizedSCMHeadCategory.static List<SCMHeadCategory>IteratesSCMSourceinstances collecting the unique list ofSCMHeadCategoryinstances.static Map<String,SCMHeadCategory> collectAndSimplify(Iterable<SCMSource> sources) Collects theSCMHeadCategoryinstances from a set ofSCMSourceinstances and simplifies the result.protected org.jvnet.localizer.LocalizableThe default display name.static Map<String,SCMHeadCategory> simplify(Iterable<SCMHeadCategory> categories) Simplifies a collection ofSCMHeadCategoryreplacing duplicates with theirunion(List).static SCMHeadCategoryunion(List<SCMHeadCategory> categories) Reduces a list of categories into a single composite category.Methods inherited from class jenkins.scm.api.SCMCategorygetDisplayName, getName, group, group, isMatch, isMatch, isUncategorized, toDisplayName, toDisplayName, toShortUrl, toShortUrl
- 
Constructor Details- 
SCMHeadCategorypublic SCMHeadCategory(@CheckForNull org.jvnet.localizer.Localizable pronoun) 
- 
SCMHeadCategorypublic SCMHeadCategory(@NonNull String urlName, @CheckForNull org.jvnet.localizer.Localizable pronoun) 
 
- 
- 
Method Details- 
collectIteratesSCMSourceinstances collecting the unique list ofSCMHeadCategoryinstances.- Parameters:
- sources- the- SCMSourceinstances to iterate.
- Returns:
- the list of unique SCMHeadCategoryinstances.
 
- 
addUncategorizedIfMissingEnsures that the supplied list of categories includes theUncategorizedSCMHeadCategory.- Parameters:
- categories- the list of- SCMHeadCategoryinstances (must be mutable)
- Returns:
- the supplied list for method chaining.
 
- 
unionReduces a list of categories into a single composite category.- Parameters:
- categories- the list of categories (must contain at least one element).
- Returns:
- a composite category.
 
- 
simplifySimplifies a collection ofSCMHeadCategoryreplacing duplicates with theirunion(List).- Parameters:
- categories- the collection of categories to simplify.
- Returns:
- the map of simplified categories keyed by SCMCategory.getName().
 
- 
collectAndSimplifyCollects theSCMHeadCategoryinstances from a set ofSCMSourceinstances and simplifies the result.- Parameters:
- sources- the- SCMSourceinstances
- Returns:
- the map of simplified categories keyed by SCMCategory.getName().
- See Also:
 
- 
defaultDisplayName@NonNull protected org.jvnet.localizer.Localizable defaultDisplayName()The default display name.- Specified by:
- defaultDisplayNamein class- SCMCategory<SCMHead>
- Returns:
- The generic term of a collection of things in this kind of SCMCategory.
 
 
-