Class AbstractActionData
java.lang.Object
org.ametys.core.migration.action.data.impl.AbstractActionData
- All Implemented Interfaces:
ActionData
- Direct Known Subclasses:
JavaActionData
,ManualActionData
,ScriptActionData
,SqlUpgradeActionData
Representation of an upgrade line in the extension
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Comment about the actionprotected String
When an upgrade contains multiple upgrades, this represent the 1st upgrade impactedprotected String
Plugin containing the extensionprotected boolean
Is restart required after actionprotected String
Type of upgradeprotected Version
Version used to determine the list of remaining upgradesprotected String
number of the version created by this migration -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractActionData
(String versionNumber, Version version, String comment, String from, String type, String pluginName, Configuration configuration, boolean restartRequired) Create the Upgrade based on the upgrade xml line Must contains id and type May contain restartAfter, component and/or file -
Method Summary
Modifier and TypeMethodDescriptionGet the comment about this actiongetFrom()
Get the upgrade "from" fieldGet the name of the plugin of the extensiongetType()
Get the upgrade typeGet the version to apply this upgrade onGet the upgrade version numberboolean
If true at the end of the action, the server will be restartedvoid
setRequiresRestart
(boolean requiresRestart) Set to requireRestart flagtoString()
-
Field Details
-
_versionNumber
number of the version created by this migration -
_type
Type of upgrade -
_comment
Comment about the action -
_from
When an upgrade contains multiple upgrades, this represent the 1st upgrade impacted -
_version
Version used to determine the list of remaining upgrades -
_pluginName
Plugin containing the extension -
_restartRequired
Is restart required after action
-
-
Constructor Details
-
AbstractActionData
protected AbstractActionData(String versionNumber, Version version, String comment, String from, String type, String pluginName, Configuration configuration, boolean restartRequired) throws ConfigurationException Create the Upgrade based on the upgrade xml line Must contains id and type May contain restartAfter, component and/or file- Parameters:
versionNumber
- version number of the actionversion
- version concerned by this upgradecomment
- The 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 plugin containing the extensionconfiguration
- the extension upgrade line to addrestartRequired
- true if a restart is required after the action- Throws:
ConfigurationException
- id or type missing
-
-
Method Details
-
toString
-
getVersionNumber
Description copied from interface:ActionData
Get the upgrade version number- Specified by:
getVersionNumber
in interfaceActionData
- Returns:
- upgrade version number
-
getType
Description copied from interface:ActionData
Get the upgrade type- Specified by:
getType
in interfaceActionData
- Returns:
- upgrade type
-
getComment
Description copied from interface:ActionData
Get the comment about this action- Specified by:
getComment
in interfaceActionData
- Returns:
- The comment about this action
-
getFrom
Description copied from interface:ActionData
Get the upgrade "from" field- Specified by:
getFrom
in interfaceActionData
- Returns:
- upgrade "from" field
-
getVersion
Description copied from interface:ActionData
Get the version to apply this upgrade on- Specified by:
getVersion
in interfaceActionData
- Returns:
- the version to apply this upgrade on
-
getPluginName
Description copied from interface:ActionData
Get the name of the plugin of the extension- Specified by:
getPluginName
in interfaceActionData
- Returns:
- The name of the plugin of the extension
-
requiresRestart
Description copied from interface:ActionData
If true at the end of the action, the server will be restarted- Specified by:
requiresRestart
in interfaceActionData
- Returns:
- true to restart server
-
setRequiresRestart
Description copied from interface:ActionData
Set to requireRestart flag- Specified by:
setRequiresRestart
in interfaceActionData
- Parameters:
requiresRestart
- true to indicates that the server will require a restart at the end of the action
-