public class JGitEnvironmentRepository extends AbstractScmEnvironmentRepository implements EnvironmentRepository, SearchPathLocator, org.springframework.beans.factory.InitializingBean
EnvironmentRepository backed by a single git repository.SearchPathLocator.Locationslogger| Constructor and Description |
|---|
JGitEnvironmentRepository(org.springframework.core.env.ConfigurableEnvironment environment) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.eclipse.jgit.transport.FetchResult |
fetch(org.eclipse.jgit.api.Git git,
String label) |
String |
getDefaultLabel() |
org.eclipse.jgit.transport.CredentialsProvider |
getGitCredentialsProvider() |
org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.JGitFactory |
getGitFactory() |
SearchPathLocator.Locations |
getLocations(String application,
String profile,
String label) |
int |
getTimeout() |
org.eclipse.jgit.api.TransportConfigCallback |
getTransportConfigCallback() |
boolean |
isCloneOnStart() |
boolean |
isForcePull() |
String |
refresh(String label)
Get the working directory ready.
|
void |
setCloneOnStart(boolean cloneOnStart) |
void |
setDefaultLabel(String defaultLabel) |
void |
setForcePull(boolean forcePull) |
void |
setGitCredentialsProvider(org.eclipse.jgit.transport.CredentialsProvider gitCredentialsProvider) |
void |
setGitFactory(org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.JGitFactory gitFactory) |
void |
setTimeout(int timeout) |
void |
setTransportConfigCallback(org.eclipse.jgit.api.TransportConfigCallback transportConfigCallback) |
protected boolean |
shouldPull(org.eclipse.jgit.api.Git git) |
protected void |
warn(String message,
Exception ex) |
findOne, getOrder, setOrdercreateBaseDir, getBasedir, getEnvironment, getPassphrase, getPassword, getSearchLocations, getSearchPaths, getUri, getUsername, getWorkingDirectory, isStrictHostKeyChecking, setBasedir, setEnvironment, setPassphrase, setPassword, setResourceLoader, setSearchPaths, setStrictHostKeyChecking, setUri, setUsernameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindOnepublic JGitEnvironmentRepository(org.springframework.core.env.ConfigurableEnvironment environment)
public boolean isCloneOnStart()
public void setCloneOnStart(boolean cloneOnStart)
public int getTimeout()
public void setTimeout(int timeout)
public org.eclipse.jgit.api.TransportConfigCallback getTransportConfigCallback()
public void setTransportConfigCallback(org.eclipse.jgit.api.TransportConfigCallback transportConfigCallback)
public org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.JGitFactory getGitFactory()
public void setGitFactory(org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.JGitFactory gitFactory)
public String getDefaultLabel()
public void setDefaultLabel(String defaultLabel)
public boolean isForcePull()
public void setForcePull(boolean forcePull)
public SearchPathLocator.Locations getLocations(String application, String profile, String label)
getLocations in interface SearchPathLocatorpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionprotected boolean shouldPull(org.eclipse.jgit.api.Git git)
throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionprotected org.eclipse.jgit.transport.FetchResult fetch(org.eclipse.jgit.api.Git git,
String label)
public org.eclipse.jgit.transport.CredentialsProvider getGitCredentialsProvider()
public void setGitCredentialsProvider(org.eclipse.jgit.transport.CredentialsProvider gitCredentialsProvider)
gitCredentialsProvider - the gitCredentialsProvider to setCopyright © 2017 Pivotal Software, Inc.. All rights reserved.