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 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: ApplicationRepositoryResolver
      Gets the Repository for the supplied Application. This simply returns the instance of Repository. 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 no Repository exists, this must create the repository.
      Specified by:
      resolve in interface ApplicationRepositoryResolver
      Parameters:
      application - the Application
      onCreate - called when the application was created
      Returns:
      the Repository, never null
      Throws:
      Exception
    • getGitStorageDirectory

      public File getGitStorageDirectory()
    • initDirectory

      @Inject public void initDirectory(@Named("dev.getelements.elements.rt.git.element.storage.directory") File gitStorageDirectory)