Class VcsStatusProviderImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.VcsStatusProviderImpl
-
- All Implemented Interfaces:
LVcsStatusLogger
,VcsStatusLogger
,VcsStatusProvider
public class VcsStatusProviderImpl extends Object implements VcsStatusProvider
-
-
Constructor Summary
Constructors Constructor Description VcsStatusProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connectionFailed(Collection<LVcsRootInstanceHolder> buildTypes, VcsRoot root, Throwable problem)
Notifies that connection is failed for specified VCS root and a number of build configurations.void
connectionFailed(LVcsRootInstanceHolder buildType, VcsRoot root, Throwable problem)
Notifies that connection is failed for specified VCS root and build configuration.void
connectionSuccessful(LVcsRootInstanceHolder buildType, VcsRoot root)
Clears last failure for specified VCS root and build configuration.void
currentStateFailedForVcsRoot(VcsRoot vcsRoot, Throwable throwable)
Should be called if attempt to get current state for the specified VCS root failed.void
currentStateSuccessfulForVcsRoot(VcsRoot vcsRoot)
Should be called if attempt to get current state for the specified VCS root was successful.VcsConnectionStatus
getConnectionStatus(LVcsRootInstanceHolder buildType, VcsRoot root)
Returns last connection status for specified build configuration and VCS rootMap<BuildType,Collection<VcsRoot>>
getFailuresPerBuildType()
Returns map of build configuration and vcs root pairs where connection is failedboolean
isVcsRootHasGoodStatus(VcsRoot root)
Check if VCS root has good status in every configuration it attached toboolean
isVcsRootHasGoodStatus(VcsRoot root, Set<String> buildTypeIntIds)
Checks if the given VCS root has a good status in the build configurations with the internal id from the specified set.void
setLogger(VcsStatusLoggerImpl logger)
-
-
-
Method Detail
-
setLogger
public void setLogger(VcsStatusLoggerImpl logger)
-
connectionFailed
public void connectionFailed(@NotNull LVcsRootInstanceHolder buildType, @NotNull VcsRoot root, @NotNull Throwable problem)
Description copied from interface:LVcsStatusLogger
Notifies that connection is failed for specified VCS root and build configuration.- Specified by:
connectionFailed
in interfaceLVcsStatusLogger
- Parameters:
buildType
- build configuration for which to store connection status. If build configuration is null, then error is stored for all build configurations where this root is used.root
- VCS root for which to store connection statusproblem
- error
-
connectionFailed
public void connectionFailed(@NotNull Collection<LVcsRootInstanceHolder> buildTypes, @NotNull VcsRoot root, @NotNull Throwable problem)
Description copied from interface:LVcsStatusLogger
Notifies that connection is failed for specified VCS root and a number of build configurations.- Specified by:
connectionFailed
in interfaceLVcsStatusLogger
- Parameters:
buildTypes
- build configurations for which to update the connection status.root
- VCS root for which to update connection statusproblem
- error
-
connectionSuccessful
public void connectionSuccessful(@NotNull LVcsRootInstanceHolder buildType, @NotNull VcsRoot root)
Description copied from interface:LVcsStatusLogger
Clears last failure for specified VCS root and build configuration.- Specified by:
connectionSuccessful
in interfaceLVcsStatusLogger
- Parameters:
buildType
- build configuration to clear error for. If build configuration is null, then error is cleared for all build configurations where this root is used.root
- VCS root
-
getConnectionStatus
@NotNull public VcsConnectionStatus getConnectionStatus(@NotNull LVcsRootInstanceHolder buildType, @NotNull VcsRoot root)
Description copied from interface:LVcsStatusLogger
Returns last connection status for specified build configuration and VCS root- Specified by:
getConnectionStatus
in interfaceLVcsStatusLogger
- Parameters:
buildType
- build configurationroot
- VCS root- Returns:
- VCS connection status
-
isVcsRootHasGoodStatus
public boolean isVcsRootHasGoodStatus(@NotNull VcsRoot root)
Description copied from interface:LVcsStatusLogger
Check if VCS root has good status in every configuration it attached to- Specified by:
isVcsRootHasGoodStatus
in interfaceLVcsStatusLogger
- Parameters:
root
- VCS root of interest- Returns:
- see above
-
getFailuresPerBuildType
@NotNull public Map<BuildType,Collection<VcsRoot>> getFailuresPerBuildType()
Description copied from interface:VcsStatusProvider
Returns map of build configuration and vcs root pairs where connection is failed- Specified by:
getFailuresPerBuildType
in interfaceVcsStatusProvider
- Returns:
- see above
-
isVcsRootHasGoodStatus
public boolean isVcsRootHasGoodStatus(@NotNull VcsRoot root, @NotNull Set<String> buildTypeIntIds)
Description copied from interface:LVcsStatusLogger
Checks if the given VCS root has a good status in the build configurations with the internal id from the specified set. If there is no information about a status in some configuration it is assumed that status is good- Specified by:
isVcsRootHasGoodStatus
in interfaceLVcsStatusLogger
- Parameters:
root
- VCS root of interestbuildTypeIntIds
- ids of buildTypes where status should be checked- Returns:
- see above
-
currentStateFailedForVcsRoot
public void currentStateFailedForVcsRoot(@NotNull VcsRoot vcsRoot, @NotNull Throwable throwable)
Description copied from interface:LVcsStatusLogger
Should be called if attempt to get current state for the specified VCS root failed.- Specified by:
currentStateFailedForVcsRoot
in interfaceLVcsStatusLogger
- Parameters:
vcsRoot
- VCS rootthrowable
- if exception occurs
-
currentStateSuccessfulForVcsRoot
public void currentStateSuccessfulForVcsRoot(@NotNull VcsRoot vcsRoot)
Description copied from interface:LVcsStatusLogger
Should be called if attempt to get current state for the specified VCS root was successful.- Specified by:
currentStateSuccessfulForVcsRoot
in interfaceLVcsStatusLogger
- Parameters:
vcsRoot
- VCS root
-
-