Package org.ametys.core.migration.action
Class SqlInitializationAction
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.migration.action.SqlUpgradeAction
org.ametys.core.migration.action.SqlInitializationAction
- All Implemented Interfaces:
Action,LogEnabled,Serviceable
Initialization of an SQL table
Similar to
SqlUpgradeAction with a test about the existence of a table-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classActionConfigurationfor sql initialisation with table to checkNested classes/interfaces inherited from class org.ametys.core.migration.action.SqlUpgradeAction
SqlUpgradeAction.SqlUpgradeActionConfiguration -
Field Summary
Fields inherited from class org.ametys.core.migration.action.SqlUpgradeAction
_sourceResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidact(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 actionMethods inherited from class org.ametys.core.migration.action.SqlUpgradeAction
_upgrade, serviceMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
SqlInitializationAction
public SqlInitializationAction()
-
-
Method Details
-
act
Description copied from interface:ActionRun the action with the provided data- Specified by:
actin interfaceAction- Overrides:
actin classSqlUpgradeAction- Parameters:
actionData- data needed to do the action- 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- Overrides:
createActionConfigurationin classSqlUpgradeAction- 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
-