Class VersionedSettingsUpdaterImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.versionedSettings.VersionedSettingsUpdaterImpl
-
- All Implemented Interfaces:
VersionedSettingsUpdater
public class VersionedSettingsUpdaterImpl extends Object implements VersionedSettingsUpdater
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXECUTOR_NAME
static String
PENDING_UI_CHANGES_MSG
static String
PENDING_UI_COMMIT_MSG_PREFIX
static String
UPDATE_FROM_VCS_TASK
-
Constructor Summary
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSettingsUpdateInProgress(String projectExtId)
Returns true if project's settings are being updatedvoid
runAsUpdateFromVcs(String projectExtId, Runnable action)
Runs the given action with projectExtId marked as being updated from VCS:VersionedSettingsUpdater.isSettingsUpdateInProgress(String)
will return true for the specified projectExtId if called inside the action.void
scheduleUpdateFromVcs(VersionedSettingsUpdateConfig config, Supplier<String> skipReasonSupplier)
Schedules update from VCS with the given config.void
updateFromVcs(VersionedSettingsUpdateConfig config, Supplier<String> skipReasonSupplier)
Update TeamCity settings from VCS according to given config
-
-
-
Field Detail
-
PENDING_UI_CHANGES_MSG
public static final String PENDING_UI_CHANGES_MSG
- See Also:
- Constant Field Values
-
PENDING_UI_COMMIT_MSG_PREFIX
public static final String PENDING_UI_COMMIT_MSG_PREFIX
- See Also:
- Constant Field Values
-
UPDATE_FROM_VCS_TASK
public static final String UPDATE_FROM_VCS_TASK
- See Also:
- Constant Field Values
-
EXECUTOR_NAME
public static final String EXECUTOR_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VersionedSettingsUpdaterImpl
public VersionedSettingsUpdaterImpl(@NotNull ProjectManager projectManager, @NotNull ProjectManagerErrors projectManagerErrors, @NotNull ProjectIdentifiersManager projectIdentifiersManager, @NotNull VcsModificationHistoryEx vcsHistory, @NotNull VersionedSettingsManager versionedSettingsManager, @NotNull VersionedSettingsStatusTracker statusTracker, @NotNull VersionedSettingsRegistryEx versionedSettingsRegistry, @NotNull ConfigFilesUpdater configFilesUpdater, @NotNull CurrentVersionTracker currentVersionTracker, @NotNull VersionedSettingsOptions options, @NotNull VersionedSettingsConfigErrorHealthReport healthReport, @NotNull ServerPaths serverPaths, @NotNull TeamCityCommits teamCityCommits, @NotNull VersionedSettingsPendingTransactions pendingTransactions, @NotNull VersionedSettingsContentManager versionedSettingsContentManager, @NotNull ProjectSettingsGeneratorRegistry projectSettingsGeneratorRegistry, @NotNull ProjectsWatcher projectsWatcher, @NotNull ConverterChangesStorage converterChangesStorage, @NotNull OutdatedProjectSettingsHealthReport outdatedProjectSettingsHealthReport, @NotNull DeletedEntityTracker deletedEntityTracker, @NotNull ProjectsBuilderFactory projectsBuilderFactory, @NotNull AuditLogFactory auditLogFactory, @NotNull EventDispatcher<BuildServerListener> eventDispatcher, @NotNull ServerResponsibility serverResponsibility, @NotNull VcsRootInstancesManager vcsRootInstancesManager, @NotNull UserModel userModel, @NotNull MultiNodeTasks multiNodeTasks, @NotNull MultiNodesEvents multiNodesEvents, @NotNull VersionedSettingsFreezer versionedSettingsFreezer, @NotNull ProjectEventsNotifier projectEventsNotifier, @NotNull ServerMetrics serverMetrics)
-
-
Method Detail
-
updateFromVcs
public void updateFromVcs(@NotNull VersionedSettingsUpdateConfig config, @Nullable Supplier<String> skipReasonSupplier)
Description copied from interface:VersionedSettingsUpdater
Update TeamCity settings from VCS according to given config- Specified by:
updateFromVcs
in interfaceVersionedSettingsUpdater
- Parameters:
config
- update configurationskipReasonSupplier
- if not null this supplier will be called during the update process, if it returns not null String then update will be cancelled and this String will be used as a reason of the cancellation
-
scheduleUpdateFromVcs
public void scheduleUpdateFromVcs(@NotNull VersionedSettingsUpdateConfig config, @Nullable Supplier<String> skipReasonSupplier)
Description copied from interface:VersionedSettingsUpdater
Schedules update from VCS with the given config. The method will return immediately and operation will be performed in background.- Specified by:
scheduleUpdateFromVcs
in interfaceVersionedSettingsUpdater
-
isSettingsUpdateInProgress
public boolean isSettingsUpdateInProgress(@NotNull String projectExtId)
Description copied from interface:VersionedSettingsUpdater
Returns true if project's settings are being updated- Specified by:
isSettingsUpdateInProgress
in interfaceVersionedSettingsUpdater
- Parameters:
projectExtId
- project's external id- Returns:
- see above
-
runAsUpdateFromVcs
public void runAsUpdateFromVcs(@NotNull String projectExtId, @NotNull Runnable action)
Description copied from interface:VersionedSettingsUpdater
Runs the given action with projectExtId marked as being updated from VCS:VersionedSettingsUpdater.isSettingsUpdateInProgress(String)
will return true for the specified projectExtId if called inside the action.- Specified by:
runAsUpdateFromVcs
in interfaceVersionedSettingsUpdater
-
-