public abstract class AbstractUpgradeOperation extends Object implements UpgradeOperation, org.springframework.web.context.ServletContextAware, org.springframework.context.ApplicationContextAware
Supported YAML properties:
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.ApplicationContext |
applicationContext
The application context
|
protected String |
commitDetails
Additional details for the commit message (optional)
|
static String |
CONFIG_KEY_COMMIT_DETAILS |
protected ContentRepository |
contentRepository
The content repository.
|
protected String |
currentVersion
The current version.
|
protected DataSource |
dataSource
The database data source.
|
protected GeneralLockService |
generalLockService |
protected String |
nextVersion
The next version.
|
protected javax.servlet.ServletContext |
servletContext
The servlet context.
|
protected StudioConfiguration |
studioConfiguration
The Studio configuration.
|
| Constructor and Description |
|---|
AbstractUpgradeOperation() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
commitAllChanges(String site) |
protected void |
doInit(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config) |
protected String |
getCommitMessage() |
Connection |
getConnection() |
ContentRepository |
getContentRepository() |
GeneralLockService |
getGeneralLockService() |
String |
getProperty(String key) |
protected Path |
getRepositoryPath(String site) |
void |
init(String sourceVersion,
String targetVersion,
org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config)
Initializes the instance with the given configuration.
|
protected org.springframework.core.io.Resource |
loadResource(String path) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setContentRepository(ContentRepository contentRepository) |
void |
setDataSource(DataSource dataSource) |
void |
setGeneralLockService(GeneralLockService generalLockService) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
void |
setStudioConfiguration(StudioConfiguration studioConfiguration) |
protected void |
writeToRepo(String site,
String path,
InputStream content) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecutepublic static final String CONFIG_KEY_COMMIT_DETAILS
protected String currentVersion
protected String nextVersion
protected String commitDetails
protected StudioConfiguration studioConfiguration
protected DataSource dataSource
protected ContentRepository contentRepository
protected javax.servlet.ServletContext servletContext
protected org.springframework.context.ApplicationContext applicationContext
protected GeneralLockService generalLockService
public void setStudioConfiguration(StudioConfiguration studioConfiguration)
public void setDataSource(DataSource dataSource)
public Connection getConnection() throws SQLException
SQLExceptionpublic ContentRepository getContentRepository()
public void setContentRepository(ContentRepository contentRepository)
public void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext in interface org.springframework.web.context.ServletContextAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwarepublic GeneralLockService getGeneralLockService()
public void setGeneralLockService(GeneralLockService generalLockService)
public void init(String sourceVersion, String targetVersion, org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config) throws UpgradeException
UpgradeOperationinit in interface UpgradeOperationsourceVersion - the starting versiontargetVersion - the target versionconfig - operation configurationUpgradeExceptionprotected void doInit(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config)
throws org.craftercms.commons.config.ConfigurationException
org.craftercms.commons.config.ConfigurationExceptionprotected void writeToRepo(String site, String path, InputStream content)
protected void commitAllChanges(String site) throws UpgradeException
UpgradeExceptionprotected String getCommitMessage()
protected org.springframework.core.io.Resource loadResource(String path)
Copyright © 2022 CrafterCMS. All rights reserved.