Class ExportManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.contentio.export.sql.ExportManager
- All Implemented Interfaces:
LogEnabled,Component,Configurable,Serviceable
public class ExportManager
extends AbstractLogEnabled
implements Configurable, Component, Serviceable
This component handles content export in database
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentTypeExtensionPointContent type extension point.protected CreateSqlTableComponentThe create sql table component.protected DeleteSqlTableComponentThe delete sql table component.protected FillSqlTableComponentThe fill sql table component.protected I18nUtilsThe i18n translator.static final StringConnection pool namestatic final StringThe name of the table for mapping column namestatic final StringThe default separatorstatic final StringThe default prefixstatic final StringThe name of the table for mapping column namestatic final StringThe name of the table for mapping table namestatic final StringThe name of the table for datas from rich textstatic final StringThe component role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_configureContentTypeToExport(Configuration configuration, String tablePrefix) Configure the content type to exportprotected void_configureReservedWords(Configuration configuration) Configure the reserved wordsprotected void_configureSQLMapping(Configuration configuration) Configure the sql mappingvoidconfigure(Configuration configuration) voidexport()Export the configured content types to the CONTENT_EXPORT_POOL_NAME db poolGet export configurationprotected voidInitializationvoidservice(ServiceManager sManager) voidsetExportConfiguration(ExportConfiguration exportConfiguration) Set export configurationMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role -
DEFAULT_TABLE_PREFIX
The default prefix- See Also:
-
CONTENT_EXPORT_POOL_NAME
Connection pool name- See Also:
-
RICH_TEXT_DATA_TABLE_NAME
The name of the table for datas from rich text- See Also:
-
MAPPING_TABLE_NAME
The name of the table for mapping table name- See Also:
-
MAPPING_COLUMN_NAME
The name of the table for mapping column name- See Also:
-
CONTENT_TABLE_NAME
The name of the table for mapping column name- See Also:
-
DEFAULT_SEPARATOR
The default separator- See Also:
-
_contentTypeExtensionPoint
Content type extension point. -
_i18nTranslator
The i18n translator. -
_deleteSqlTableComponent
The delete sql table component. -
_createSqlTableComponent
The create sql table component. -
_fillSqlTableComponent
The fill sql table component.
-
-
Constructor Details
-
ExportManager
public ExportManager()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
_configureContentTypeToExport
protected void _configureContentTypeToExport(Configuration configuration, String tablePrefix) throws ConfigurationException Configure the content type to export- Parameters:
configuration- the configurationtablePrefix- the table prefix- Throws:
ConfigurationException- if an error occurred
-
_configureReservedWords
Configure the reserved words- Parameters:
configuration- the configuration- Throws:
ConfigurationException- if an error occurred
-
_configureSQLMapping
Configure the sql mapping- Parameters:
configuration- the configuration
-
export
Export the configured content types to the CONTENT_EXPORT_POOL_NAME db pool- Throws:
SQLException- If a sql error occurredContextException- if a context error occurredAmetysRepositoryException- if a ametys repository error occurredIOException- if an IO error occurred
-
initialize
Initialization -
getExportConfiguration
Get export configuration- Returns:
- the export configuration
-
setExportConfiguration
Set export configuration- Parameters:
exportConfiguration- the export configuration
-