Class GitResource

  • All Implemented Interfaces:
    ch.kk7.confij.source.resource.ConfijResource

    public class GitResource
    extends java.lang.Object
    implements ch.kk7.confij.source.resource.ConfijResource
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GitResource.GitAnyResource  
      static class  GitResource.GitSettings  
      • Nested classes/interfaces inherited from interface ch.kk7.confij.source.resource.ConfijResource

        ch.kk7.confij.source.resource.ConfijResource.Defaults, ch.kk7.confij.source.resource.ConfijResource.ResourceContent
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.nio.file.Path TEMP_DIR  
      protected static java.lang.String TEMP_DIR_PREFIX  
    • Constructor Summary

      Constructors 
      Constructor Description
      GitResource()  
    • Field Detail

      • TEMP_DIR_PREFIX

        protected static final java.lang.String TEMP_DIR_PREFIX
        See Also:
        Constant Field Values
      • TEMP_DIR

        protected static final java.nio.file.Path TEMP_DIR
    • Constructor Detail

      • GitResource

        public GitResource()
    • Method Detail

      • read

        public java.util.stream.Stream<ch.kk7.confij.source.resource.ConfijResource.ResourceContent> read​(ch.kk7.confij.template.ValueResolver.StringResolver resolver)
        Specified by:
        read in interface ch.kk7.confij.source.resource.ConfijResource
      • getFileForSeed

        public static java.io.File getFileForSeed​(@NonNull
                                                  @NonNull java.lang.String seed)
      • gitFetch

        protected org.eclipse.jgit.api.Git gitFetch​(org.eclipse.jgit.api.Git git,
                                                    GitResource.GitSettings settings)
                                             throws org.eclipse.jgit.api.errors.GitAPIException
        Throws:
        org.eclipse.jgit.api.errors.GitAPIException
      • gitClone

        protected org.eclipse.jgit.api.Git gitClone​(GitResource.GitSettings settings)
                                             throws org.eclipse.jgit.api.errors.GitAPIException,
                                                    java.io.IOException
        Throws:
        org.eclipse.jgit.api.errors.GitAPIException
        java.io.IOException
      • gitInit

        protected org.eclipse.jgit.api.Git gitInit​(GitResource.GitSettings settings)
                                            throws org.eclipse.jgit.api.errors.GitAPIException,
                                                   java.io.IOException
        Throws:
        org.eclipse.jgit.api.errors.GitAPIException
        java.io.IOException
      • getRevCommit

        protected org.eclipse.jgit.revwalk.RevCommit getRevCommit​(org.eclipse.jgit.api.Git git,
                                                                  GitResource.GitSettings settings)
      • readFile

        protected ch.kk7.confij.source.resource.ConfijResource.ResourceContent readFile​(org.eclipse.jgit.api.Git git,
                                                                                        GitResource.GitSettings settings)