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 VcsSupportCorefindVcsByName(String name)Try to find and return VcsSupportVcsSupportContextfindVcsContextByName(String vcsName)Try to find and return VcsSupportContextVcsSupportContextfindVcsSupportContext(String vcsName)Find VCS Support Context by VCS name.Collection<VcsSupportContext>getAllVcs()Collection<VcsSupportCore>getAllVcsCore()voidregister(String vcsName, VcsSupportContext context)Register VCS Support Context.voidregisterVcsSupport(VcsSupportContext vcsSupport)Register new vcs on server.voidunregister(String vcsName)Unregister VCS Support Context.voidunregisterVcsSupport(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:VcsRegistryTry to find and return VcsSupport- Specified by:
findVcsByNamein interfaceVcsRegistry- Parameters:
name- name of VcsSupport to find- Returns:
- Found VcsSupport with given name
-
getAllVcs
@NotNull public Collection<VcsSupportContext> getAllVcs()
- Specified by:
getAllVcsin interfaceVcsRegistry- Returns:
- Collection of all registered VcsSupports
-
getAllVcsCore
@NotNull public Collection<VcsSupportCore> getAllVcsCore()
- Specified by:
getAllVcsCorein interfaceVcsRegistry- Returns:
- Collection of all registered VcsSupports
-
registerVcsSupport
public void registerVcsSupport(@NotNull VcsSupportContext vcsSupport)Description copied from interface:VcsRegistryExRegister new vcs on server. Works likeVcsRegistryEx.register(String, VcsSupportContext)with name from VcsSupportContext- Specified by:
registerVcsSupportin interfaceVcsRegistryEx- Parameters:
vcsSupport-VcsSupportContextimplementation for vcs which provides core functionality
-
unregisterVcsSupport
public void unregisterVcsSupport(@NotNull VcsSupportContext vcsSupport)Description copied from interface:VcsRegistryExUnregister vcs which was previous registered viaVcsRegistryEx.registerVcsSupport(VcsSupportContext)method.- Specified by:
unregisterVcsSupportin interfaceVcsRegistryEx
-
findVcsSupportContext
@Nullable public VcsSupportContext findVcsSupportContext(@NotNull String vcsName)
Description copied from interface:VcsContextLocatorFind VCS Support Context by VCS name.- Specified by:
findVcsSupportContextin 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:VcsRegistryTry to find and return VcsSupportContext- Specified by:
findVcsContextByNamein 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 VcsSupportNameCollisionExceptionRegister VCS Support Context.- Specified by:
registerin 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:
unregisterin interfaceVcsRegistryEx- Parameters:
vcsName- name of the context to uregister
-
-