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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledge(String componentId, boolean internal, String versionListId, String versionNumber, String comment) Marks a version as donevoiddeleteAllVersions(String componentId, boolean internal, String versionListId) Deletes all versions of a component from storagevoiddeleteVersion(String componentId, boolean internal, String versionListId, String versionNumber) Deletes a version from storagebooleandoAction(String componentId, boolean internal, String versionListId, String upgradeNumber, boolean store, String comment) (Re-)plays a migration action, optionnaly storing a new versionvoidservice(ServiceManager manager) Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParametersMethods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toStringMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
MigrationsActionsClientSideElement
public MigrationsActionsClientSideElement()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein 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.VersionListversionNumber- 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.VersionListversionNumber- 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.VersionListupgradeNumber- 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
-