Package jenkins.scm.api.trait
Class SCMNavigatorRequest
java.lang.Object
jenkins.scm.api.trait.SCMNavigatorRequest
- All Implemented Interfaces:
Closeable,AutoCloseable
Represents the context of an individual request for a call to
SCMNavigator.visitSources(SCMSourceObserver) or an equivalent method.- Since:
- 2.2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA lambda that will create the map of attributes for a specific project name.static interfaceA lambda that will create theSCMSourceinstance for a specific project name.static interfaceCallback lambda to track the results ofprocess(String, SourceLambda, AttributeLambda, Witness...)orprocess(String, List, List, Witness...) -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSCMNavigatorRequest(SCMNavigator source, SCMNavigatorContext<?, ?> context, SCMSourceObserver observer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final List<SCMSourceDecorator<?,?>> Returns theSCMSourceDecoratorinstances to apply toSCMSourceinstances.final booleanisExcluded(String projectName) Tests if the project name is excluded from the request.voidAdds managing aCloseableinto the scope of theSCMNavigatorRequestbooleanprocess(String projectName, List<SCMNavigatorRequest.SourceLambda> sourceFactories, List<SCMNavigatorRequest.AttributeLambda> attributeFactories, SCMNavigatorRequest.Witness... witnesses) Processes a named project in the scope of the current request.booleanprocess(String projectName, SCMNavigatorRequest.SourceLambda sourceFactory, SCMNavigatorRequest.AttributeLambda attributeFactory, SCMNavigatorRequest.Witness... witnesses) Processes a named project in the scope of the current request.final List<SCMSourceTrait>traits()Returns theSCMSourceTraitinstances to apply to everySCMSource.
-
Constructor Details
-
Method Details
-
traits
Returns theSCMSourceTraitinstances to apply to everySCMSource.- Returns:
- the
SCMSourceTraitinstances to apply to everySCMSource.
-
decorators
Returns theSCMSourceDecoratorinstances to apply toSCMSourceinstances.- Returns:
- the
SCMSourceDecoratorinstances to apply toSCMSourceinstances.
-
isExcluded
public final boolean isExcluded(@NonNull String projectName) throws IOException, InterruptedException Tests if the project name is excluded from the request.- Parameters:
projectName- the project name.- Returns:
trueif theSCMHeadis excluded.- Throws:
IOException- if there is an I/O error.InterruptedException- if the operation was interrupted.
-
manage
Adds managing aCloseableinto the scope of theSCMNavigatorRequest- Parameters:
closeable- theCloseableto manage.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-