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
Modifier and TypeFieldDescriptionprotected ContentTypeExtensionPoint
Content type extension point.protected CreateSqlTableComponent
The create sql table component.protected DeleteSqlTableComponent
The delete sql table component.protected FillSqlTableComponent
The fill sql table component.protected I18nUtils
The i18n translator.static final String
Connection pool namestatic final String
The name of the table for mapping column namestatic final String
The default separatorstatic final String
The default prefixstatic final String
The name of the table for mapping column namestatic final String
The name of the table for mapping table namestatic final String
The name of the table for datas from rich textstatic final String
The component role -
Constructor Summary
-
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 mappingvoid
configure
(Configuration configuration) void
export()
Export the configured content types to the CONTENT_EXPORT_POOL_NAME db poolGet export configurationprotected void
Initializationvoid
service
(ServiceManager sManager) void
setExportConfiguration
(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in 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
-