diff options
-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(); } |