Package org.ametys.core.migration.action
Class SqlUpgradeAction
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.migration.action.SqlUpgradeAction
- All Implemented Interfaces:
Action,LogEnabled,Serviceable
- Direct Known Subclasses:
SqlInitializationAction
SQL action: A script will be executed
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_upgrade(SqlUpgradeAction.SqlUpgradeActionConfiguration sqlUpgradeConfiguration, Version version) Do the upgrade with the right objectsvoidact(MigrationEngine.ActionData actionData) Run the action with the provided datacreateActionConfiguration(String versionNumber, String type, String comment, String from, boolean restartRequired, boolean isInitialization, Configuration configuration) Generate anActionConfigurationlinked to this kind of actionvoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_sourceResolver
Source resolver
-
-
Constructor Details
-
SqlUpgradeAction
public SqlUpgradeAction()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
act
Description copied from interface:ActionRun the action with the provided data- Specified by:
actin interfaceAction- Parameters:
actionData- data needed to do the action- Throws:
MigrationException- Something went wrong
-
_upgrade
protected void _upgrade(SqlUpgradeAction.SqlUpgradeActionConfiguration sqlUpgradeConfiguration, Version version) throws MigrationException Do the upgrade with the right objects- Parameters:
sqlUpgradeConfiguration- upgrade dataversion- version- Throws:
MigrationException- Something went wrong
-
createActionConfiguration
public ActionConfiguration createActionConfiguration(String versionNumber, String type, String comment, String from, boolean restartRequired, boolean isInitialization, Configuration configuration) throws ConfigurationException Description copied from interface:ActionGenerate anActionConfigurationlinked to this kind of action- Specified by:
createActionConfigurationin interfaceAction- Parameters:
versionNumber- id of the actiontype- type of actioncomment- Comment about this actionfrom- if this actions is the equivalent of multiple actions, this is the version id just before the 1st action impacted by this actionrestartRequired- true if a restart is required after the actionisInitialization- true for initialization action, false for upgradeconfiguration- configuration of the action- Returns:
- a
ActionConfigurationfor this type of action - Throws:
ConfigurationException- Configuration malformed
-