Package org.ametys.core.migration.action
Interface Action
- All Known Implementing Classes:
JavaAction
,ManualAction
,ScriptAction
,SqlInitializationAction
,SqlUpgradeAction
public interface Action
Interface for actions components
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doAction
(ActionData actionData) Run the action with the provided datagenerateActionData
(String id, Version version, String comment, String from, String type, String pluginName, Configuration configuration, boolean restartRequired) Generate anActionData
linked to this kind of action
-
Method Details
-
doAction
Run the action with the provided data- Parameters:
actionData
- data needed to do the action (contains the version)- Throws:
MigrationException
- Something went wrong
-
generateActionData
ActionData generateActionData(String id, Version version, String comment, String from, String type, String pluginName, Configuration configuration, boolean restartRequired) throws MigrationException, ConfigurationException Generate anActionData
linked to this kind of action- Parameters:
id
- 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
-