Class ExportManager
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.contentio.export.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
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint_contentTypeExtensionPointContent type extension point.protected CreateSqlTableComponent_createSqlTableComponentThe create sql table component.protected DeleteSqlTableComponent_deleteSqlTableComponentThe delete sql table component.private ExportConfiguration_exportConfigurationprotected FillSqlTableComponent_fillSqlTableComponentThe fill sql table component.protected I18nUtils_i18nTranslatorThe i18n translator.static StringCONTENT_EXPORT_POOL_NAMEConnection pool namestatic StringCONTENT_TABLE_NAMEThe name of the table for mapping column namestatic StringDEFAULT_SEPARATORThe default separatorstatic StringDEFAULT_TABLE_PREFIXThe default prefixstatic StringMAPPING_COLUMN_NAMEThe name of the table for mapping column namestatic StringMAPPING_TABLE_NAMEThe name of the table for mapping table namestatic StringRICH_TEXT_DATA_TABLE_NAMEThe name of the table for datas from rich textstatic StringROLEThe component role
-
Constructor Summary
Constructors Constructor Description ExportManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 poolExportConfigurationgetExportConfiguration()Get export configurationprotected voidinitialize()Initializationvoidservice(ServiceManager sManager)voidsetExportConfiguration(ExportConfiguration exportConfiguration)Set export configuration-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
DEFAULT_TABLE_PREFIX
public static final String DEFAULT_TABLE_PREFIX
The default prefix- See Also:
- Constant Field Values
-
CONTENT_EXPORT_POOL_NAME
public static final String CONTENT_EXPORT_POOL_NAME
Connection pool name- See Also:
- Constant Field Values
-
RICH_TEXT_DATA_TABLE_NAME
public static final String RICH_TEXT_DATA_TABLE_NAME
The name of the table for datas from rich text- See Also:
- Constant Field Values
-
MAPPING_TABLE_NAME
public static final String MAPPING_TABLE_NAME
The name of the table for mapping table name- See Also:
- Constant Field Values
-
MAPPING_COLUMN_NAME
public static final String MAPPING_COLUMN_NAME
The name of the table for mapping column name- See Also:
- Constant Field Values
-
CONTENT_TABLE_NAME
public static final String CONTENT_TABLE_NAME
The name of the table for mapping column name- See Also:
- Constant Field Values
-
DEFAULT_SEPARATOR
public static final String DEFAULT_SEPARATOR
The default separator- See Also:
- Constant Field Values
-
_contentTypeExtensionPoint
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
Content type extension point.
-
_i18nTranslator
protected I18nUtils _i18nTranslator
The i18n translator.
-
_deleteSqlTableComponent
protected DeleteSqlTableComponent _deleteSqlTableComponent
The delete sql table component.
-
_createSqlTableComponent
protected CreateSqlTableComponent _createSqlTableComponent
The create sql table component.
-
_fillSqlTableComponent
protected FillSqlTableComponent _fillSqlTableComponent
The fill sql table component.
-
_exportConfiguration
private ExportConfiguration _exportConfiguration
-
-
Constructor Detail
-
ExportManager
public ExportManager()
-
-
Method Detail
-
service
public void service(ServiceManager sManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- 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
protected void _configureReservedWords(Configuration configuration) throws ConfigurationException
Configure the reserved words- Parameters:
configuration- the configuration- Throws:
ConfigurationException- if an error occurred
-
_configureSQLMapping
protected void _configureSQLMapping(Configuration configuration)
Configure the sql mapping- Parameters:
configuration- the configuration
-
export
public void export() throws SQLException, AmetysRepositoryException, ContextException, IOException
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
protected void initialize()
Initialization
-
getExportConfiguration
public ExportConfiguration getExportConfiguration()
Get export configuration- Returns:
- the export configuration
-
setExportConfiguration
public void setExportConfiguration(ExportConfiguration exportConfiguration)
Set export configuration- Parameters:
exportConfiguration- the export configuration
-
-