Class JGitEnvironmentRepository

    • Constructor Detail

      • JGitEnvironmentRepository

        public JGitEnvironmentRepository​(org.springframework.core.env.ConfigurableEnvironment environment,
                                         JGitEnvironmentProperties properties)
    • Method Detail

      • isTryMasterBranch

        public boolean isTryMasterBranch()
      • setTryMasterBranch

        public void setTryMasterBranch​(boolean tryMasterBranch)
      • isCloneOnStart

        public boolean isCloneOnStart()
      • setCloneOnStart

        public void setCloneOnStart​(boolean cloneOnStart)
      • getTimeout

        public int getTimeout()
      • setTimeout

        public void setTimeout​(int timeout)
      • getRefreshRate

        public int getRefreshRate()
      • setRefreshRate

        public void setRefreshRate​(int refreshRate)
      • getTransportConfigCallback

        public org.eclipse.jgit.api.TransportConfigCallback getTransportConfigCallback()
      • setTransportConfigCallback

        public void setTransportConfigCallback​(org.eclipse.jgit.api.TransportConfigCallback transportConfigCallback)
      • setGitCredentialsProviderFactory

        public void setGitCredentialsProviderFactory​(GitCredentialsProviderFactory gitCredentialsProviderFactory)
      • getDefaultLabel

        public String getDefaultLabel()
      • setDefaultLabel

        public void setDefaultLabel​(String defaultLabel)
      • isForcePull

        public boolean isForcePull()
      • setForcePull

        public void setForcePull​(boolean forcePull)
      • isDeleteUntrackedBranches

        public boolean isDeleteUntrackedBranches()
      • setDeleteUntrackedBranches

        public void setDeleteUntrackedBranches​(boolean deleteUntrackedBranches)
      • isSkipSslValidation

        public boolean isSkipSslValidation()
      • setSkipSslValidation

        public void setSkipSslValidation​(boolean skipSslValidation)
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception
      • refresh

        public String refresh​(String label)
        Get the working directory ready.
        Parameters:
        label - label to refresh
        Returns:
        head id
      • shouldPull

        protected boolean shouldPull​(org.eclipse.jgit.api.Git git)
                              throws org.eclipse.jgit.api.errors.GitAPIException
        Throws:
        org.eclipse.jgit.api.errors.GitAPIException
      • onPullInvalidIndex

        protected void onPullInvalidIndex​(org.eclipse.jgit.api.Git git,
                                          org.eclipse.jgit.api.errors.JGitInternalException e)
      • fetch

        protected org.eclipse.jgit.transport.FetchResult fetch​(org.eclipse.jgit.api.Git git,
                                                               String label)
      • getLastRefresh

        public long getLastRefresh()
      • setLastRefresh

        public void setLastRefresh​(long lastRefresh)