Class VcsStatusLoggerImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.VcsStatusLoggerImpl
-
- All Implemented Interfaces:
LVcsStatusLogger,VcsStatusLogger
public class VcsStatusLoggerImpl extends Object implements VcsStatusLogger
Created 21.08.13 14:41- Author:
- Eugene Petrenko (eugene.petrenko@jetbrains.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringVCS_ROOT_INFO_PATTERN
-
Constructor Summary
Constructors Constructor Description VcsStatusLoggerImpl(MultiNodesEvents multiNodesEvents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectionFailed(Collection<LVcsRootInstanceHolder> buildTypes, VcsRoot root, Throwable problem)Notifies that connection is failed for specified VCS root and a number of build configurations.voidconnectionFailed(LVcsRootInstanceHolder buildType, VcsRoot root, Throwable problem)Notifies that connection is failed for specified VCS root and build configuration.voidconnectionSuccessful(LVcsRootInstanceHolder buildType, VcsRoot root)Clears last failure for specified VCS root and build configuration.voidcurrentStateFailedForVcsRoot(VcsRoot vcsRoot, Throwable throwable)Should be called if attempt to get current state for the specified VCS root failed.voidcurrentStateSuccessfulForVcsRoot(VcsRoot vcsRoot)Should be called if attempt to get current state for the specified VCS root was successful.VcsConnectionStatusgetConnectionStatus(LVcsRootInstanceHolder buildType, VcsRoot root)Returns last connection status for specified build configuration and VCS rootMap<BuildType,Collection<VcsRoot>>getFailuresPerBuildType()booleanisVcsRootHasGoodStatus(VcsRoot root)Check if VCS root has good status in every configuration it attached tobooleanisVcsRootHasGoodStatus(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.voidsetCheckingForChangesScheduler(CheckingForChangesScheduler checkingForChangesScheduler)voidsetEventDispatcher(EventDispatcher<BuildServerListener> eventDispatcher)voidsetProblemNotification(SystemProblemNotification problemNotification)voidsetProjectManager(ProjectManager projectManager)voidsetVcsRootInstancesManager(VcsRootInstancesManager vcsRootInstancesManager)voidsetVersionedSettingsManager(VersionedSettingsManager versionedSettingsManager)
-
-
-
Field Detail
-
VCS_ROOT_INFO_PATTERN
public static final String VCS_ROOT_INFO_PATTERN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VcsStatusLoggerImpl
public VcsStatusLoggerImpl(@NotNull MultiNodesEvents multiNodesEvents)
-
-
Method Detail
-
setVersionedSettingsManager
public void setVersionedSettingsManager(@NotNull VersionedSettingsManager versionedSettingsManager)
-
setProblemNotification
public void setProblemNotification(@NotNull SystemProblemNotification problemNotification)
-
setProjectManager
public void setProjectManager(@NotNull ProjectManager projectManager)
-
setVcsRootInstancesManager
public void setVcsRootInstancesManager(VcsRootInstancesManager vcsRootInstancesManager)
-
setEventDispatcher
public void setEventDispatcher(@NotNull EventDispatcher<BuildServerListener> eventDispatcher)
-
setCheckingForChangesScheduler
public void setCheckingForChangesScheduler(@NotNull CheckingForChangesScheduler checkingForChangesScheduler)
-
connectionFailed
public void connectionFailed(@NotNull LVcsRootInstanceHolder buildType, @NotNull VcsRoot root, @NotNull Throwable problem)Description copied from interface:LVcsStatusLoggerNotifies that connection is failed for specified VCS root and build configuration.- Specified by:
connectionFailedin 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:LVcsStatusLoggerNotifies that connection is failed for specified VCS root and a number of build configurations.- Specified by:
connectionFailedin 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:LVcsStatusLoggerClears last failure for specified VCS root and build configuration.- Specified by:
connectionSuccessfulin 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:LVcsStatusLoggerReturns last connection status for specified build configuration and VCS root- Specified by:
getConnectionStatusin interfaceLVcsStatusLogger- Parameters:
buildType- build configurationroot- VCS root- Returns:
- VCS connection status
-
isVcsRootHasGoodStatus
public boolean isVcsRootHasGoodStatus(@NotNull VcsRoot root)Description copied from interface:LVcsStatusLoggerCheck if VCS root has good status in every configuration it attached to- Specified by:
isVcsRootHasGoodStatusin interfaceLVcsStatusLogger- Parameters:
root- VCS root of interest- Returns:
- see above
-
isVcsRootHasGoodStatus
public boolean isVcsRootHasGoodStatus(@NotNull VcsRoot root, @NotNull Set<String> buildTypeIntIds)Description copied from interface:LVcsStatusLoggerChecks 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:
isVcsRootHasGoodStatusin 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:LVcsStatusLoggerShould be called if attempt to get current state for the specified VCS root failed.- Specified by:
currentStateFailedForVcsRootin interfaceLVcsStatusLogger- Parameters:
vcsRoot- VCS rootthrowable- if exception occurs
-
currentStateSuccessfulForVcsRoot
public void currentStateSuccessfulForVcsRoot(@NotNull VcsRoot vcsRoot)Description copied from interface:LVcsStatusLoggerShould be called if attempt to get current state for the specified VCS root was successful.- Specified by:
currentStateSuccessfulForVcsRootin interfaceLVcsStatusLogger- Parameters:
vcsRoot- VCS root
-
getFailuresPerBuildType
@NotNull public Map<BuildType,Collection<VcsRoot>> getFailuresPerBuildType()
-
-