public abstract class MultiBranchProjectFactory extends hudson.model.AbstractDescribableImpl<MultiBranchProjectFactory> implements hudson.ExtensionPoint
MultiBranchProject
s for repositories where recognized.
Please define a 'getting-started' view for a subclass, if you would like to provide specific information to the user
how to get started using the type of project factory. This view is displayed when there are no subfolders found.OrganizationFolder.getProjectFactories()
Modifier and Type | Class and Description |
---|---|
static class |
MultiBranchProjectFactory.BySCMSourceCriteria
Creates a particular kind of multibranch project insofar as at least one
SCMHead satisfies a probe. |
Constructor and Description |
---|
MultiBranchProjectFactory() |
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)
Creates a new multibranch project which matches
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) . |
MultiBranchProject<?,?> |
createProject(hudson.model.ItemGroup<?> parent,
String name,
List<? extends jenkins.scm.api.SCMSource> scmSources,
Map<String,Object> attributes,
hudson.model.TaskListener listener)
Deprecated.
|
MultiBranchProjectFactoryDescriptor |
getDescriptor() |
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.
|
void |
updateExistingProject(MultiBranchProject<?,?> project,
Map<String,Object> attributes,
hudson.model.TaskListener listener)
|
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
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 progressInterruptedException
- if interrupted.IOException
- if there was an IO error.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
.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 progressInterruptedException
- if interrupted.IOException
- if there was an IO error.@NonNull public 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
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)
.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()
)InterruptedException
- if interrupted.IOException
- if there was an IO error.public void updateExistingProject(@NonNull MultiBranchProject<?,?> project, @NonNull Map<String,Object> attributes, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
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)
.project
- an existing project, perhaps created by this factory, perhaps notattributes
- a set of metadata attributes as added by
SCMSourceObserver.ProjectObserver.addAttribute(java.lang.String, java.lang.Object)
listener
- a way of reporting progressInterruptedException
- if interrupted.IOException
- if there was an IO error.@Deprecated @CheckForNull public MultiBranchProject<?,?> createProject(@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
createNewProject(ItemGroup, String, List, Map, TaskListener)
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)
.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()
)InterruptedException
- if interrupted.IOException
- if there was an IO error.public MultiBranchProjectFactoryDescriptor getDescriptor()
getDescriptor
in interface hudson.model.Describable<MultiBranchProjectFactory>
getDescriptor
in class hudson.model.AbstractDescribableImpl<MultiBranchProjectFactory>
Copyright © 2016–2017. All rights reserved.