Class AbstractVersionHandler
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.migration.handler.AbstractVersionHandler
- All Implemented Interfaces:
VersionHandler
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
SingleVersionHandler
public abstract class AbstractVersionHandler
extends AbstractLogEnabled
implements VersionHandler, Serviceable, Configurable, PluginAware
Abstract class for
VersionHandler
.-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Version handler idprotected VersionStorage
Version storage objectprotected VersionStorageExtensionPoint
Version storage extension pointprotected String
Version storage id -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addVersion
(Version newVersion) Adds a new version for a componentvoid
configure
(Configuration configuration) protected VersionStorage
Lazy load of the version storagevoid
service
(ServiceManager manager) void
setPluginInfo
(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.migration.handler.VersionHandler
getConfiguration, getCurrentVersions
-
Field Details
-
_versionStorageEP
Version storage extension point -
_versionStorage
Version storage object -
_versionStorageId
Version storage id -
_id
Version handler id
-
-
Constructor Details
-
AbstractVersionHandler
public AbstractVersionHandler()
-
-
Method Details
-
setPluginInfo
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getVersionStorage
Lazy load of the version storage- Returns:
- Lazy loaded
VersionStorage
-
addVersion
Description copied from interface:VersionHandler
Adds a new version for a component- Specified by:
addVersion
in interfaceVersionHandler
- Parameters:
newVersion
- Version to set- Throws:
MigrationException
- Something went wrong
-