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_idVersion handler idprotected VersionStorage_versionStorageVersion storage objectprotected VersionStorageExtensionPoint_versionStorageEPVersion storage extension pointprotected String_versionStorageIdVersion storage id
-
Constructor Summary
Constructors Constructor Description AbstractVersionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVersion(Version newVersion)Adds a new version for a componentvoidconfigure(Configuration configuration)protected VersionStoragegetVersionStorage()Lazy load of the version storagevoidservice(ServiceManager manager)voidsetPluginInfo(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 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:PluginAwareSets 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:
setPluginInfoin 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:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configurein 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:VersionHandlerAdds a new version for a component- Specified by:
addVersionin interfaceVersionHandler- Parameters:
newVersion- Version to set- Throws:
MigrationException- Something went wrong
-
-