Package org.ametys.core.script
Class SqlTablesInit
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.core.script.SqlTablesInit
-
- All Implemented Interfaces:
PluginAware,Init,Configurable,LogEnabled,Serviceable
public class SqlTablesInit extends AbstractLogEnabled implements Init, Serviceable, Configurable, PluginAware
Creates necessary SQL tables (if not already existing) at initialization.
-
-
Field Summary
Fields Modifier and Type Field Description protected String_dataSourceIdThe data source identiferprotected String_pluginNamePlugin nameprotected Set<org.ametys.core.script.SqlTablesInit.InitScript>_scriptsThe set of configured table init scriptsprotected SourceResolver_sourceResolverSource resolverprotected SQLDataSourceManager_sqlDataSourceManagerSQL data source manager
-
Constructor Summary
Constructors Constructor Description SqlTablesInit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration configuration)voidinit()Method to be implemented by user Init class.voidservice(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.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_pluginName
protected String _pluginName
Plugin name
-
_dataSourceId
protected String _dataSourceId
The data source identifer
-
_scripts
protected Set<org.ametys.core.script.SqlTablesInit.InitScript> _scripts
The set of configured table init scripts
-
_sqlDataSourceManager
protected SQLDataSourceManager _sqlDataSourceManager
SQL data source manager
-
_sourceResolver
protected SourceResolver _sourceResolver
Source resolver
-
-
Constructor Detail
-
SqlTablesInit
public SqlTablesInit()
-
-
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
-
init
public void init() throws Exception
Description copied from interface:InitMethod to be implemented by user Init class. Here you should manage the business part of your application init. As an Avalon component, class extending this interface have access to all Cocoon-managed components, all plugins, ...
-
-