Class DbEncryptionUpgradeOperation
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.db.DbEncryptionUpgradeOperation
- All Implemented Interfaces:
org.craftercms.commons.upgrade.UpgradeOperation<String>,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.web.context.ServletContextAware
Implementation of
UpgradeOperation that upgrades encrypted values in
the database.- Since:
- 3.1.9
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final Stringprotected org.craftercms.commons.crypto.TextEncryptorFields inherited from class org.craftercms.studio.impl.v2.upgrade.operations.AbstractUpgradeOperation
changedFiles, commitDetails, CONFIG_KEY_COMMIT_DETAILS, deletedFiles, servletContext, studioConfigurationFields inherited from class org.craftercms.commons.upgrade.impl.operations.AbstractUpgradeOperation
applicationContext, currentVersion, enabled, nextVersion -
Constructor Summary
ConstructorsConstructorDescriptionDbEncryptionUpgradeOperation(StudioConfiguration studioConfiguration, org.craftercms.commons.crypto.TextEncryptor textEncryptor) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoExecute(StudioUpgradeContext context) protected voidupgradeRemoteRepositories(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate jdbcTemplate) protected StringupgradeValue(String encrypted) Methods inherited from class org.craftercms.studio.impl.v2.upgrade.operations.AbstractUpgradeOperation
commitAllChanges, doExecute, getCommitMessage, init, loadResource, setServletContext, trackChangedFiles, trackDeletedFilesMethods inherited from class org.craftercms.commons.upgrade.impl.operations.AbstractUpgradeOperation
doInit, execute, setApplicationContext, setEnabled
-
Field Details
-
REMOTE_REPOSITORIES_QUERY
- See Also:
-
REMOTE_REPOSITORIES_UPDATE
- See Also:
-
textEncryptor
protected org.craftercms.commons.crypto.TextEncryptor textEncryptor
-
-
Constructor Details
-
DbEncryptionUpgradeOperation
@ConstructorProperties({"studioConfiguration","textEncryptor"}) public DbEncryptionUpgradeOperation(StudioConfiguration studioConfiguration, org.craftercms.commons.crypto.TextEncryptor textEncryptor)
-
-
Method Details
-
doExecute
public void doExecute(StudioUpgradeContext context) throws org.craftercms.commons.upgrade.exception.UpgradeException - Specified by:
doExecutein classAbstractUpgradeOperation- Throws:
org.craftercms.commons.upgrade.exception.UpgradeException
-
upgradeValue
protected String upgradeValue(String encrypted) throws org.craftercms.commons.crypto.CryptoException - Throws:
org.craftercms.commons.crypto.CryptoException
-
upgradeRemoteRepositories
protected void upgradeRemoteRepositories(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate jdbcTemplate) throws org.craftercms.commons.crypto.CryptoException - Throws:
org.craftercms.commons.crypto.CryptoException
-