Class SiteRepositoryUpgradePipelineImpl
- java.lang.Object
-
- org.craftercms.commons.upgrade.impl.pipeline.DefaultUpgradePipelineImpl<String>
-
- org.craftercms.studio.impl.v2.upgrade.pipeline.SiteRepositoryUpgradePipelineImpl
-
- All Implemented Interfaces:
org.craftercms.commons.upgrade.UpgradePipeline<String>
public class SiteRepositoryUpgradePipelineImpl extends org.craftercms.commons.upgrade.impl.pipeline.DefaultUpgradePipelineImpl<String>
Implementation ofUpgradePipeline
that handles a git repository to work on a temporary branch for upgrades.- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description protected String
commitMessage
Message for the merge commit after upgrading.protected GeneralLockService
generalLockService
protected GitRepositoryHelper
gitRepositoryHelper
protected RetryingRepositoryOperationFacade
retryingRepositoryOperationFacade
protected String
siteSandboxBranch
The name of the sandbox branch.protected SiteService
siteService
protected String
siteUpgradeBranch
The name of the temporary branch used for upgrades.
-
Constructor Summary
Constructors Constructor Description SiteRepositoryUpgradePipelineImpl(String name, List<org.craftercms.commons.upgrade.UpgradeOperation<String>> upgradeOperations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkoutBranch(String branch, org.eclipse.jgit.api.Git git)
protected void
createTemporaryBranch(String site, org.eclipse.jgit.api.Git git)
protected void
deleteTemporaryBranch(org.eclipse.jgit.api.Git git)
void
execute(org.craftercms.commons.upgrade.impl.UpgradeContext<String> context)
GeneralLockService
getGeneralLockService()
RetryingRepositoryOperationFacade
getRetryingRepositoryOperationFacade()
protected void
mergeTemporaryBranch(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.api.Git git)
void
setCommitMessage(String commitMessage)
void
setGeneralLockService(GeneralLockService generalLockService)
void
setGitRepositoryHelper(GitRepositoryHelper gitRepositoryHelper)
void
setRetryingRepositoryOperationFacade(RetryingRepositoryOperationFacade retryingRepositoryOperationFacade)
void
setSiteSandboxBranch(String siteSandboxBranch)
void
setSiteService(SiteService siteService)
void
setSiteUpgradeBranch(String siteUpgradeBranch)
-
-
-
Field Detail
-
siteSandboxBranch
protected String siteSandboxBranch
The name of the sandbox branch.
-
siteUpgradeBranch
protected String siteUpgradeBranch
The name of the temporary branch used for upgrades.
-
commitMessage
protected String commitMessage
Message for the merge commit after upgrading.
-
siteService
protected SiteService siteService
-
generalLockService
protected GeneralLockService generalLockService
-
gitRepositoryHelper
protected GitRepositoryHelper gitRepositoryHelper
-
retryingRepositoryOperationFacade
protected RetryingRepositoryOperationFacade retryingRepositoryOperationFacade
-
-
Method Detail
-
createTemporaryBranch
protected void createTemporaryBranch(String site, org.eclipse.jgit.api.Git git) throws org.eclipse.jgit.api.errors.GitAPIException
- Throws:
org.eclipse.jgit.api.errors.GitAPIException
-
checkoutBranch
protected void checkoutBranch(String branch, org.eclipse.jgit.api.Git git) throws org.eclipse.jgit.api.errors.GitAPIException
- Throws:
org.eclipse.jgit.api.errors.GitAPIException
-
mergeTemporaryBranch
protected void mergeTemporaryBranch(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.api.Git git) throws IOException, org.eclipse.jgit.api.errors.GitAPIException
- Throws:
IOException
org.eclipse.jgit.api.errors.GitAPIException
-
deleteTemporaryBranch
protected void deleteTemporaryBranch(org.eclipse.jgit.api.Git git) throws org.eclipse.jgit.api.errors.GitAPIException
- Throws:
org.eclipse.jgit.api.errors.GitAPIException
-
execute
public void execute(org.craftercms.commons.upgrade.impl.UpgradeContext<String> context) throws org.craftercms.commons.upgrade.exception.UpgradeException
-
setSiteSandboxBranch
public void setSiteSandboxBranch(String siteSandboxBranch)
-
setSiteUpgradeBranch
public void setSiteUpgradeBranch(String siteUpgradeBranch)
-
setCommitMessage
public void setCommitMessage(String commitMessage)
-
setSiteService
public void setSiteService(SiteService siteService)
-
getGeneralLockService
public GeneralLockService getGeneralLockService()
-
setGeneralLockService
public void setGeneralLockService(GeneralLockService generalLockService)
-
setGitRepositoryHelper
public void setGitRepositoryHelper(GitRepositoryHelper gitRepositoryHelper)
-
getRetryingRepositoryOperationFacade
public RetryingRepositoryOperationFacade getRetryingRepositoryOperationFacade()
-
setRetryingRepositoryOperationFacade
public void setRetryingRepositoryOperationFacade(RetryingRepositoryOperationFacade retryingRepositoryOperationFacade)
-
-