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
FieldsModifier and TypeFieldDescriptionprotected StringThe data source identiferprotected StringPlugin nameprotected Set<org.ametys.core.script.SqlTablesInit.InitScript>The set of configured table init scriptsprotected SourceResolverSource resolverprotected SQLDataSourceManagerSQL data source manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(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 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: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
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
init
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, ...
-