mirror of
				https://github.com/lacerta-doc/Lacerta.git
				synced 2025-10-31 15:30:49 +00:00 
			
		
		
		
	DebugFunc実装
This commit is contained in:
		
							parent
							
								
									ef6431afbc
								
							
						
					
					
						commit
						31fcdd788a
					
				| @ -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); | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user