Fork me on GitHub

Résultats CPD

Le document suivant contient les résultats de l'inspection CPD CPD 5.3.5.

Duplicatas

Fichier Ligne
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/util/LdapBrowser.java 157
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/util/LdapBrowser.java 260
            while ( ( userResults != null ) && userResults.hasMore(  ) )
            {
                sr = (SearchResult) userResults.next(  );

                Attributes attributes = sr.getAttributes(  );
                String strWssoId = "";

                if ( attributes.get( ATTRIBUTE_GUID ) != null )
                {
                    strWssoId = attributes.get( ATTRIBUTE_GUID ).get(  ).toString(  );
                }

                String strLastName = "";

                if ( attributes.get( ATTRIBUTE_FAMILY_NAME ) != null )
                {
                    strLastName = attributes.get( ATTRIBUTE_FAMILY_NAME ).get(  ).toString(  );
                }

                String strFirstName = "";

                if ( attributes.get( ATTRIBUTE_GIVEN_NAME ) != null )
                {
                    strFirstName = attributes.get( ATTRIBUTE_GIVEN_NAME ).get(  ).toString(  );
                }

                String strEmail = "";

                if ( attributes.get( ATTRIBUTE_EMAIL ) != null )
                {
                    strEmail = attributes.get( ATTRIBUTE_EMAIL ).get(  ).toString(  );
                }
Fichier Ligne
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/service/ImportWssoDatabaseUserService.java 384
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/web/WssodatabaseJspBean.java 1514
    }

    /**
     * Notify a user of the creation of his account and give him his credentials
     * @param user the user to notify
     * @param locale The locale
     * @param strProdUrl The prod URL
     */
    private void notifyUserAccountCreated( WssoUser user, Locale locale, String strProdUrl )
    {
        String strSenderEmail = AppPropertiesService.getProperty( PROPERTY_NO_REPLY_EMAIL );
        String strSiteName = AppPropertiesService.getProperty( PROPERTY_SITE_NAME );

        String strEmailSubject = I18nService.getLocalizedString( MESSAGE_ACCOUNT_IMPORTED_MAIL_SUBJECT,
                new String[] { strSiteName }, locale );
        String strBaseURL = strProdUrl;
        Map<String, Object> model = new HashMap<String, Object>( );
        model.put( MARK_USER, user );
        model.put( MARK_SITE_NAME, strSiteName );
        model.put( MARK_SITE_LINK, MailService.getSiteLink( strBaseURL, true ) );

        HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MAIL_USER_IMPORTED, locale, model );

        MailService
                .sendMailHtml( user.getEmail( ), strSenderEmail, strSenderEmail, strEmailSubject, template.getHtml( ) );
    }
Fichier Ligne
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 289
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 405
        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            WssoUser wssoUser = new WssoUser( );
            wssoUser.setMyluteceWssoUserId( daoUtil.getInt( 1 ) );
            wssoUser.setGuid( daoUtil.getString( 2 ) );
            wssoUser.setLastName( daoUtil.getString( 3 ) );
            wssoUser.setFirstName( daoUtil.getString( 4 ) );
            wssoUser.setEmail( daoUtil.getString( 5 ) );
            wssoUser.setDateLastLogin( daoUtil.getDate( 6 ) );

            listWssoUsers.add( wssoUser );
        }

        daoUtil.free( );

        return listWssoUsers;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<WssoUser> findWssoUserssByLastNameOrFirtNameOrEmailByProfil( String codeProfil, String strLastName,
Fichier Ligne
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 400
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 513
                    daoUtil.setString( 2, strEmail );
                }
            }
        }

        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            WssoUser wssoUser = new WssoUser( );
            wssoUser.setMyluteceWssoUserId( daoUtil.getInt( 1 ) );
            wssoUser.setGuid( daoUtil.getString( 2 ) );
            wssoUser.setLastName( daoUtil.getString( 3 ) );
            wssoUser.setFirstName( daoUtil.getString( 4 ) );
            wssoUser.setEmail( daoUtil.getString( 5 ) );
            wssoUser.setDateLastLogin( daoUtil.getDate( 6 ) );

            listWssoUsers.add( wssoUser );
        }

        daoUtil.free( );

        return listWssoUsers;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<WssoUser> findWssoUsersByLastNameOrFirstNameOrEmailByProfil( String strLastName, String strFirstName,
Fichier Ligne
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 289
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 518
        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            WssoUser wssoUser = new WssoUser( );
            wssoUser.setMyluteceWssoUserId( daoUtil.getInt( 1 ) );
            wssoUser.setGuid( daoUtil.getString( 2 ) );
            wssoUser.setLastName( daoUtil.getString( 3 ) );
            wssoUser.setFirstName( daoUtil.getString( 4 ) );
            wssoUser.setEmail( daoUtil.getString( 5 ) );
            wssoUser.setDateLastLogin( daoUtil.getDate( 6 ) );

            listWssoUsers.add( wssoUser );
        }

        daoUtil.free( );

        return listWssoUsers;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<WssoUser> findWssoUserssByLastNameOrFirtNameOrEmailByProfil( String codeProfil, String strLastName,
Fichier Ligne
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 200
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 231
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL, plugin );
        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            WssoUser wssoUser = new WssoUser( );
            wssoUser.setMyluteceWssoUserId( daoUtil.getInt( 1 ) );
            wssoUser.setGuid( daoUtil.getString( 2 ) );
            wssoUser.setLastName( daoUtil.getString( 3 ) );
            wssoUser.setFirstName( daoUtil.getString( 4 ) );
            wssoUser.setEmail( daoUtil.getString( 5 ) );
            wssoUser.setDateLastLogin( daoUtil.getDate( 6 ) );

            listWssoUsers.add( wssoUser );
        }

        daoUtil.free( );

        return listWssoUsers;
    }

    /**
     * Load the list of wssoUsers for a role
     * @param nIdRole The role of WssoUser
     * @param plugin The Plugin using this data access service
     * @return The Collection of the WssoUsers
     */
    public Collection<WssoUser> selectWssoUsersListForRole( int nIdRole, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 200
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 231
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 288
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL, plugin );
        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            WssoUser wssoUser = new WssoUser( );
            wssoUser.setMyluteceWssoUserId( daoUtil.getInt( 1 ) );
            wssoUser.setGuid( daoUtil.getString( 2 ) );
            wssoUser.setLastName( daoUtil.getString( 3 ) );
            wssoUser.setFirstName( daoUtil.getString( 4 ) );
            wssoUser.setEmail( daoUtil.getString( 5 ) );
            wssoUser.setDateLastLogin( daoUtil.getDate( 6 ) );

            listWssoUsers.add( wssoUser );
        }

        daoUtil.free( );

        return listWssoUsers;
    }
Fichier Ligne
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 201
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 232
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 405
fr/paris/lutece/plugins/mylutece/modules/wssodatabase/authentication/business/WssoUserDAO.java 518
        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            WssoUser wssoUser = new WssoUser( );
            wssoUser.setMyluteceWssoUserId( daoUtil.getInt( 1 ) );
            wssoUser.setGuid( daoUtil.getString( 2 ) );
            wssoUser.setLastName( daoUtil.getString( 3 ) );
            wssoUser.setFirstName( daoUtil.getString( 4 ) );
            wssoUser.setEmail( daoUtil.getString( 5 ) );
            wssoUser.setDateLastLogin( daoUtil.getDate( 6 ) );

            listWssoUsers.add( wssoUser );
        }

        daoUtil.free( );

        return listWssoUsers;
    }