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
Modifier and TypeFieldDescriptionprotected String
The data source identiferprotected String
Plugin nameprotected Set<org.ametys.core.script.SqlTablesInit.InitScript>
The set of configured table init scriptsprotected SourceResolver
Source resolverprotected SQLDataSourceManager
SQL data source manager -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
_pluginName
Plugin name -
_dataSourceId
The data source identifer -
_scripts
The set of configured table init scripts -
_sqlDataSourceManager
SQL data source manager -
_sourceResolver
Source resolver
-
-
Constructor Details
-
SqlTablesInit
public SqlTablesInit()
-
-
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
-
init
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, ...
-