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
_dataSourceId
The data source identiferprotected String
_pluginName
Plugin nameprotected Set<org.ametys.core.script.SqlTablesInit.InitScript>
_scripts
The set of configured table init scriptsprotected SourceResolver
_sourceResolver
Source resolverprotected SQLDataSourceManager
_sqlDataSourceManager
SQL data source manager
-
Constructor Summary
Constructors Constructor Description SqlTablesInit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
void
init()
Method to be implemented by user Init class.void
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.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: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
-
init
public void init() throws Exception
Description copied from interface:Init
Method 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, ...
-
-