CPD Results
The following document contains the results of PMD's CPD 6.13.0.
Duplications
File |
Line |
fr/paris/lutece/plugins/importexport/web/ExportDataJspBean.java |
156 |
fr/paris/lutece/plugins/importexport/web/ImportDataJspBean.java |
134 |
String strDatabaseTables = AppPropertiesService.getProperty( PROPERTY_DATABASE_TABLES );
ReferenceList refList = new ReferenceList( );
if ( StringUtils.isNotBlank( strDatabaseTables ) )
{
for ( String strDatabaseTable : strDatabaseTables.split( CONSTANT_SEMICOLON ) )
{
ReferenceItem refItem = new ReferenceItem( );
refItem.setCode( strDatabaseTable );
refItem.setName( strDatabaseTable );
refList.add( refItem );
}
}
Map<String, Object> model = new HashMap<String, Object>( );
model.put( MARK_DATABASE_TABLES, refList );
Collection<Plugin> listPlugins = PluginService.getPluginList( );
ReferenceList refListPlugins = new ReferenceList( );
ReferenceItem refItemPlugin = new ReferenceItem( );
Plugin core = PluginService.getCore( );
refItemPlugin.setName( core.getName( ) );
refItemPlugin.setCode( core.getName( ) );
refListPlugins.add( refItemPlugin );
for ( Plugin plugin : listPlugins )
{
if ( plugin.isDbPoolRequired( ) )
{
refItemPlugin = new ReferenceItem( );
refItemPlugin.setName( plugin.getName( ) );
refItemPlugin.setCode( plugin.getName( ) );
refListPlugins.add( refItemPlugin );
}
}
model.put( MARK_LIST_PLUGIN, refListPlugins ); |
File |
Line |
fr/paris/lutece/plugins/importexport/web/ExportDataJspBean.java |
170 |
fr/paris/lutece/plugins/importexport/web/ExportDataJspBean.java |
517 |
model.put( MARK_DATABASE_TABLES, refList );
Collection<Plugin> listPlugins = PluginService.getPluginList( );
ReferenceList refListPlugins = new ReferenceList( );
ReferenceItem refItemPlugin = new ReferenceItem( );
Plugin core = PluginService.getCore( );
refItemPlugin.setName( core.getName( ) );
refItemPlugin.setCode( core.getName( ) );
refListPlugins.add( refItemPlugin );
for ( Plugin plugin : listPlugins )
{
if ( plugin.isDbPoolRequired( ) )
{
refItemPlugin = new ReferenceItem( );
refItemPlugin.setName( plugin.getName( ) );
refItemPlugin.setCode( plugin.getName( ) );
refListPlugins.add( refItemPlugin );
}
}
model.put( MARK_LIST_PLUGIN, refListPlugins );
ReferenceList refListXslExport = XslExportHome.getRefListByPlugin( ImportExportPlugin.getPlugin( ) );
model.put( MARK_LIST_XSL_EXPORT, refListXslExport );
HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_EXPORT_DATA, AdminUserService.getLocale( request ), model ); |
File |
Line |
fr/paris/lutece/plugins/importexport/web/ExportDataJspBean.java |
517 |
fr/paris/lutece/plugins/importexport/web/ImportDataJspBean.java |
148 |
model.put( MARK_DATABASE_TABLES, refList );
Collection<Plugin> listPlugins = PluginService.getPluginList( );
ReferenceList refListPlugins = new ReferenceList( );
ReferenceItem refItemPlugin = new ReferenceItem( );
Plugin core = PluginService.getCore( );
refItemPlugin.setName( core.getName( ) );
refItemPlugin.setCode( core.getName( ) );
refListPlugins.add( refItemPlugin );
for ( Plugin plugin : listPlugins )
{
if ( plugin.isDbPoolRequired( ) )
{
refItemPlugin = new ReferenceItem( );
refItemPlugin.setName( plugin.getName( ) );
refItemPlugin.setCode( plugin.getName( ) );
refListPlugins.add( refItemPlugin );
}
}
model.put( MARK_LIST_PLUGIN, refListPlugins ); |
File |
Line |
fr/paris/lutece/plugins/importexport/business/importdata/ImportDataDAO.java |
150 |
fr/paris/lutece/plugins/importexport/business/importdata/ImportDataDAO.java |
195 |
public void insertElement( List<ImportExportElement> listElements ) throws AppException, SQLException
{
if ( _transaction == null || _transaction.getStatus( ) != Transaction.OPENED )
{
throw new AppException( I18nService.getLocalizedString( ERROR_MESSAGE_TRANSACTION_CLOSED, _locale ) );
}
if ( listElements == null || listElements.size( ) != _listTableColumns.size( ) )
{
AppException appException = new AppException( I18nService.getLocalizedString( ERROR_MESSAGE_WRONG_LIST_ELEMENTS_SIZE, _locale ) );
int nElemNumber = 0;
if ( listElements != null )
{
nElemNumber = listElements.size( );
}
AppLogService.info( appException.getMessage( ) + " expected " + _listTableColumns.size( ) + " elements, found " + nElemNumber );
throw appException;
}
_transaction.prepareStatement( getSqlInsert( ) ); |