public class AddFileUpgradeOperation extends AbstractUpgradeOperation
UpgradeOperation
that adds a new file to
a repository.
Supported YAML properties:
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_KEY_FILE |
static String |
CONFIG_KEY_PATH |
protected org.springframework.core.io.Resource |
file
The file to copy from the classpath.
|
protected String |
path
The path to write the file.
|
applicationContext, commitDetails, CONFIG_KEY_COMMIT_DETAILS, contentRepository, currentVersion, dataSource, generalLockService, nextVersion, servletContext, studioConfiguration
Constructor and Description |
---|
AddFileUpgradeOperation() |
Modifier and Type | Method and Description |
---|---|
void |
doInit(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config) |
void |
execute(String site)
Performs a single upgrade operation.
|
commitAllChanges, getCommitMessage, getConnection, getContentRepository, getGeneralLockService, getProperty, getRepositoryPath, init, loadResource, setApplicationContext, setContentRepository, setDataSource, setGeneralLockService, setServletContext, setStudioConfiguration, writeToRepo
public static final String CONFIG_KEY_PATH
public static final String CONFIG_KEY_FILE
protected String path
protected org.springframework.core.io.Resource file
public void doInit(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config)
doInit
in class AbstractUpgradeOperation
public void execute(String site) throws UpgradeException
site
- the name of the siteUpgradeException
- if there is any error performing the upgradeCopyright © 2023 CrafterCMS. All rights reserved.