summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/gitblit/manager')
-rw-r--r--src/main/java/com/gitblit/manager/FilestoreManager.java10
-rw-r--r--src/main/java/com/gitblit/manager/GitblitManager.java4
-rw-r--r--src/main/java/com/gitblit/manager/IFilestoreManager.java2
-rw-r--r--src/main/java/com/gitblit/manager/RepositoryManager.java8
4 files changed, 11 insertions, 13 deletions
diff --git a/src/main/java/com/gitblit/manager/FilestoreManager.java b/src/main/java/com/gitblit/manager/FilestoreManager.java
index 11108557..6ed7c929 100644
--- a/src/main/java/com/gitblit/manager/FilestoreManager.java
+++ b/src/main/java/com/gitblit/manager/FilestoreManager.java
@@ -78,8 +78,6 @@ public class FilestoreManager implements IFilestoreManager {
private final IRuntimeManager runtimeManager;
- private final IRepositoryManager repositoryManager;
-
private final IStoredSettings settings;
public static final int UNDEFINED_SIZE = -1;
@@ -94,11 +92,8 @@ public class FilestoreManager implements IFilestoreManager {
@Inject
- FilestoreManager(
- IRuntimeManager runtimeManager,
- IRepositoryManager repositoryManager) {
+ public FilestoreManager(IRuntimeManager runtimeManager) {
this.runtimeManager = runtimeManager;
- this.repositoryManager = repositoryManager;
this.settings = runtimeManager.getSettings();
}
@@ -328,9 +323,8 @@ public class FilestoreManager implements IFilestoreManager {
}
@Override
- public List<FilestoreModel> getAllObjects(UserModel user) {
+ public List<FilestoreModel> getAllObjects(List<RepositoryModel> viewableRepositories) {
- final List<RepositoryModel> viewableRepositories = repositoryManager.getRepositoryModels(user);
List<String> viewableRepositoryNames = new ArrayList<String>(viewableRepositories.size());
for (RepositoryModel repository : viewableRepositories) {
diff --git a/src/main/java/com/gitblit/manager/GitblitManager.java b/src/main/java/com/gitblit/manager/GitblitManager.java
index 85d5c19f..bda7a1cb 100644
--- a/src/main/java/com/gitblit/manager/GitblitManager.java
+++ b/src/main/java/com/gitblit/manager/GitblitManager.java
@@ -1274,8 +1274,8 @@ public class GitblitManager implements IGitblit {
}
@Override
- public List<FilestoreModel> getAllObjects(UserModel user) {
- return filestoreManager.getAllObjects(user);
+ public List<FilestoreModel> getAllObjects(List<RepositoryModel> viewableRepositories) {
+ return filestoreManager.getAllObjects(viewableRepositories);
}
@Override
diff --git a/src/main/java/com/gitblit/manager/IFilestoreManager.java b/src/main/java/com/gitblit/manager/IFilestoreManager.java
index 454331a3..7c3f3c6a 100644
--- a/src/main/java/com/gitblit/manager/IFilestoreManager.java
+++ b/src/main/java/com/gitblit/manager/IFilestoreManager.java
@@ -37,7 +37,7 @@ public interface IFilestoreManager extends IManager {
FilestoreModel.Status downloadBlob(String oid, UserModel user, RepositoryModel repo, OutputStream streamOut );
- List<FilestoreModel> getAllObjects(UserModel user);
+ List<FilestoreModel> getAllObjects(List<RepositoryModel> viewableRepositories);
File getStorageFolder();
diff --git a/src/main/java/com/gitblit/manager/RepositoryManager.java b/src/main/java/com/gitblit/manager/RepositoryManager.java
index e2e4de68..8d1a6a71 100644
--- a/src/main/java/com/gitblit/manager/RepositoryManager.java
+++ b/src/main/java/com/gitblit/manager/RepositoryManager.java
@@ -123,6 +123,8 @@ public class RepositoryManager implements IRepositoryManager {
private final IPluginManager pluginManager;
private final IUserManager userManager;
+
+ private final IFilestoreManager filestoreManager;
private File repositoriesFolder;
@@ -136,12 +138,14 @@ public class RepositoryManager implements IRepositoryManager {
public RepositoryManager(
IRuntimeManager runtimeManager,
IPluginManager pluginManager,
- IUserManager userManager) {
+ IUserManager userManager,
+ IFilestoreManager filestoreManager) {
this.settings = runtimeManager.getSettings();
this.runtimeManager = runtimeManager;
this.pluginManager = pluginManager;
this.userManager = userManager;
+ this.filestoreManager = filestoreManager;
}
@Override
@@ -1866,7 +1870,7 @@ public class RepositoryManager implements IRepositoryManager {
}
protected void configureLuceneIndexing() {
- luceneExecutor = new LuceneService(settings, this);
+ luceneExecutor = new LuceneService(settings, this, filestoreManager);
String frequency = settings.getString(Keys.web.luceneFrequency, "2 mins");
int mins = TimeUtils.convertFrequencyToMinutes(frequency, 2);
scheduledExecutor.scheduleAtFixedRate(luceneExecutor, 1, mins, TimeUnit.MINUTES);