diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/ManageRepo.java b/source/src/main/java/one/nem/lacerta/source/jgit/JGitRepository.java similarity index 60% rename from source/src/main/java/one/nem/lacerta/source/jgit/ManageRepo.java rename to source/src/main/java/one/nem/lacerta/source/jgit/JGitRepository.java index 8dd4dbfa..f3321abe 100644 --- a/source/src/main/java/one/nem/lacerta/source/jgit/ManageRepo.java +++ b/source/src/main/java/one/nem/lacerta/source/jgit/JGitRepository.java @@ -1,13 +1,11 @@ package one.nem.lacerta.source.jgit; -import org.eclipse.jgit.lib.Repository; - -public interface ManageRepo { +public interface JGitRepository { // リポジトリ取得 - Repository getRepository(String id); + org.eclipse.jgit.lib.Repository getRepository(String id); // リポジトリ作成 - Repository createRepository(String id); + org.eclipse.jgit.lib.Repository createRepository(String id); // リポジトリ削除 void deleteRepository(String id); // リポジトリ存在確認 diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/impl/ManageRepoImpl.java b/source/src/main/java/one/nem/lacerta/source/jgit/impl/JGitRepositoryImpl.java similarity index 80% rename from source/src/main/java/one/nem/lacerta/source/jgit/impl/ManageRepoImpl.java rename to source/src/main/java/one/nem/lacerta/source/jgit/impl/JGitRepositoryImpl.java index d1b9c845..570c6998 100644 --- a/source/src/main/java/one/nem/lacerta/source/jgit/impl/ManageRepoImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/jgit/impl/JGitRepositoryImpl.java @@ -1,25 +1,24 @@ package one.nem.lacerta.source.jgit.impl; -import one.nem.lacerta.source.jgit.ManageRepo; +import one.nem.lacerta.source.jgit.JGitRepository; import javax.inject.Inject; import one.nem.lacerta.utils.repository.DeviceInfoUtils; -import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryBuilder; -public class ManageRepoImpl implements ManageRepo { +public class JGitRepositoryImpl implements JGitRepository { private final DeviceInfoUtils deviceInfoUtils; @Inject - public ManageRepoImpl(DeviceInfoUtils deviceInfoUtils) { + public JGitRepositoryImpl(DeviceInfoUtils deviceInfoUtils) { this.deviceInfoUtils = deviceInfoUtils; } @Override - public Repository getRepository(String id) { + public org.eclipse.jgit.lib.Repository getRepository(String id) { RepositoryBuilder repositoryBuilder = new RepositoryBuilder(); repositoryBuilder.setGitDir(deviceInfoUtils.getExternalStorageDirectory().resolve(id).resolve(".git").toFile()); repositoryBuilder.setMustExist(true); @@ -31,7 +30,7 @@ public class ManageRepoImpl implements ManageRepo { } @Override - public Repository createRepository(String id) { + public org.eclipse.jgit.lib.Repository createRepository(String id) { RepositoryBuilder repositoryBuilder = new RepositoryBuilder(); repositoryBuilder.setGitDir(deviceInfoUtils.getExternalStorageDirectory().resolve(id).resolve(".git").toFile()); repositoryBuilder.setMustExist(false); diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/module/ManageRepoModule.java b/source/src/main/java/one/nem/lacerta/source/jgit/module/JGitRepositoryModule.java similarity index 50% rename from source/src/main/java/one/nem/lacerta/source/jgit/module/ManageRepoModule.java rename to source/src/main/java/one/nem/lacerta/source/jgit/module/JGitRepositoryModule.java index ff319888..4c9b8fde 100644 --- a/source/src/main/java/one/nem/lacerta/source/jgit/module/ManageRepoModule.java +++ b/source/src/main/java/one/nem/lacerta/source/jgit/module/JGitRepositoryModule.java @@ -4,13 +4,12 @@ import dagger.Binds; import dagger.Module; import dagger.hilt.InstallIn; import dagger.hilt.components.SingletonComponent; -import one.nem.lacerta.source.jgit.ManageRepo; -import one.nem.lacerta.source.jgit.impl.ManageRepoImpl; +import one.nem.lacerta.source.jgit.JGitRepository; @Module @InstallIn(SingletonComponent.class) -abstract public class ManageRepoModule { +abstract public class JGitRepositoryModule { @Binds - public abstract ManageRepo bindManageRepo(ManageRepoImpl manageRepoImpl); + public abstract JGitRepository bindManageRepo(one.nem.lacerta.source.jgit.impl.JGitRepositoryImpl manageRepoImpl); }