Class MigrationsActionsClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.runtime.plugins.admin.migration.MigrationsActionsClientSideElement
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Client side element with callables for migrations actions
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
Field Summary
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acknowledge
(String componentId, boolean internal, String versionListId, String versionNumber, String comment) Marks a version as donevoid
deleteAllVersions
(String componentId, boolean internal, String versionListId) Deletes all versions of a component from storagevoid
deleteVersion
(String componentId, boolean internal, String versionListId, String versionNumber) Deletes a version from storageboolean
doAction
(String componentId, boolean internal, String versionListId, String upgradeNumber, boolean store, String comment) (Re-)plays a migration action, optionnaly storing a new versionvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
MigrationsActionsClientSideElement
public MigrationsActionsClientSideElement()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
acknowledge
public void acknowledge(String componentId, boolean internal, String versionListId, String versionNumber, String comment) throws MigrationException Marks a version as done- Parameters:
componentId
- the main component idinternal
- true if the component is from internel migrationversionListId
- the id of theMigrationEngine.VersionList
versionNumber
- the number of the version to be deletedcomment
- the comment associated to this operation- Throws:
MigrationException
- if an error occurs while storing version
-
deleteVersion
public void deleteVersion(String componentId, boolean internal, String versionListId, String versionNumber) throws MigrationException Deletes a version from storage- Parameters:
componentId
- the main component idinternal
- true if the component is from internel migrationversionListId
- the id of theMigrationEngine.VersionList
versionNumber
- the number of the version to be deleted- Throws:
MigrationException
- if an error occurs while deleting version
-
deleteAllVersions
public void deleteAllVersions(String componentId, boolean internal, String versionListId) throws MigrationException Deletes all versions of a component from storage- Parameters:
componentId
- the main component idinternal
- true if the component is from internel migrationversionListId
- the id of theMigrationEngine.VersionList
- Throws:
MigrationException
- if an error occurs while deleting versions
-
doAction
public boolean doAction(String componentId, boolean internal, String versionListId, String upgradeNumber, boolean store, String comment) throws MigrationException (Re-)plays a migration action, optionnaly storing a new version- Parameters:
componentId
- the main component idinternal
- true if the component is from internel migrationversionListId
- the id of theMigrationEngine.VersionList
upgradeNumber
- the number of the action to be executedstore
- if the version should be stored after executioncomment
- the comment associated to this operation- Returns:
- true if the action needs a restart after its execution
- Throws:
MigrationException
- if an error occurs while executing action
-