Interface GitApplicationAssetLoader

All Superinterfaces:
ApplicationAssetLoader
All Known Implementing Classes:
FilesystemGitApplicationAssetLoader

public interface GitApplicationAssetLoader extends ApplicationAssetLoader
The GitLoader takes a clone of an existing git repository, and allows downstream code access to that directory. Created by patricktwohig on 8/22/17.
  • Field Details

    • GIT_SUFFIX

      static final String GIT_SUFFIX
      The git directory suffix.
      See Also:
    • DEFAULT_MAIN_BRANCH

      static final String DEFAULT_MAIN_BRANCH
      The main branch from which to fetch the code. The underlying GitApplicationAssetLoader will ignore all other branches, except this one, when fetching code. It should be noted that this may become obsolte if application configuration allows for specific branches or commits to be used as the reference for the ApplicationId that is associated with the code.
      See Also:
  • Method Details

    • performInGit

      default void performInGit(String applicationUniqueName, BiConsumer<org.eclipse.jgit.api.Git,Path> gitConsumer)
      Opens a Git instance for the supplied ApplicationId which can be used to manipulate the various files within the repository. When call returns the supplied Git instance will be closed. to understand how this method interprets the first parameter.
      Parameters:
      applicationUniqueName - the ApplicationId for which to open a Git instance
      gitConsumer - consumes an instance of Git which will be used to perform the desired actions
    • performInGit

      void performInGit(ApplicationId applicationId, BiConsumer<org.eclipse.jgit.api.Git,Path> gitConsumer)
      Opens a Git instance for the supplied ApplicationId which can be used to manipulate the various files within the repository. When call returns the supplied Git instance will be closed.
      Parameters:
      applicationId - the ApplicationId for which to open a Git instance
      gitConsumer - consumes an instance of Git which will be used to perform the desired actions