public class ExportManager extends AbstractLogEnabled implements Configurable, Component, Serviceable
Modifier and Type | Field and Description |
---|---|
protected ContentTypeExtensionPoint |
_contentTypeExtensionPoint
Content type extension point.
|
protected CreateSqlTableComponent |
_createSqlTableComponent
The create sql table component.
|
protected DeleteSqlTableComponent |
_deleteSqlTableComponent
The delete sql table component.
|
private ExportConfiguration |
_exportConfiguration |
protected FillSqlTableComponent |
_fillSqlTableComponent
The fill sql table component.
|
protected I18nUtils |
_i18nTranslator
The i18n translator.
|
static String |
CONTENT_EXPORT_POOL_NAME
Connection pool name
|
static String |
CONTENT_TABLE_NAME
The name of the table for mapping column name
|
static String |
DEFAULT_SEPARATOR
The default separator
|
static String |
DEFAULT_TABLE_PREFIX
The default prefix
|
static String |
MAPPING_COLUMN_NAME
The name of the table for mapping column name
|
static String |
MAPPING_TABLE_NAME
The name of the table for mapping table name
|
static String |
RICH_TEXT_DATA_TABLE_NAME
The name of the table for datas from rich text
|
static String |
ROLE
The component role
|
Constructor and Description |
---|
ExportManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
_configureContentTypeToExport(Configuration configuration,
String tablePrefix)
Configure the content type to export
|
protected void |
_configureReservedWords(Configuration configuration)
Configure the reserved words
|
protected void |
_configureSQLMapping(Configuration configuration)
Configure the sql mapping
|
void |
configure(Configuration configuration) |
void |
export()
Export the configured content types to the CONTENT_EXPORT_POOL_NAME db pool
|
ExportConfiguration |
getExportConfiguration()
Get export configuration
|
protected void |
initialize()
Initialization
|
void |
service(ServiceManager sManager) |
void |
setExportConfiguration(ExportConfiguration exportConfiguration)
Set export configuration
|
getLogger, setLogger
public static final String DEFAULT_TABLE_PREFIX
public static final String CONTENT_EXPORT_POOL_NAME
public static final String RICH_TEXT_DATA_TABLE_NAME
public static final String MAPPING_TABLE_NAME
public static final String MAPPING_COLUMN_NAME
public static final String CONTENT_TABLE_NAME
public static final String DEFAULT_SEPARATOR
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
protected I18nUtils _i18nTranslator
protected DeleteSqlTableComponent _deleteSqlTableComponent
protected CreateSqlTableComponent _createSqlTableComponent
protected FillSqlTableComponent _fillSqlTableComponent
private ExportConfiguration _exportConfiguration
public ExportManager()
public void service(ServiceManager sManager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
protected void _configureContentTypeToExport(Configuration configuration, String tablePrefix) throws ConfigurationException
configuration
- the configurationtablePrefix
- the table prefixConfigurationException
- if an error occurredprotected void _configureReservedWords(Configuration configuration) throws ConfigurationException
configuration
- the configurationConfigurationException
- if an error occurredprotected void _configureSQLMapping(Configuration configuration)
configuration
- the configurationpublic void export() throws SQLException, AmetysRepositoryException, ContextException, IOException
SQLException
- If a sql error occurredContextException
- if a context error occurredAmetysRepositoryException
- if a ametys repository error occurredIOException
- if an IO error occurredprotected void initialize()
public ExportConfiguration getExportConfiguration()
public void setExportConfiguration(ExportConfiguration exportConfiguration)
exportConfiguration
- the export configuration