diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-07-06 10:36:56 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-07-07 17:06:59 +0200 |
commit | 609bdc851ceaa1dff0e710cda136514a9d704ba2 (patch) | |
tree | 76ba796847bd6167eb428583795c3ecfb52cf5e1 | |
parent | 5c9080278cd5a8fffbe7997f058361b8bff1ecfd (diff) | |
download | sonarqube-609bdc851ceaa1dff0e710cda136514a9d704ba2.tar.gz sonarqube-609bdc851ceaa1dff0e710cda136514a9d704ba2.zip |
SONAR-7692 restore JRubyFacade#indexResource as indexComponent
this method is used by Developer Cockpit
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java index 0644d65efb2..8760f480ac9 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java @@ -46,6 +46,8 @@ import org.sonar.core.platform.PluginInfo; import org.sonar.core.platform.PluginRepository; import org.sonar.core.timemachine.Periods; import org.sonar.db.Database; +import org.sonar.db.DbClient; +import org.sonar.db.DbSession; import org.sonar.db.version.DatabaseMigration; import org.sonar.db.version.DatabaseVersion; import org.sonar.process.ProcessProperties; @@ -351,6 +353,16 @@ public final class JRubyFacade { return !database.getDialect().supportsMigration(); } + /** + * Used by Developer Cockpit + */ + public void indexComponent(String componentUuid) { + DbClient dbClient = get(DbClient.class); + try (DbSession dbSession = dbClient.openSession(false)) { + dbClient.componentIndexDao().indexResource(dbSession, componentUuid); + } + } + public List<IdentityProvider> getIdentityProviders(){ return get(IdentityProviderRepository.class).getAllEnabledAndSorted(); } |