org.sonar.db.webhook.WebhookDeliveryDao.deleteByWebhook()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.sonar.db.webhook.WebhookDeliveryDao.deleteByWebhook()方法的一些代码示例,展示了WebhookDeliveryDao.deleteByWebhook()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebhookDeliveryDao.deleteByWebhook()方法的具体详情如下:
包路径:org.sonar.db.webhook.WebhookDeliveryDao
类名称:WebhookDeliveryDao
方法名:deleteByWebhook

WebhookDeliveryDao.deleteByWebhook介绍

暂无

代码示例

代码示例来源:origin: SonarSource/sonarqube

private void deleteWebhook(DbSession dbSession, WebhookDto webhookDto) {
 dbClient.webhookDeliveryDao().deleteByWebhook(dbSession, webhookDto);
 dbClient.webhookDao().delete(dbSession, webhookDto.getUuid());
}

代码示例来源:origin: SonarSource/sonarqube

private void deleteOrganization(DbSession dbSession, OrganizationDto organization) {
 Collection<String> uuids = dbClient.organizationMemberDao().selectUserUuidsByOrganizationUuid(dbSession, organization.getUuid());
 dbClient.organizationMemberDao().deleteByOrganizationUuid(dbSession, organization.getUuid());
 dbClient.organizationDao().deleteByUuid(dbSession, organization.getUuid());
 dbClient.userDao().cleanHomepage(dbSession, organization);
 dbClient.webhookDao().selectByOrganizationUuid(dbSession, organization.getUuid())
  .forEach(wh -> dbClient.webhookDeliveryDao().deleteByWebhook(dbSession, wh));
 dbClient.webhookDao().deleteByOrganization(dbSession, organization);
 List<UserDto> users = dbClient.userDao().selectByUuids(dbSession, uuids);
 userIndexer.commitAndIndex(dbSession, users);
}

代码示例来源:origin: org.sonarsource.sonarqube/sonar-server

private void deleteProjects(DbSession dbSession, OrganizationDto organization) {
 List<ComponentDto> roots = dbClient.componentDao().selectAllRootsByOrganization(dbSession, organization.getUuid());
 roots.forEach(project -> dbClient.webhookDao().selectByProject(dbSession, project)
  .forEach(wh -> dbClient.webhookDeliveryDao().deleteByWebhook(dbSession, wh)));
 roots.forEach(project -> dbClient.webhookDao().deleteByProject(dbSession, project));
 try {
  componentCleanerService.delete(dbSession, roots);
 } finally {
  Set<Project> projects = roots.stream()
   .filter(DeleteAction::isMainProject)
   .map(Project::from)
   .collect(MoreCollectors.toSet());
  projectLifeCycleListeners.onProjectsDeleted(projects);
 }
}

代码示例来源:origin: org.sonarsource.sonarqube/sonar-server

private void deleteWebhook(DbSession dbSession, WebhookDto webhookDto) {
 dbClient.webhookDeliveryDao().deleteByWebhook(dbSession, webhookDto);
 dbClient.webhookDao().delete(dbSession, webhookDto.getUuid());
}

代码示例来源:origin: org.sonarsource.sonarqube/sonar-server

public void delete(DbSession dbSession, ComponentDto project) {
 checkArgument(!hasNotProjectScope(project) && !isNotDeletable(project) && project.getMainBranchProjectUuid() == null, "Only projects can be deleted");
 dbClient.purgeDao().deleteProject(dbSession, project.uuid());
 dbClient.userDao().cleanHomepage(dbSession, project);
 dbClient.webhookDao().selectByProject(dbSession, project)
  .forEach(wh -> dbClient.webhookDeliveryDao().deleteByWebhook(dbSession, wh));
 dbClient.webhookDao().deleteByProject(dbSession, project);
 projectIndexers.commitAndIndex(dbSession, singletonList(project), ProjectIndexer.Cause.PROJECT_DELETION);
}

代码示例来源:origin: org.sonarsource.sonarqube/sonar-server

private void deleteOrganization(DbSession dbSession, OrganizationDto organization) {
 Collection<String> uuids = dbClient.organizationMemberDao().selectUserUuidsByOrganizationUuid(dbSession, organization.getUuid());
 dbClient.organizationMemberDao().deleteByOrganizationUuid(dbSession, organization.getUuid());
 dbClient.organizationDao().deleteByUuid(dbSession, organization.getUuid());
 dbClient.userDao().cleanHomepage(dbSession, organization);
 dbClient.webhookDao().selectByOrganizationUuid(dbSession, organization.getUuid())
  .forEach(wh -> dbClient.webhookDeliveryDao().deleteByWebhook(dbSession, wh));
 dbClient.webhookDao().deleteByOrganization(dbSession, organization);
 List<UserDto> users = dbClient.userDao().selectByUuids(dbSession, uuids);
 userIndexer.commitAndIndex(dbSession, users);
}

相关文章