From b38ed7d59902fcaa782d2c768b9160f804d3d415 Mon Sep 17 00:00:00 2001 From: lukasz-jarocki-sonarsource Date: Thu, 31 Aug 2023 14:26:31 +0200 Subject: [PATCH] SONAR-19467 deprecated uuids in audit logs --- .../audit/model/AbstractEditorNewValue.java | 9 +++++++ .../db/audit/model/ComponentKeyNewValue.java | 8 ++++++ .../db/audit/model/ComponentNewValue.java | 9 +++++++ .../model/DevOpsPlatformSettingNewValue.java | 17 ++++++++++++ .../db/audit/model/GroupEditorNewValue.java | 9 +++++++ .../audit/model/GroupPermissionNewValue.java | 8 ++++++ .../db/audit/model/PermissionNewValue.java | 17 ++++++++++++ .../model/PermissionTemplateNewValue.java | 26 +++++++++++++++++++ .../model/PersonalAccessTokenNewValue.java | 17 ++++++++++++ .../sonar/db/audit/model/PluginNewValue.java | 9 +++++++ .../model/ProjectBadgeTokenNewValue.java | 5 ++++ .../db/audit/model/PropertyNewValue.java | 22 +++++++++++----- .../db/audit/model/UserEditorNewValue.java | 9 +++++++ .../db/audit/model/UserGroupNewValue.java | 18 +++++++++++++ .../sonar/db/audit/model/UserNewValue.java | 9 +++++++ .../audit/model/UserPermissionNewValue.java | 8 ++++++ .../db/audit/model/UserTokenNewValue.java | 17 ++++++++++++ .../sonar/db/audit/model/WebhookNewValue.java | 16 ++++++++++++ 18 files changed, 227 insertions(+), 6 deletions(-) diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/AbstractEditorNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/AbstractEditorNewValue.java index 9d14c9f4cfd..c0372fee485 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/AbstractEditorNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/AbstractEditorNewValue.java @@ -23,6 +23,11 @@ import javax.annotation.CheckForNull; import javax.annotation.Nullable; public abstract class AbstractEditorNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable protected String qualityGateUuid; @Nullable @@ -32,6 +37,10 @@ public abstract class AbstractEditorNewValue extends NewValue { @Nullable protected String qualityProfileName; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getQualityGateUuid() { return this.qualityGateUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ComponentKeyNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ComponentKeyNewValue.java index 0a719a70d5c..d3a4088d37b 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ComponentKeyNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ComponentKeyNewValue.java @@ -23,6 +23,10 @@ import static com.google.common.base.Preconditions.checkNotNull; public class ComponentKeyNewValue extends NewValue { + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") private final String componentUuid; private final String oldKey; private final String newKey; @@ -34,6 +38,10 @@ public class ComponentKeyNewValue extends NewValue { this.newKey = newKey; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") public String getComponentUuid() { return componentUuid; } diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ComponentNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ComponentNewValue.java index db3d124b643..abd712a15e6 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ComponentNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ComponentNewValue.java @@ -28,6 +28,11 @@ import org.sonar.db.project.ProjectDto; import static java.util.Objects.requireNonNull; public class ComponentNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") private final String componentUuid; private final String componentKey; private final String componentName; @@ -72,6 +77,10 @@ public class ComponentNewValue extends NewValue { this.qualifier = qualifier; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") public String getComponentUuid() { return componentUuid; } diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/DevOpsPlatformSettingNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/DevOpsPlatformSettingNewValue.java index a9a37a3e64b..58e522949e1 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/DevOpsPlatformSettingNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/DevOpsPlatformSettingNewValue.java @@ -27,6 +27,11 @@ import org.sonar.db.alm.setting.ProjectAlmSettingDto; import org.sonar.db.project.ProjectDto; public class DevOpsPlatformSettingNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String devOpsPlatformSettingUuid; @@ -45,6 +50,10 @@ public class DevOpsPlatformSettingNewValue extends NewValue { @Nullable private String clientId; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String projectUuid; @@ -98,6 +107,10 @@ public class DevOpsPlatformSettingNewValue extends NewValue { this.projectName = projectDto.getName(); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getDevOpsPlatformSettingUuid() { return this.devOpsPlatformSettingUuid; @@ -128,6 +141,10 @@ public class DevOpsPlatformSettingNewValue extends NewValue { return this.clientId; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getProjectUuid() { return this.projectUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/GroupEditorNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/GroupEditorNewValue.java index f8d6e1674ae..bbecb0ae60e 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/GroupEditorNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/GroupEditorNewValue.java @@ -28,6 +28,11 @@ import org.sonar.db.qualityprofile.QProfileEditGroupsDto; import org.sonar.db.user.GroupDto; public class GroupEditorNewValue extends AbstractEditorNewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String groupUuid; @Nullable @@ -76,6 +81,10 @@ public class GroupEditorNewValue extends AbstractEditorNewValue { this.qualityProfileName = qualityProfileDto.getName(); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getGroupUuid() { return this.groupUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/GroupPermissionNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/GroupPermissionNewValue.java index a849fdf29b4..945478d7018 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/GroupPermissionNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/GroupPermissionNewValue.java @@ -25,6 +25,10 @@ import org.sonar.db.permission.template.PermissionTemplateDto; public class GroupPermissionNewValue extends PermissionNewValue { + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String groupUuid; @@ -45,6 +49,10 @@ public class GroupPermissionNewValue extends PermissionNewValue { this(dto.getUuid(), dto.getEntityUuid(), componentKey, dto.getEntityName(), dto.getRole(), dto.getGroupUuid(), dto.getGroupName(), qualifier, permissionTemplate); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable public String getGroupUuid() { return groupUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PermissionNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PermissionNewValue.java index 439a639799b..4eec988c048 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PermissionNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PermissionNewValue.java @@ -24,9 +24,18 @@ import javax.annotation.Nullable; import org.sonar.db.permission.template.PermissionTemplateDto; public abstract class PermissionNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable protected String permissionUuid; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable protected String componentUuid; @@ -60,11 +69,19 @@ public abstract class PermissionNewValue extends NewValue { this.permissionTemplateName = permissionTemplateDto == null ? null : permissionTemplateDto.getName(); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getPermissionUuid() { return this.permissionUuid; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getComponentUuid() { return this.componentUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PermissionTemplateNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PermissionTemplateNewValue.java index 36333d24bd7..7dc81d587ef 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PermissionTemplateNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PermissionTemplateNewValue.java @@ -25,6 +25,11 @@ import org.apache.commons.lang.ObjectUtils; import org.sonar.db.permission.template.PermissionTemplateDto; public class PermissionTemplateNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") private String templateUuid; private String name; @@ -37,12 +42,21 @@ public class PermissionTemplateNewValue extends NewValue { @Nullable private String permission; + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String userUuid; @Nullable private String userLogin; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String groupUuid; @@ -82,6 +96,10 @@ public class PermissionTemplateNewValue extends NewValue { this.withProjectCreator = withProjectCreator; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") public String getTemplateUuid() { return this.templateUuid; } @@ -105,6 +123,10 @@ public class PermissionTemplateNewValue extends NewValue { return this.permission; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getUserUuid() { return this.userUuid; @@ -115,6 +137,10 @@ public class PermissionTemplateNewValue extends NewValue { return this.userLogin; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getGroupUuid() { return this.groupUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PersonalAccessTokenNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PersonalAccessTokenNewValue.java index 55c41dd62b6..2596e936de4 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PersonalAccessTokenNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PersonalAccessTokenNewValue.java @@ -26,9 +26,18 @@ import org.sonar.db.alm.setting.AlmSettingDto; import org.sonar.db.user.UserDto; public class PersonalAccessTokenNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String patUuid; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String userUuid; @@ -59,11 +68,19 @@ public class PersonalAccessTokenNewValue extends NewValue { this.almSettingKey = almSettingDto.getKey(); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getPatUuid() { return this.patUuid; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getUserUuid() { return this.userUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PluginNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PluginNewValue.java index 845292c8f7e..465d28aa432 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PluginNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PluginNewValue.java @@ -22,6 +22,11 @@ package org.sonar.db.audit.model; import org.sonar.db.plugin.PluginDto; public class PluginNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") private final String pluginUuid; private final String kee; private final String basePluginKey; @@ -34,6 +39,10 @@ public class PluginNewValue extends NewValue { this.type = pluginDto.getType().name(); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") public String getPluginUuid() { return this.pluginUuid; } diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ProjectBadgeTokenNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ProjectBadgeTokenNewValue.java index 1e3635ff8bf..26f5a0d930f 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ProjectBadgeTokenNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/ProjectBadgeTokenNewValue.java @@ -22,6 +22,11 @@ package org.sonar.db.audit.model; public class ProjectBadgeTokenNewValue extends NewValue { private final String projectKey; + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") private final String userUuid; private final String userLogin; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PropertyNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PropertyNewValue.java index ccf0e3d1e0c..e6eaf0ec0e7 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PropertyNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/PropertyNewValue.java @@ -29,12 +29,20 @@ public class PropertyNewValue extends NewValue { @Nullable private String propertyValue; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String userUuid; @Nullable private String userLogin; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String componentUuid; @@ -63,12 +71,6 @@ public class PropertyNewValue extends NewValue { this.propertyKey = propertyKey; } - public PropertyNewValue(String propertyKey, @Nullable String userUuid, String userLogin) { - this.propertyKey = propertyKey; - this.userUuid = userUuid; - this.userLogin = userLogin; - } - public PropertyNewValue(String propertyKey, String propertyValue) { this.propertyKey = propertyKey; @@ -94,6 +96,10 @@ public class PropertyNewValue extends NewValue { return this.propertyValue; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getUserUuid() { return this.userUuid; @@ -104,6 +110,10 @@ public class PropertyNewValue extends NewValue { return this.userLogin; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getComponentUuid() { return this.componentUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserEditorNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserEditorNewValue.java index fb581f9c03d..210a7bbbcb7 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserEditorNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserEditorNewValue.java @@ -28,6 +28,11 @@ import org.sonar.db.qualityprofile.QProfileEditUsersDto; import org.sonar.db.user.UserDto; public class UserEditorNewValue extends AbstractEditorNewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String userUuid; @Nullable @@ -76,6 +81,10 @@ public class UserEditorNewValue extends AbstractEditorNewValue { this.qualityProfileName = qProfileDto.getName(); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getUserUuid() { return this.userUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserGroupNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserGroupNewValue.java index 9476579ab94..447bd9c1cef 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserGroupNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserGroupNewValue.java @@ -28,8 +28,18 @@ import org.sonar.db.user.UserGroupDto; import static com.google.common.base.Preconditions.checkState; public class UserGroupNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") private final String groupUuid; private final String name; + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") private final String userUuid; private final String userLogin; private final String description; @@ -63,6 +73,10 @@ public class UserGroupNewValue extends NewValue { this.description = description; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getGroupUuid() { return this.groupUuid; @@ -78,6 +92,10 @@ public class UserGroupNewValue extends NewValue { return this.description; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getUserUuid() { return this.userUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserNewValue.java index 4f83bf3cc1e..518fe321d76 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserNewValue.java @@ -30,6 +30,11 @@ import org.sonar.db.user.UserDto; import static java.util.Objects.requireNonNull; public class UserNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") private String userUuid; private String userLogin; @@ -78,6 +83,10 @@ public class UserNewValue extends NewValue { this.lastConnectionDate = userDto.getLastConnectionDate(); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") public String getUserUuid() { return this.userUuid; } diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserPermissionNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserPermissionNewValue.java index ed851470f05..3a108f450d7 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserPermissionNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserPermissionNewValue.java @@ -26,6 +26,10 @@ import org.sonar.db.user.UserId; public class UserPermissionNewValue extends PermissionNewValue { + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private final String userUuid; @@ -50,6 +54,10 @@ public class UserPermissionNewValue extends PermissionNewValue { this.userLogin = userId != null ? userId.getLogin() : null; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable public String getUserUuid() { return userUuid; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserTokenNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserTokenNewValue.java index e5c9215e93d..4eb4ed8612c 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserTokenNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserTokenNewValue.java @@ -27,9 +27,18 @@ import org.sonar.db.user.UserDto; import org.sonar.db.user.UserTokenDto; public class UserTokenNewValue extends NewValue { + + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String tokenUuid; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String userUuid; @@ -73,11 +82,19 @@ public class UserTokenNewValue extends NewValue { this.type = TokenType.PROJECT_ANALYSIS_TOKEN.name(); } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getTokenUuid() { return this.tokenUuid; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") public String getUserUuid() { return this.userUuid; } diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/WebhookNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/WebhookNewValue.java index 32c538cfd90..72d5e0eef7f 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/WebhookNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/WebhookNewValue.java @@ -26,6 +26,10 @@ import org.sonar.db.project.ProjectDto; import org.sonar.db.webhook.WebhookDto; public class WebhookNewValue extends NewValue { + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String webhookUuid; @@ -35,6 +39,10 @@ public class WebhookNewValue extends NewValue { @Nullable private String url; + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @Nullable private String projectUuid; @@ -75,6 +83,10 @@ public class WebhookNewValue extends NewValue { } } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getWebhookUuid() { return this.webhookUuid; @@ -90,6 +102,10 @@ public class WebhookNewValue extends NewValue { return this.url; } + /** + * @deprecated The uuids in the audit logs are not product requirement anymore and will be removed in 11.x + */ + @Deprecated(since = "10.2") @CheckForNull public String getProjectUuid() { return this.projectUuid; -- 2.39.5