public abstract static class MultiBranchProjectFactory.BySCMSourceCriteria extends MultiBranchProjectFactory
SCMHead
satisfies a probe.MultiBranchProjectFactory.BySCMSourceCriteria
Constructor and Description |
---|
BySCMSourceCriteria() |
Modifier and Type | Method and Description |
---|---|
MultiBranchProject<?,?> |
createNewProject(hudson.model.ItemGroup<?> parent,
String name,
List<? extends jenkins.scm.api.SCMSource> scmSources,
Map<String,Object> attributes,
hudson.model.TaskListener listener)
|
protected abstract MultiBranchProject<?,?> |
doCreateProject(hudson.model.ItemGroup<?> parent,
String name,
Map<String,Object> attributes)
|
protected abstract jenkins.scm.api.SCMSourceCriteria |
getSCMSourceCriteria(jenkins.scm.api.SCMSource source)
Defines how to decide whether or not a given repository should host our type of project.
|
boolean |
recognizes(hudson.model.ItemGroup<?> parent,
String name,
List<? extends jenkins.scm.api.SCMSource> scmSources,
Map<String,Object> attributes,
jenkins.scm.api.SCMHeadEvent<?> event,
hudson.model.TaskListener listener)
Determines whether this factory recognizes a given configuration scoped to a specific
SCMHeadEvent . |
boolean |
recognizes(hudson.model.ItemGroup<?> parent,
String name,
List<? extends jenkins.scm.api.SCMSource> scmSources,
Map<String,Object> attributes,
hudson.model.TaskListener listener)
Determines whether this factory recognizes a given configuration.
|
createProject, getDescriptor, updateExistingProject
@NonNull protected abstract jenkins.scm.api.SCMSourceCriteria getSCMSourceCriteria(@NonNull jenkins.scm.api.SCMSource source)
source
- a repository@NonNull protected abstract MultiBranchProject<?,?> doCreateProject(@NonNull hudson.model.ItemGroup<?> parent, @NonNull String name, @NonNull Map<String,Object> attributes)
createNewProject(hudson.model.ItemGroup<?>, java.lang.String, java.util.List<? extends jenkins.scm.api.SCMSource>, java.util.Map<java.lang.String, java.lang.Object>, hudson.model.TaskListener)
.parent
- a foldername
- a project name
SCMSourceObserver.ProjectObserver.addSource(jenkins.scm.api.SCMSource)
attributes
- a set of metadata attributes as added by
SCMSourceObserver.ProjectObserver.addAttribute(java.lang.String, java.lang.Object)
MultiBranchProject.getSourcesList()
or call AbstractItem.onCreatedFromScratch()
)public final MultiBranchProject<?,?> createNewProject(@NonNull hudson.model.ItemGroup<?> parent, @NonNull String name, @NonNull List<? extends jenkins.scm.api.SCMSource> scmSources, @NonNull Map<String,Object> attributes, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
MultiBranchProjectFactory.recognizes(hudson.model.ItemGroup<?>, java.lang.String, java.util.List<? extends jenkins.scm.api.SCMSource>, java.util.Map<java.lang.String, java.lang.Object>, hudson.model.TaskListener)
.createNewProject
in class MultiBranchProjectFactory
parent
- a foldername
- a project namescmSources
- a set of SCM sources as added by
SCMSourceObserver.ProjectObserver.addSource(jenkins.scm.api.SCMSource)
attributes
- a set of metadata attributes as added by
SCMSourceObserver.ProjectObserver.addAttribute(java.lang.String, java.lang.Object)
listener
- a way of reporting progressMultiBranchProject.getSourcesList()
or call AbstractItem.onCreatedFromScratch()
)IOException
- if there was an IO error.InterruptedException
- if interrupted.public boolean recognizes(@NonNull hudson.model.ItemGroup<?> parent, @NonNull String name, @NonNull List<? extends jenkins.scm.api.SCMSource> scmSources, @NonNull Map<String,Object> attributes, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
recognizes
in class MultiBranchProjectFactory
parent
- a foldername
- a project namescmSources
- a set of SCM sources as added by
SCMSourceObserver.ProjectObserver.addSource(jenkins.scm.api.SCMSource)
attributes
- a set of metadata attributes as added by
SCMSourceObserver.ProjectObserver.addAttribute(java.lang.String, java.lang.Object)
listener
- a way of reporting progressIOException
- if there was an IO error.InterruptedException
- if interrupted.public boolean recognizes(@NonNull hudson.model.ItemGroup<?> parent, @NonNull String name, @NonNull List<? extends jenkins.scm.api.SCMSource> scmSources, @NonNull Map<String,Object> attributes, @CheckForNull jenkins.scm.api.SCMHeadEvent<?> event, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
SCMHeadEvent
.recognizes
in class MultiBranchProjectFactory
parent
- a foldername
- a project namescmSources
- a set of SCM sources as added by
SCMSourceObserver.ProjectObserver.addSource(jenkins.scm.api.SCMSource)
attributes
- a set of metadata attributes as added by
SCMSourceObserver.ProjectObserver.addAttribute(java.lang.String, java.lang.Object)
event
- the SCMHeadEvent
that the recognition test should be restricted to.listener
- a way of reporting progressIOException
- if there was an IO error.InterruptedException
- if interrupted.Copyright © 2016–2017. All rights reserved.