@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public class SingleSCMNavigator extends SCMNavigator
Modifier and Type | Class and Description |
---|---|
static class |
SingleSCMNavigator.DescriptorImpl |
ExtensionPoint.LegacyInstancesAreScopedToHudson
PRONOUN
Constructor and Description |
---|
SingleSCMNavigator(String name,
List<SCMSource> sources) |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
List<SCMSource> |
getSources() |
protected String |
id()
Generates the ID of the thing being navigated from the configuration of this
SCMNavigator . |
void |
visitSources(SCMSourceObserver observer)
Looks for SCM sources in a configured place.
|
afterSave, checkInterrupt, defaultListener, fetchActions, getCategories, getDescriptor, getId, getPronoun, getTraits, isCategoryEnabled, resetId, retrieveActions, setTraits, visitSource, visitSources, visitSources
public String getName()
@NonNull protected String id()
SCMNavigator
SCMNavigator
.
The ID will typically be a composite of things like the server and the project/organization that the navigator is scoped to.
For example, a GitHub navigator that is navigating repositories in a GitHub organization could construct its ID as being the URL of the GitHub Server (to allow for GitHub Enterprise servers) and the name of the organization.
The key criteria is that if two navigators have the same ID and they are both in the same
SCMNavigatorOwner
then the results from
SCMNavigator.fetchActions(SCMNavigatorOwner, SCMNavigatorEvent, TaskListener)
should be not just equivalent but
List.equals(Object)
.
If the results could be non-equal for navigators with the same ID then more detail needs to be encoded in the ID.
id
in class SCMNavigator
SCMNavigator.resetId()
,
SCMNavigator.getId()
public void visitSources(SCMSourceObserver observer) throws IOException, InterruptedException
SCMNavigator
observer
or its child callbacks.
It is vitally important that implementations must periodically call SCMNavigator.checkInterrupt()
otherwise it will be impossible for users to interrupt the operation.visitSources
in class SCMNavigator
observer
- a recipient of progress notifications and a source of contextual informationIOException
- if scanning failsInterruptedException
- if scanning is interruptedCopyright © 2016–2022. All rights reserved.