Package jetbrains.buildServer.vcs.impl
Class VcsSupportContextRegistry
- java.lang.Object
-
- jetbrains.buildServer.vcs.impl.VcsSupportContextRegistry
-
- All Implemented Interfaces:
VcsRegistry
,VcsRegistryEx
,VcsContextLocator
public class VcsSupportContextRegistry extends Object implements VcsContextLocator, VcsRegistryEx
Vsc Support Registry. Keeps VcsSupportContext instances. Allows lookup by VCS name or url schema for this VCS. Author: Nikita.Skvortsov, Eugene Petrenko Date: 11/16/10
-
-
Constructor Summary
Constructors Constructor Description VcsSupportContextRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VcsSupportCore
findVcsByName(String name)
Try to find and return VcsSupportVcsSupportContext
findVcsContextByName(String vcsName)
Try to find and return VcsSupportContextVcsSupportContext
findVcsSupportContext(String vcsName)
Find VCS Support Context by VCS name.Collection<VcsSupportContext>
getAllVcs()
Collection<VcsSupportCore>
getAllVcsCore()
void
register(String vcsName, VcsSupportContext context)
Register VCS Support Context.void
registerVcsSupport(VcsSupportContext vcsSupport)
Register new vcs on server.void
unregister(String vcsName)
Unregister VCS Support Context.void
unregisterVcsSupport(VcsSupportContext vcsSupport)
Unregister vcs which was previous registered viaVcsRegistryEx.registerVcsSupport(VcsSupportContext)
method.
-
-
-
Method Detail
-
findVcsByName
@Nullable public VcsSupportCore findVcsByName(@NotNull String name)
Description copied from interface:VcsRegistry
Try to find and return VcsSupport- Specified by:
findVcsByName
in interfaceVcsRegistry
- Parameters:
name
- name of VcsSupport to find- Returns:
- Found VcsSupport with given name
-
getAllVcs
@NotNull public Collection<VcsSupportContext> getAllVcs()
- Specified by:
getAllVcs
in interfaceVcsRegistry
- Returns:
- Collection of all registered VcsSupports
-
getAllVcsCore
@NotNull public Collection<VcsSupportCore> getAllVcsCore()
- Specified by:
getAllVcsCore
in interfaceVcsRegistry
- Returns:
- Collection of all registered VcsSupports
-
registerVcsSupport
public void registerVcsSupport(@NotNull VcsSupportContext vcsSupport)
Description copied from interface:VcsRegistryEx
Register new vcs on server. Works likeVcsRegistryEx.register(String, VcsSupportContext)
with name from VcsSupportContext- Specified by:
registerVcsSupport
in interfaceVcsRegistryEx
- Parameters:
vcsSupport
-VcsSupportContext
implementation for vcs which provides core functionality
-
unregisterVcsSupport
public void unregisterVcsSupport(@NotNull VcsSupportContext vcsSupport)
Description copied from interface:VcsRegistryEx
Unregister vcs which was previous registered viaVcsRegistryEx.registerVcsSupport(VcsSupportContext)
method.- Specified by:
unregisterVcsSupport
in interfaceVcsRegistryEx
-
findVcsSupportContext
@Nullable public VcsSupportContext findVcsSupportContext(@NotNull String vcsName)
Description copied from interface:VcsContextLocator
Find VCS Support Context by VCS name.- Specified by:
findVcsSupportContext
in interfaceVcsContextLocator
- Parameters:
vcsName
- name to look for- Returns:
- VCS Support Context, or null if no context is registered for given name
-
findVcsContextByName
@Nullable public VcsSupportContext findVcsContextByName(@NotNull String vcsName)
Description copied from interface:VcsRegistry
Try to find and return VcsSupportContext- Specified by:
findVcsContextByName
in interfaceVcsRegistry
- Parameters:
vcsName
- name of VcsSupport to find- Returns:
- Found VcsSupport with given name
- See Also:
VcsServiceProvider
-
register
public void register(@NotNull String vcsName, @NotNull VcsSupportContext context) throws VcsSupportNameCollisionException
Register VCS Support Context.- Specified by:
register
in interfaceVcsRegistryEx
- Parameters:
vcsName
- Name to use for this contextcontext
- Context to register- Throws:
VcsSupportNameCollisionException
- if vcs with given name already registed
-
unregister
public void unregister(@NotNull String vcsName)
Unregister VCS Support Context.- Specified by:
unregister
in interfaceVcsRegistryEx
- Parameters:
vcsName
- name of the context to uregister
-
-