mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
DebugFunc実装
This commit is contained in:
2 files changed
+30
-2
No files matched your search
@@ -1,4 +1,27 @@
|
|||||||
package one.nem.lacerta.data.impl;
|
package one.nem.lacerta.data.impl;
|
||||||
|
|
||||||
public class DebugFuncImpl {
|
import org.eclipse.jgit.lib.Repository;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import one.nem.lacerta.data.repository.DebugFunc;
|
||||||
|
import one.nem.lacerta.source.jgit.RepoUtils;
|
||||||
|
import one.nem.lacerta.utils.repository.FileUtils;
|
||||||
|
|
||||||
|
public class DebugFuncImpl implements DebugFunc {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public DebugFuncImpl() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
RepoUtils repoUtils;
|
||||||
|
|
||||||
|
public Repository getOrCreateRepositoryById(String id) {
|
||||||
|
Repository repo = repoUtils.getRepo(id); // TODO-rca: リポジトリの存在確認をもうすこしなんとかする
|
||||||
|
if (repo == null) {
|
||||||
|
repo = repoUtils.createRepo(id);
|
||||||
|
}
|
||||||
|
return repo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
package one.nem.lacerta.data.repository;
|
package one.nem.lacerta.data.repository;
|
||||||
|
|
||||||
public class DebugFunc {
|
import org.eclipse.jgit.lib.Repository;
|
||||||
|
|
||||||
|
public interface DebugFunc {
|
||||||
|
|
||||||
|
Repository getOrCreateRepositoryById(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user