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 forVersionHandler
.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_id
Version handler idprotected VersionStorage
_versionStorage
Version storage objectprotected VersionStorageExtensionPoint
_versionStorageEP
Version storage extension pointprotected String
_versionStorageId
Version storage id
-
Constructor Summary
Constructors Constructor Description AbstractVersionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addVersion(Version newVersion)
Adds a new version for a componentvoid
configure(Configuration configuration)
protected VersionStorage
getVersionStorage()
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
getCurrentVersions
-
-
-
-
Field Detail
-
_versionStorageEP
protected VersionStorageExtensionPoint _versionStorageEP
Version storage extension point
-
_versionStorage
protected VersionStorage _versionStorage
Version storage object
-
_versionStorageId
protected String _versionStorageId
Version storage id
-
-
Constructor Detail
-
AbstractVersionHandler
public AbstractVersionHandler()
-
-
Method Detail
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
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
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getVersionStorage
protected VersionStorage getVersionStorage()
Lazy load of the version storage- Returns:
- Lazy loaded
VersionStorage
-
addVersion
public void addVersion(Version newVersion) throws MigrationException
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
-
-