Fork me on GitHub

CPD Results

The following document contains the results of PMD's CPD 5.3.5.

Duplications

File Line
fr/paris/lutece/plugins/workflow/modules/fillingdirectory/service/TaskFillingDirectory.java 144
fr/paris/lutece/plugins/workflow/modules/fillingdirectory/web/FillingDirectoryTaskComponent.java 309
            if ( entry != null )
            {
                List<RecordField> listRecordFieldResult = new ArrayList<RecordField>(  );

                try
                {
                    if ( config.isUsedUser(  ) )
                    {
                        List<String> listString = new ArrayList<String>(  );
                        listString.add( AdminUserService.getAdminUser( request ).getAccessCode(  ) );
                        entry.getRecordFieldData( record, listString, true, config.isAddNewValue(  ),
                            listRecordFieldResult, locale );
                    }
                    else if ( !config.isUsedTaskEntry(  ) )
                    {
                        entry.getRecordFieldData( record, request, true, config.isAddNewValue(  ),
                            listRecordFieldResult, locale );
                    }
                    else
                    {
                        if ( ( entry.getEntryType(  ).getIdType(  ) == DirectoryUtils.convertStringToInt( 
                                    strIdEntryTypeFile ) ) ||
                                ( entry.getEntryType(  ).getIdType(  ) == DirectoryUtils.convertStringToInt( 
                                    strIdEntryTypeImg ) ) )
                        {
                            entry.getRecordFieldData( record,
                                TaskFillingDirectoryUtils.getParameterValue( request, config.getEntryParameter(  ) ),
                                true, config.isAddNewValue(  ), listRecordFieldResult, locale );
                        }
                        else if ( ( entry.getEntryType(  ).getIdType(  ) == DirectoryUtils.convertStringToInt( 
                                    strIdEntryTypeCheckBox ) ) )
                        {
                            entry.getRecordFieldData( record,
                                TaskFillingDirectoryUtils.getParameterValuesTypeMultipleChoice( request,
                                    config.getEntryParameter(  ) ), true, config.isAddNewValue(  ),
                                listRecordFieldResult, locale );
                        }
                        else
                        {
File Line
fr/paris/lutece/plugins/workflow/modules/fillingdirectory/business/RecordFieldHistoryDAO.java 119
fr/paris/lutece/plugins/workflow/modules/fillingdirectory/business/RecordFieldHistoryDAO.java 174
        daoUtil.setInt( ++nPos, nIdHistory );
        daoUtil.setInt( ++nPos, nIdTask );

        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            nPos = 0;
            recordField = new RecordField(  );
            recordField.setIdRecordField( daoUtil.getInt( ++nPos ) );
            record = new Record(  );

            record.setIdRecord( daoUtil.getInt( ++nPos ) );
            recordField.setRecord( record );
            recordField.setValue( daoUtil.getString( ++nPos ) );

            entry = new Entry(  );
            entry.setIdEntry( daoUtil.getInt( ++nPos ) );
            recordField.setEntry( entry );

            if ( daoUtil.getObject( ++nPos ) != null )
            {
                field = new Field(  );
                field.setIdField( daoUtil.getInt( nPos ) );
                recordField.setField( field );
            }

            if ( daoUtil.getObject( ++nPos ) != null )
            {
                file = new File(  );
                file.setIdFile( daoUtil.getInt( nPos ) );
                recordField.setFile( file );
            }

            listRecordFiel.add( recordField );
        }

        daoUtil.free(  );

        return listRecordFiel;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<RecordField> selectByTask( int nIdTask, Plugin plugin )
File Line
fr/paris/lutece/plugins/workflow/modules/fillingdirectory/business/TaskFillingDirectoryConfigDAO.java 68
fr/paris/lutece/plugins/workflow/modules/fillingdirectory/business/TaskFillingDirectoryConfigDAO.java 90
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, FillingDirectoryPlugin.getPlugin(  ) );

        int nPos = 0;

        daoUtil.setInt( ++nPos, config.getIdTask(  ) );
        daoUtil.setInt( ++nPos, config.getIdDirectory(  ) );
        daoUtil.setInt( ++nPos, config.getPositionEntryDirectory(  ) );
        daoUtil.setBoolean( ++nPos, config.isUsedTaskEntry(  ) );
        daoUtil.setInt( ++nPos, config.getIdTaskEntry(  ) );
        daoUtil.setString( ++nPos, config.getEntryParameter(  ) );
        daoUtil.setBoolean( ++nPos, config.isUsedUser(  ) );
        daoUtil.setBoolean( ++nPos, config.isAddNewValue(  ) );
        daoUtil.executeUpdate(  );