Package dev.getelements.elements.rt.git
Interface GitApplicationAssetLoader
- All Superinterfaces:
ApplicationAssetLoader
- All Known Implementing Classes:
FilesystemGitApplicationAssetLoader
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe main branch from which to fetch the code.static final StringThe git directory suffix.Fields inherited from interface dev.getelements.elements.sdk.cluster.ApplicationAssetLoader
ELEMENT_STORAGE -
Method Summary
Modifier and TypeMethodDescriptionvoidperformInGit(ApplicationId applicationId, BiConsumer<org.eclipse.jgit.api.Git, Path> gitConsumer) Opens aGitinstance for the suppliedApplicationIdwhich can be used to manipulate the various files within the repository.default voidperformInGit(String applicationUniqueName, BiConsumer<org.eclipse.jgit.api.Git, Path> gitConsumer) Opens aGitinstance for the suppliedApplicationIdwhich can be used to manipulate the various files within the repository.Methods inherited from interface dev.getelements.elements.sdk.cluster.ApplicationAssetLoader
getAssetPath, getAssetPath
-
Field Details
-
GIT_SUFFIX
The git directory suffix.- See Also:
-
DEFAULT_MAIN_BRANCH
The main branch from which to fetch the code. The underlyingGitApplicationAssetLoaderwill 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 theApplicationIdthat is associated with the code.- See Also:
-
-
Method Details
-
performInGit
default void performInGit(String applicationUniqueName, BiConsumer<org.eclipse.jgit.api.Git, Path> gitConsumer) Opens aGitinstance for the suppliedApplicationIdwhich can be used to manipulate the various files within the repository. When call returns the suppliedGitinstance will be closed. to understand how this method interprets the first parameter.- Parameters:
applicationUniqueName- theApplicationIdfor which to open aGitinstancegitConsumer- consumes an instance ofGitwhich will be used to perform the desired actions
-
performInGit
void performInGit(ApplicationId applicationId, BiConsumer<org.eclipse.jgit.api.Git, Path> gitConsumer) Opens aGitinstance for the suppliedApplicationIdwhich can be used to manipulate the various files within the repository. When call returns the suppliedGitinstance will be closed.- Parameters:
applicationId- theApplicationIdfor which to open aGitinstancegitConsumer- consumes an instance ofGitwhich will be used to perform the desired actions
-