public class SiteRepositoryUpgradePipelineImpl extends DefaultUpgradePipelineImpl
UpgradePipeline that handles a git repository
to work on a temporary branch for upgrades.| Modifier and Type | Field and Description |
|---|---|
protected String |
commitMessage
Message for the merge commit after upgrading.
|
protected org.craftercms.commons.crypto.TextEncryptor |
encryptor |
protected SecurityService |
securityService |
protected ServicesConfig |
servicesConfig |
protected String |
siteSandboxBranch
The name of the sandbox branch.
|
protected SiteService |
siteService |
protected String |
siteUpgradeBranch
The name of the temporary branch used for upgrades.
|
protected StudioConfiguration |
studioConfiguration |
protected UserServiceInternal |
userServiceInternal |
continueOnError, name, operations| Constructor and Description |
|---|
SiteRepositoryUpgradePipelineImpl() |
| Modifier and Type | Method and 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(String site)
Executes each
UpgradeOperation for the given site. |
org.craftercms.commons.crypto.TextEncryptor |
getEncryptor() |
SecurityService |
getSecurityService() |
SiteService |
getSiteService() |
UserServiceInternal |
getUserServiceInternal() |
protected void |
mergeTemporaryBranch(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.api.Git git) |
void |
setCommitMessage(String commitMessage) |
void |
setEncryptor(org.craftercms.commons.crypto.TextEncryptor encryptor) |
void |
setSecurityService(SecurityService securityService) |
void |
setServicesConfig(ServicesConfig servicesConfig) |
void |
setSiteSandboxBranch(String siteSandboxBranch) |
void |
setSiteService(SiteService siteService) |
void |
setSiteUpgradeBranch(String siteUpgradeBranch) |
void |
setStudioConfiguration(StudioConfiguration studioConfiguration) |
void |
setUserServiceInternal(UserServiceInternal userServiceInternal) |
isEmpty, setContinueOnError, setName, setOperationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteprotected String siteSandboxBranch
protected String siteUpgradeBranch
protected String commitMessage
protected StudioConfiguration studioConfiguration
protected ServicesConfig servicesConfig
protected SecurityService securityService
protected UserServiceInternal userServiceInternal
protected SiteService siteService
protected org.craftercms.commons.crypto.TextEncryptor encryptor
protected void createTemporaryBranch(String site, org.eclipse.jgit.api.Git git) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionprotected void checkoutBranch(String branch, org.eclipse.jgit.api.Git git) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionprotected void mergeTemporaryBranch(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.api.Git git)
throws IOException,
org.eclipse.jgit.api.errors.GitAPIException
IOExceptionorg.eclipse.jgit.api.errors.GitAPIExceptionprotected void deleteTemporaryBranch(org.eclipse.jgit.api.Git git)
throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic void execute(String site) throws UpgradeException
UpgradeOperation for the given site.execute in interface UpgradePipelineexecute in class DefaultUpgradePipelineImplsite - the name of the siteUpgradeException - if any of the UpgradeOperations failspublic void setSiteSandboxBranch(String siteSandboxBranch)
public void setSiteUpgradeBranch(String siteUpgradeBranch)
public void setCommitMessage(String commitMessage)
public void setStudioConfiguration(StudioConfiguration studioConfiguration)
public void setServicesConfig(ServicesConfig servicesConfig)
public SecurityService getSecurityService()
public void setSecurityService(SecurityService securityService)
public UserServiceInternal getUserServiceInternal()
public void setUserServiceInternal(UserServiceInternal userServiceInternal)
public SiteService getSiteService()
public void setSiteService(SiteService siteService)
public org.craftercms.commons.crypto.TextEncryptor getEncryptor()
public void setEncryptor(org.craftercms.commons.crypto.TextEncryptor encryptor)
Copyright © 2020 CrafterCMS. All rights reserved.