Class SqlInitializationAction
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.migration.action.impl.SqlUpgradeAction
org.ametys.core.migration.action.impl.SqlInitializationAction
- All Implemented Interfaces:
Action
,LogEnabled
,Serviceable
Initialization of an SQL table
Similar to
SqlUpgradeAction
with a test about the existence of a table-
Field Summary
Fields inherited from class org.ametys.core.migration.action.impl.SqlUpgradeAction
_sourceResolver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doAction
(ActionData actionData) Run the action with the provided datagenerateActionData
(String versionNumber, Version version, String comment, String from, String type, String pluginName, Configuration configuration, boolean restartRequired) Generate anActionData
linked to this kind of actionMethods inherited from class org.ametys.core.migration.action.impl.SqlUpgradeAction
_upgrade, service
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
SqlInitializationAction
public SqlInitializationAction()
-
-
Method Details
-
doAction
Description copied from interface:Action
Run the action with the provided data- Specified by:
doAction
in interfaceAction
- Overrides:
doAction
in classSqlUpgradeAction
- Parameters:
actionData
- data needed to do the action (contains the version)- Throws:
MigrationException
- Something went wrong
-
generateActionData
public ActionData generateActionData(String versionNumber, Version version, String comment, String from, String type, String pluginName, Configuration configuration, boolean restartRequired) throws MigrationException, ConfigurationException Description copied from interface:Action
Generate anActionData
linked to this kind of action- Specified by:
generateActionData
in interfaceAction
- Overrides:
generateActionData
in classSqlUpgradeAction
- Parameters:
versionNumber
- id of the actionversion
- original versioncomment
- 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 actiontype
- type of actionpluginName
- name of the pluginconfiguration
- configuration of the actionrestartRequired
- true if a restart is required after the action- Returns:
- a
ActionData
for this type of action - Throws:
MigrationException
- Something went wrongConfigurationException
- Configuration malformed
-