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 of UpgradePipeline that handles a git repository to work on a temporary branch for upgrades.
Author:
joseross
  • Field Details

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

    • SiteRepositoryUpgradePipelineImpl

      public SiteRepositoryUpgradePipelineImpl(String name, List<org.craftercms.commons.upgrade.UpgradeOperation<String>> upgradeOperations)
  • Method Details

    • 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
      Specified by:
      execute in interface org.craftercms.commons.upgrade.UpgradePipeline<String>
      Overrides:
      execute in class org.craftercms.commons.upgrade.impl.pipeline.DefaultUpgradePipelineImpl<String>
      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)