public abstract class SCMNavigatorRequest extends Object implements Closeable
SCMNavigator.visitSources(SCMSourceObserver) or an equivalent method.| Modifier and Type | Class and Description |
|---|---|
static interface |
SCMNavigatorRequest.AttributeLambda
A lambda that will create the map of attributes for a specific project name.
|
static interface |
SCMNavigatorRequest.SourceLambda
A lambda that will create the
SCMSource instance for a specific project name. |
static interface |
SCMNavigatorRequest.Witness
Callback lambda to track the results of
process(String, SourceLambda, AttributeLambda, Witness...) or
process(String, List, List, Witness...) |
| Modifier | Constructor and Description |
|---|---|
protected |
SCMNavigatorRequest(SCMNavigator source,
SCMNavigatorContext<?,?> context,
SCMSourceObserver observer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
List<SCMSourceDecorator<?,?>> |
decorators()
Returns the
SCMSourceDecorator instances to apply to SCMSource instances. |
boolean |
isExcluded(String projectName)
Tests if the project name is excluded from the request.
|
void |
manage(Closeable closeable)
Adds managing a
Closeable into the scope of the SCMNavigatorRequest |
boolean |
process(String projectName,
List<SCMNavigatorRequest.SourceLambda> sourceFactories,
List<SCMNavigatorRequest.AttributeLambda> attributeFactories,
SCMNavigatorRequest.Witness... witnesses)
Processes a named project in the scope of the current request.
|
boolean |
process(String projectName,
SCMNavigatorRequest.SourceLambda sourceFactory,
SCMNavigatorRequest.AttributeLambda attributeFactory,
SCMNavigatorRequest.Witness... witnesses)
Processes a named project in the scope of the current request.
|
List<SCMSourceTrait> |
traits()
Returns the
SCMSourceTrait instances to apply to every SCMSource. |
protected SCMNavigatorRequest(@NonNull
SCMNavigator source,
@NonNull
SCMNavigatorContext<?,?> context,
@NonNull
SCMSourceObserver observer)
source - the source.context - the context.observer - the observer.@NonNull public final List<SCMSourceTrait> traits()
SCMSourceTrait instances to apply to every SCMSource.SCMSourceTrait instances to apply to every SCMSource.@NonNull public final List<SCMSourceDecorator<?,?>> decorators()
SCMSourceDecorator instances to apply to SCMSource instances.SCMSourceDecorator instances to apply to SCMSource instances.public final boolean isExcluded(@NonNull
String projectName)
throws IOException,
InterruptedException
projectName - the project name.true if the SCMHead is excluded.IOException - if there is an I/O error.InterruptedException - if the operation was interrupted.public boolean process(@NonNull
String projectName,
@NonNull
SCMNavigatorRequest.SourceLambda sourceFactory,
@CheckForNull
SCMNavigatorRequest.AttributeLambda attributeFactory,
SCMNavigatorRequest.Witness... witnesses)
throws IllegalArgumentException,
IOException,
InterruptedException
projectName - the name of the project.sourceFactory - the factory for instantiating a SCMSource.attributeFactory - (optional) factory for instantiating the attribute map.witnesses - the witnesses to record the processing result.true if and only if the request is completed, false if the request can process
additional named projects.IllegalArgumentException - if the attribute factory provides attribute names that are unrecognized, or
repeats already added attributes.IOException - if there is an I/O error.InterruptedException - if the operation was interrupted.public boolean process(@NonNull
String projectName,
@NonNull
List<SCMNavigatorRequest.SourceLambda> sourceFactories,
@CheckForNull
List<SCMNavigatorRequest.AttributeLambda> attributeFactories,
SCMNavigatorRequest.Witness... witnesses)
throws IllegalArgumentException,
IOException,
InterruptedException
projectName - the name of the project.sourceFactories - the factories for instantiating the SCMSource instances.attributeFactories - (optional) factories for instantiating the attribute maps.witnesses - the witnesses to record the processing result.true if and only if the request is completed, false if the request can process
additional named projects.IllegalArgumentException - if an attribute factory provides attribute names that are unrecognized, or
repeats already added attributes.IOException - if there is an I/O error.InterruptedException - if the operation was interrupted.public void manage(@CheckForNull
Closeable closeable)
Closeable into the scope of the SCMNavigatorRequestcloseable - the Closeable to manage.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016–2019. All rights reserved.