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 String
The main branch from which to fetch the code.static final String
The git directory suffix.Fields inherited from interface dev.getelements.elements.sdk.cluster.ApplicationAssetLoader
ELEMENT_STORAGE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
performInGit
(ApplicationId applicationId, BiConsumer<org.eclipse.jgit.api.Git, Path> gitConsumer) Opens aGit
instance for the suppliedApplicationId
which can be used to manipulate the various files within the repository.default void
performInGit
(String applicationUniqueName, BiConsumer<org.eclipse.jgit.api.Git, Path> gitConsumer) Opens aGit
instance for the suppliedApplicationId
which 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 underlyingGitApplicationAssetLoader
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 theApplicationId
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 aGit
instance for the suppliedApplicationId
which can be used to manipulate the various files within the repository. When call returns the suppliedGit
instance will be closed. to understand how this method interprets the first parameter.- Parameters:
applicationUniqueName
- theApplicationId
for which to open aGit
instancegitConsumer
- consumes an instance ofGit
which will be used to perform the desired actions
-
performInGit
void performInGit(ApplicationId applicationId, BiConsumer<org.eclipse.jgit.api.Git, Path> gitConsumer) Opens aGit
instance for the suppliedApplicationId
which can be used to manipulate the various files within the repository. When call returns the suppliedGit
instance will be closed.- Parameters:
applicationId
- theApplicationId
for which to open aGit
instancegitConsumer
- consumes an instance ofGit
which will be used to perform the desired actions
-