import org.sonar.core.platform.PluginRepository;
import org.sonar.core.timemachine.Periods;
import org.sonar.db.Database;
+import org.sonar.db.component.ResourceIndexDao;
import org.sonar.db.version.DatabaseMigration;
import org.sonar.db.version.DatabaseVersion;
import org.sonar.process.ProcessProperties;
Database database = container.getComponentByType(Database.class);
return !database.getDialect().supportsMigration();
}
+
+ /**
+ * Used by Developer Cockpit
+ */
+ public void indexResource(long resourceId) {
+ get(ResourceIndexDao.class).indexResource(resourceId);
+ }
+
}
}
}
+ public boolean indexResource(long id) {
+ DbSession session = myBatis().openSession(false);
+ try {
+ return indexResource(session, id);
+ } finally {
+ MyBatis.closeQuietly(session);
+ }
+ }
+
public boolean indexResource(DbSession session, long id) {
boolean indexed = false;
ResourceIndexMapper mapper = session.getMapper(ResourceIndexMapper.class);