Class UncategorizedSCMSourceCategory
- java.lang.Object
-
- jenkins.scm.api.SCMCategory<SCMSource>
-
- jenkins.scm.api.SCMSourceCategory
-
- jenkins.scm.impl.UncategorizedSCMSourceCategory
-
public final class UncategorizedSCMSourceCategory extends SCMSourceCategory
Standard category for uncategorized instances.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static UncategorizedSCMSourceCategory
DEFAULT
TheUncategorizedSCMSourceCategory
singleton with the default naming.
-
Constructor Summary
Constructors Constructor Description UncategorizedSCMSourceCategory(org.jvnet.localizer.Localizable displayName)
Constructs aUncategorizedSCMSourceCategory
with customized naming.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMatch(SCMSource instance)
Checks if the supplied instance is a match for thisSCMCategory
.-
Methods inherited from class jenkins.scm.api.SCMSourceCategory
addUncategorizedIfMissing, collect, collectAndSimplify, defaultDisplayName, simplify, union
-
Methods inherited from class jenkins.scm.api.SCMCategory
getDisplayName, getName, group, group, isMatch, isUncategorized, toDisplayName, toDisplayName, toShortUrl, toShortUrl
-
-
-
-
Field Detail
-
DEFAULT
public static final UncategorizedSCMSourceCategory DEFAULT
TheUncategorizedSCMSourceCategory
singleton with the default naming.
-
-
Constructor Detail
-
UncategorizedSCMSourceCategory
public UncategorizedSCMSourceCategory(@NonNull org.jvnet.localizer.Localizable displayName)
Constructs aUncategorizedSCMSourceCategory
with customized naming. Use this constructor when the generic naming is not appropriate terminology for the specificSCMNavigator
's naming of repositories.For example: the Accurev source control system uses the term "depots" to refer to the same thing that Git would call "repositories", it would confuse Accurev users if we called their "depots" as "repositories" (especially as Accurev uses the term "repository" to refer to the Accurev server) so an Accurev specific provider would use this constructor to generate a singleton with the "depots" name. If there is a Git and Accurev navigator in the same context then
SCMSourceCategory.collectAndSimplify(Iterable)
will contain anUncategorizedSCMSourceCategory
under thedefault
key that has aSCMCategory.getDisplayName()
ofDepots / Repositories
(which may indeed confuse the Accurev users who have not been exposed to Git, but as both are in use they should have been prepared for the different terminology)- Parameters:
displayName
- the display name for the uncategorizedSCMSource
s when the source control system uses a different terminology from "repositories".
-
-
Method Detail
-
isMatch
public boolean isMatch(@NonNull SCMSource instance)
Checks if the supplied instance is a match for thisSCMCategory
.- Specified by:
isMatch
in classSCMCategory<SCMSource>
- Parameters:
instance
- the instance to test.- Returns:
true
if the instance belongs to thisSCMCategory
.
-
-