Package dev.getelements.elements.git
Class FileSystemApplicationRepositoryResolver
java.lang.Object
dev.getelements.elements.git.FileSystemApplicationRepositoryResolver
- All Implemented Interfaces:
ApplicationRepositoryResolver
public class FileSystemApplicationRepositoryResolver
extends Object
implements ApplicationRepositoryResolver
This loads an instance of
Repository from a place on the filesystem.
Created by patricktwohig on 8/2/17.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitDirectory(File gitStorageDirectory) org.eclipse.jgit.lib.Repositoryresolve(Application application, Consumer<org.eclipse.jgit.lib.Repository> onCreate) Gets theRepositoryfor the suppliedApplication.
-
Constructor Details
-
FileSystemApplicationRepositoryResolver
public FileSystemApplicationRepositoryResolver()
-
-
Method Details
-
resolve
public org.eclipse.jgit.lib.Repository resolve(Application application, Consumer<org.eclipse.jgit.lib.Repository> onCreate) throws Exception Description copied from interface:ApplicationRepositoryResolverGets theRepositoryfor the suppliedApplication. This simply returns the instance ofRepository. It is safe to assume this method will be called after the necessary security checks, therefore any security checking in this method would be redundant. If noRepositoryexists, this must create the repository.- Specified by:
resolvein interfaceApplicationRepositoryResolver- Parameters:
application- theApplicationonCreate- called when the application was created- Returns:
- the
Repository, never null - Throws:
Exception
-
getGitStorageDirectory
-
initDirectory
@Inject public void initDirectory(@Named("dev.getelements.elements.rt.git.element.storage.directory") File gitStorageDirectory)
-