Class GitResource

java.lang.Object
ch.kk7.confij.source.resource.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()  
  • Method Summary

    Modifier and Type Method Description
    static java.io.File getFileForSeed​(@NonNull java.lang.String seed)  
    protected org.eclipse.jgit.revwalk.RevCommit getRevCommit​(org.eclipse.jgit.api.Git git, GitResource.GitSettings settings)  
    protected org.eclipse.jgit.api.Git gitClone​(GitResource.GitSettings settings)  
    protected org.eclipse.jgit.api.Git gitCloneOrFetch​(GitResource.GitSettings settings)  
    protected org.eclipse.jgit.api.Git gitFetch​(org.eclipse.jgit.api.Git git, GitResource.GitSettings settings)  
    protected org.eclipse.jgit.api.Git gitInit​(GitResource.GitSettings settings)  
    java.util.stream.Stream<ch.kk7.confij.source.resource.ConfijResource.ResourceContent> read​(ch.kk7.confij.template.ValueResolver.StringResolver resolver)  
    protected ch.kk7.confij.source.resource.ConfijResource.ResourceContent readFile​(org.eclipse.jgit.api.Git git, GitResource.GitSettings settings)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ch.kk7.confij.source.resource.ConfijResource

    read
  • Field Details

    • 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 Details

    • GitResource

      public GitResource()
  • Method Details

    • 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)
    • gitCloneOrFetch

      protected org.eclipse.jgit.api.Git gitCloneOrFetch​(GitResource.GitSettings settings)
    • 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)