Package jenkins.scm.impl
Class SingleSCMNavigator
java.lang.Object
hudson.model.AbstractDescribableImpl<SCMNavigator>
jenkins.scm.api.SCMNavigator
jenkins.scm.impl.SingleSCMNavigator
- All Implemented Interfaces:
ExtensionPoint,Describable<SCMNavigator>
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class SingleSCMNavigator
extends SCMNavigator
Degenerate navigator which only ever returns a single repository.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class jenkins.scm.api.SCMNavigator
PRONOUN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()protected Stringid()Generates the ID of the thing being navigated from the configuration of thisSCMNavigator.voidvisitSources(SCMSourceObserver observer) Looks for SCM sources in a configured place.Methods inherited from class jenkins.scm.api.SCMNavigator
afterSave, checkInterrupt, defaultListener, fetchActions, getCategories, getDescriptor, getId, getPronoun, getTraits, isCategoryEnabled, resetId, retrieveActions, setTraits, visitSource, visitSources, visitSources
-
Constructor Details
-
SingleSCMNavigator
-
-
Method Details
-
getName
-
getSources
-
id
Description copied from class:SCMNavigatorGenerates the ID of the thing being navigated from the configuration of thisSCMNavigator.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
SCMNavigatorOwnerthen the results fromSCMNavigator.fetchActions(SCMNavigatorOwner, SCMNavigatorEvent, TaskListener)should be not just equivalent butList.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.
- Specified by:
idin classSCMNavigator- Returns:
- the ID of the thing being navigated by this navigator.
- See Also:
-
visitSources
public void visitSources(@NonNull SCMSourceObserver observer) throws IOException, InterruptedException Description copied from class:SCMNavigatorLooks for SCM sources in a configured place. After this method completes, no further calls may be made to theobserveror its child callbacks. It is vitally important that implementations must periodically callSCMNavigator.checkInterrupt()otherwise it will be impossible for users to interrupt the operation.- Specified by:
visitSourcesin classSCMNavigator- Parameters:
observer- a recipient of progress notifications and a source of contextual information- Throws:
IOException- if scanning failsInterruptedException- if scanning is interrupted
-