Class GitServiceImpl
java.lang.Object
com.winchesters.devopsify.service.technologies.git.GitServiceImpl
- All Implemented Interfaces:
GitService
,TechnologyService
-
Field Summary
Fields inherited from interface com.winchesters.devopsify.service.technologies.TechnologyService
scriptDirectory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
clone
(GithubCredentials credentials, String remoteUrl, String localPath) void
void
org.eclipse.jgit.lib.Repository
getRepository
(String path) void
initializeRepository
(String path) void
install()
boolean
localAndOriginMainInSync
(GithubCredentials githubCredentials, String localRepoPath) localAndRemoteInSync
(GithubCredentials githubCredentials, String localRepoPath, String remoteName, String remoteBranchName) void
pull
(GithubCredentials credentials, String path, String remoteRepoName, String remoteBranchName) void
pullOriginMain
(GithubCredentials credentials, String path) void
push
(GithubCredentials credentials, String path, String remoteRepoName, String remoteBranchName) void
pushOriginMain
(GithubCredentials credentials, String path) void
syncLocalWithOriginMain
(GithubCredentials githubCredentials, String path) void
syncLocalWithRemote
(GithubCredentials githubCredentials, String path, String remoteName, String remoteBranchName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.winchesters.devopsify.service.technologies.TechnologyService
installed, installFromScript
-
Constructor Details
-
GitServiceImpl
public GitServiceImpl()
-
-
Method Details
-
installed
public boolean installed()- Specified by:
installed
in interfaceTechnologyService
-
install
public void install()- Specified by:
install
in interfaceTechnologyService
-
initializeRepository
- Specified by:
initializeRepository
in interfaceGitService
- Throws:
GitException
-
localAndRemoteInSync
public Boolean localAndRemoteInSync(GithubCredentials githubCredentials, String localRepoPath, String remoteName, String remoteBranchName) throws GitException - Specified by:
localAndRemoteInSync
in interfaceGitService
- Throws:
GitException
-
localAndOriginMainInSync
public Boolean localAndOriginMainInSync(GithubCredentials githubCredentials, String localRepoPath) throws GitException - Specified by:
localAndOriginMainInSync
in interfaceGitService
- Throws:
GitException
-
pullOriginMain
- Specified by:
pullOriginMain
in interfaceGitService
- Throws:
GitException
-
pull
public void pull(GithubCredentials credentials, String path, String remoteRepoName, String remoteBranchName) - Specified by:
pull
in interfaceGitService
-
clone
- Specified by:
clone
in interfaceGitService
-
getRepository
- Specified by:
getRepository
in interfaceGitService
- Throws:
IOException
-
push
public void push(GithubCredentials credentials, String path, String remoteRepoName, String remoteBranchName) throws GitException - Specified by:
push
in interfaceGitService
- Throws:
GitException
-
pushOriginMain
- Specified by:
pushOriginMain
in interfaceGitService
- Throws:
GitException
-
add
- Specified by:
add
in interfaceGitService
-
addAll
- Specified by:
addAll
in interfaceGitService
-
commit
- Specified by:
commit
in interfaceGitService
-
commitAll
- Specified by:
commitAll
in interfaceGitService
-
syncLocalWithRemote
public void syncLocalWithRemote(GithubCredentials githubCredentials, String path, String remoteName, String remoteBranchName) - Specified by:
syncLocalWithRemote
in interfaceGitService
-
syncLocalWithOriginMain
- Specified by:
syncLocalWithOriginMain
in interfaceGitService
-