Class RenameUpgradeOperation
java.lang.Object
org.craftercms.commons.upgrade.impl.operations.AbstractUpgradeOperation<String>
org.craftercms.studio.impl.v2.upgrade.operations.AbstractUpgradeOperation
org.craftercms.studio.impl.v2.upgrade.operations.file.RenameUpgradeOperation
- All Implemented Interfaces:
org.craftercms.commons.upgrade.UpgradeOperation<String>
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.web.context.ServletContextAware
- Direct Known Subclasses:
TemplateRenameUpgradeOperation
Implementation of
UpgradeOperation
that renames/moves files and
folders in the repository.- Author:
- Dejan Brkic
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
protected String
protected String
protected boolean
Fields inherited from class org.craftercms.studio.impl.v2.upgrade.operations.AbstractUpgradeOperation
changedFiles, commitDetails, CONFIG_KEY_COMMIT_DETAILS, deletedFiles, servletContext, studioConfiguration
Fields inherited from class org.craftercms.commons.upgrade.impl.operations.AbstractUpgradeOperation
applicationContext, currentVersion, enabled, nextVersion
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doExecute
(StudioUpgradeContext context) void
doInit
(org.apache.commons.configuration2.HierarchicalConfiguration config) protected boolean
renamePath
(Path from, Path to) Methods inherited from class org.craftercms.studio.impl.v2.upgrade.operations.AbstractUpgradeOperation
commitAllChanges, doExecute, getCommitMessage, init, loadResource, setServletContext, trackChangedFiles, trackDeletedFiles
Methods inherited from class org.craftercms.commons.upgrade.impl.operations.AbstractUpgradeOperation
execute, setApplicationContext, setEnabled
-
Field Details
-
CONFIG_KEY_OLD_PATH
- See Also:
-
CONFIG_KEY_NEW_PATH
- See Also:
-
CONFIG_KEY_OVERWRITE
- See Also:
-
oldPath
-
newPath
-
overwrite
protected boolean overwrite
-
-
Constructor Details
-
RenameUpgradeOperation
-
-
Method Details
-
doInit
public void doInit(org.apache.commons.configuration2.HierarchicalConfiguration config) - Overrides:
doInit
in classorg.craftercms.commons.upgrade.impl.operations.AbstractUpgradeOperation<String>
-
doExecute
public void doExecute(StudioUpgradeContext context) throws org.craftercms.commons.upgrade.exception.UpgradeException - Specified by:
doExecute
in classAbstractUpgradeOperation
- Throws:
org.craftercms.commons.upgrade.exception.UpgradeException
-
renamePath
- Throws:
IOException
-