jetbrains.buildServer.vcs
Class ServerVcsSupport

java.lang.Object
  extended by jetbrains.buildServer.vcs.ServerVcsSupport
All Implemented Interfaces:
VcsSupportConfig, VcsSupportContext, VcsSupportCore
Direct Known Subclasses:
VcsSupport

public abstract class ServerVcsSupport
extends java.lang.Object
implements VcsSupportContext, VcsSupportCore

Base class for all VCS support implementations. Don't implement VcsSupportContext directly to avoid backward compatibility issues.

Since:
4.5

Constructor Summary
ServerVcsSupport()
           
 
Method Summary
 boolean allowSourceCaching()
           
 java.util.Map<java.lang.String,java.lang.String> getCheckoutProperties(VcsRoot root)
          Must return a map of vcs root properties significant for checkout operation.
 VcsSupportCore getCore()
           
 LabelingSupport getLabelingSupport()
           
 ListFilesPolicy getListFilesPolicy()
          Return list files policy or null if list files is not supported
 VcsPersonalSupport getPersonalSupport()
           
 TestConnectionSupport getTestConnectionSupport()
           
 UrlSupport getUrlSupport()
           
protected
<T extends VcsExtension>
T
getVcsCustomExtension(java.lang.Class<T> extensionClass)
           
<T extends VcsExtension>
T
getVcsExtension(java.lang.Class<T> extensionClass)
          Get a VcsExtension implementation by its class.
 boolean isAgentSideCheckoutAvailable()
           
 boolean isCurrentVersionExpensive()
          If the obtaining current version is an expensive operation (see VcsSupportCore.getCurrentVersion(VcsRoot)) the implementation may optimize performance by returning true.
 boolean isDAGBasedVcs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jetbrains.buildServer.vcs.VcsSupportContext
getBuildPatchPolicy, getCollectChangesPolicy, getContentProvider
 
Methods inherited from interface jetbrains.buildServer.vcs.VcsSupportCore
getCurrentVersion, sourcesUpdatePossibleIfChangesNotFound
 
Methods inherited from interface jetbrains.buildServer.vcs.VcsSupportConfig
describeVcsRoot, getDefaultVcsProperties, getDisplayName, getName, getVcsPropertiesProcessor, getVcsSettingsJspFilePath, getVersionComparator, getVersionDisplayName
 

Constructor Detail

ServerVcsSupport

public ServerVcsSupport()
Method Detail

getPersonalSupport

public VcsPersonalSupport getPersonalSupport()
Specified by:
getPersonalSupport in interface VcsSupportContext
Returns:
null by default

getLabelingSupport

public LabelingSupport getLabelingSupport()
Specified by:
getLabelingSupport in interface VcsSupportContext
Returns:
null by default

getTestConnectionSupport

public TestConnectionSupport getTestConnectionSupport()
Specified by:
getTestConnectionSupport in interface VcsSupportContext
Returns:
null by default

isCurrentVersionExpensive

public boolean isCurrentVersionExpensive()
Description copied from interface: VcsSupportCore
If the obtaining current version is an expensive operation (see VcsSupportCore.getCurrentVersion(VcsRoot)) the implementation may optimize performance by returning true. In this case collecting changes for the current version will be done without specifying upper version. Otherwise VcsSupportCore.getCurrentVersion(VcsRoot) will be called first and then the result will be passed to the change collector as the upper version.

Specified by:
isCurrentVersionExpensive in interface VcsSupportCore
Returns:
false by default
See Also:
CollectChangesPolicy

allowSourceCaching

public boolean allowSourceCaching()
Specified by:
allowSourceCaching in interface VcsSupportCore
Returns:
true by default

isAgentSideCheckoutAvailable

public boolean isAgentSideCheckoutAvailable()
Specified by:
isAgentSideCheckoutAvailable in interface VcsSupportConfig
Returns:
false by default

getCore

@NotNull
public VcsSupportCore getCore()
Specified by:
getCore in interface VcsSupportContext
Returns:
the object with the core functions

getUrlSupport

@Nullable
public UrlSupport getUrlSupport()
Specified by:
getUrlSupport in interface VcsSupportContext

isDAGBasedVcs

public boolean isDAGBasedVcs()
Specified by:
isDAGBasedVcs in interface VcsSupportConfig
Returns:
true if VCS is DAG-based

getCheckoutProperties

@NotNull
public java.util.Map<java.lang.String,java.lang.String> getCheckoutProperties(@NotNull
                                                                                      VcsRoot root)
                                                                       throws VcsException
Description copied from interface: VcsSupportConfig
Must return a map of vcs root properties significant for checkout operation. If a property is not returned in the map, TeamCity will ignore change in this property for given VCS root. For example, if a property changed and this property is significant for checkout, TeamCity will perform clean checkout. In other words, plugin must return those properties whose change can affect source code on agent. Properties returned by this method also affect checkout directory name on agent. Default implementation in ServerVcsSupport returns all non-secure properties.

Specified by:
getCheckoutProperties in interface VcsSupportConfig
Parameters:
root - VCS root of interest
Returns:
see above
Throws:
VcsException - if properties cannot be calculated

getListFilesPolicy

@Nullable
public ListFilesPolicy getListFilesPolicy()
Description copied from interface: VcsSupportContext
Return list files policy or null if list files is not supported

Specified by:
getListFilesPolicy in interface VcsSupportContext
Returns:
see above

getVcsExtension

@Nullable
public final <T extends VcsExtension> T getVcsExtension(@NotNull
                                                                 java.lang.Class<T> extensionClass)
Description copied from interface: VcsSupportContext
Get a VcsExtension implementation by its class.

Specified by:
getVcsExtension in interface VcsSupportContext

getVcsCustomExtension

protected <T extends VcsExtension> T getVcsCustomExtension(@NotNull
                                                           java.lang.Class<T> extensionClass)