Fork me on GitHub

Résultats CPD

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

Duplicatas

Fichier Ligne
fr/paris/lutece/plugins/suggest/business/EntryTypeText.java 179
fr/paris/lutece/plugins/suggest/business/EntryTypeUrl.java 163
    }

    /**
     * Get template create url of the entry
     * 
     * @return template create url of the entry
     */
    @Override
    public String getTemplateCreate( )
    {
        return TEMPLATE_CREATE;
    }

    /**
     * Get the template modify url of the entry
     * 
     * @return template modify url of the entry
     */
    @Override
    public String getTemplateModify( )
    {
        return TEMPLATE_MODIFY;
    }

    /**
     * The paginator who is use in the template modify of the entry
     * 
     * @param nItemPerPage
     *            Number of items to display per page
     * @param strBaseUrl
     *            The base Url for build links on each page link
     * @param strPageIndexParameterName
     *            The parameter name for the page index
     * @param strPageIndex
     *            The current page index
     * @return the paginator who is use in the template modify of the entry
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * return the list of regular expression whose not associate to the entry
     * 
     * @param entry
     *            the entry
     * @param plugin
     *            the plugin
     * @return the list of regular expression whose not associate to the entry
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = new ReferenceList( );

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            List<RegularExpression> listRegularExpression = RegularExpressionService.getInstance( ).getAllRegularExpression( );

            for ( RegularExpression regularExpression : listRegularExpression )
            {
                if ( !entry.getRegularExpressionList( ).contains( regularExpression ) )
                {
                    refListRegularExpression.addItem( regularExpression.getIdExpression( ), regularExpression.getTitle( ) );
                }
            }
        }

        return refListRegularExpression;
    }

    /**
     * save in the list of response the response associate to the entry in the form submit
     * 
     * @param request
     *            HttpRequest
     * @param listResponse
     *            the list of response associate to the entry in the form submit
     * @param locale
     *            the locale
     * @return a Form error object if there is an error in the response
     */
    @Override
    public FormError getResponseData( HttpServletRequest request, List<Response> listResponse, Locale locale )
    {
        String strValueEntry = request.getParameter( SuggestUtils.EMPTY_STRING + this.getIdEntry( ) ).trim( );
        List<RegularExpression> listRegularExpression = this.getRegularExpressionList( );
        Response response = new Response( );
        response.setEntry( this );

        if ( strValueEntry != null )
        {
            if ( this.isMandatory( ) && strValueEntry.equals( SuggestUtils.EMPTY_STRING ) )
            {
                FormError formError = new FormError( );
                formError.setMandatoryError( true );
                formError.setTitleQuestion( this.getTitle( ) );

                return formError;
            }

            if ( ( listRegularExpression != null ) && ( !listRegularExpression.isEmpty( ) ) && RegularExpressionService.getInstance( ).isAvailable( ) )
            {
                for ( RegularExpression regularExpression : listRegularExpression )
                {
                    if ( !RegularExpressionService.getInstance( ).isMatches( strValueEntry, regularExpression ) )
                    {
                        FormError formError = new FormError( );
                        formError.setMandatoryError( false );
                        formError.setTitleQuestion( this.getTitle( ) );
                        formError.setErrorMessage( regularExpression.getErrorMessage( ) );

                        return formError;
                    }
                }
            }

            response.setValueResponse( strValueEntry );
        }

        listResponse.add( response );

        return null;
    }

    /**
     * save in the list of response the response associate to the entry in the form submit
     * 
     * @param nIdSuggestSubmit
     *            The if of the SuggestSubmit
     * @param request
     *            HttpRequest
     * @param listResponse
     *            the list of response associate to the entry in the form submit
     * @param locale
     *            the locale
     * @param plugin
     *            the plugin
     * @return a Form error object if there is an error in the response
     */
    @Override
    public FormError getResponseData( int nIdSuggestSubmit, HttpServletRequest request, List<Response> listResponse, Locale locale, Plugin plugin )
    {
        return getResponseData( request, listResponse, locale );
    }

    /**
     * Get the template of the html code of the response value associate to the entry
     * 
     * @param response
     *            the response associate to the entry
     * @return the template of the html code of the response value associate to the entry
     */
    @Override
    public String getTemplateHtmlCodeResponse( )
    {
        return TEMPLATE_HTML_CODE_RESPONSE;
    }
}
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/EntryTypeText.java 69
fr/paris/lutece/plugins/suggest/business/EntryTypeUrl.java 69
    @Override
    public String getTemplateHtmlCodeForm( )
    {
        return TEMPLATE_HTML_CODE_FORM;
    }

    /**
     * Get the request data
     * 
     * @param request
     *            HttpRequest
     * @param locale
     *            the locale
     * @return null if all data requiered are in the request else the url of jsp error
     */
    @Override
    public String getRequestData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = request.getParameter( PARAMETER_HELP_MESSAGE );
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strValue = request.getParameter( PARAMETER_VALUE );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strWidth = request.getParameter( PARAMETER_WIDTH );
        String strMaxSizeEnter = request.getParameter( PARAMETER_MAX_SIZE_ENTER );
        String strShowInSuggestSubmitList = request.getParameter( PARAMETER_SHOW_IN_SUGGEST_SUBMIT_LIST );

        int nWidth = -1;
        int nMaxSizeEnter = -1;

        String strFieldError = EMPTY_STRING;

        if ( ( strTitle == null ) || strTitle.trim( ).equals( EMPTY_STRING ) )
        {
            strFieldError = FIELD_TITLE;
        }

        else
            if ( ( strWidth == null ) || strWidth.trim( ).equals( EMPTY_STRING ) )
            {
                strFieldError = FIELD_WIDTH;
            }

        if ( !strFieldError.equals( EMPTY_STRING ) )
        {
            Object [ ] tabRequiredFields = {
                I18nService.getLocalizedString( strFieldError, locale )
            };

            return AdminMessageService.getMessageUrl( request, MESSAGE_MANDATORY_FIELD, tabRequiredFields, AdminMessage.TYPE_STOP );
        }

        try
        {
            nWidth = Integer.parseInt( strWidth );
        }
        catch( NumberFormatException ne )
        {
            strFieldError = FIELD_WIDTH;
        }

        try
        {
            if ( ( strMaxSizeEnter != null ) && !strMaxSizeEnter.trim( ).equals( EMPTY_STRING ) )
            {
                nMaxSizeEnter = Integer.parseInt( strMaxSizeEnter );
            }
        }
        catch( NumberFormatException ne )
        {
            strFieldError = FIELD_MAX_SIZE_ENTER;
        }

        if ( !strFieldError.equals( EMPTY_STRING ) )
        {
            Object [ ] tabRequiredFields = {
                I18nService.getLocalizedString( strFieldError, locale )
            };

            return AdminMessageService.getMessageUrl( request, MESSAGE_NUMERIC_FIELD, tabRequiredFields, AdminMessage.TYPE_STOP );
        }

        this.setTitle( strTitle );
        this.setHelpMessage( SuggestUtils.trim( strHelpMessage ) );
        this.setComment( strComment );

        this.setDefaultValue( strValue );
        this.setWidth( nWidth );
        this.setMaxSizeEnter( nMaxSizeEnter );

        this.setMandatory( strMandatory != null );
        this.setShowInSuggestSubmitList( strShowInSuggestSubmitList != null );

        return null;
    }
Fichier Ligne
fr/paris/lutece/plugins/suggest/web/action/MassChangeCommentSuggestSubmitAction.java 76
fr/paris/lutece/plugins/suggest/web/action/MassChangeVoteSuggestSubmitAction.java 76
    @Override
    public void fillModel( HttpServletRequest request, AdminUser adminUser, Map<String, Object> model )
    {
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getName( )
    {
        return ACTION_NAME;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getButtonTemplate( )
    {
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isInvoked( HttpServletRequest request )
    {
        return ( ( request.getParameter( PARAMETER_MASS_DISABLE_ACTION ) != null ) || ( request.getParameter( PARAMETER_MASS_ENABLE_ACTION ) != null ) );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public IPluginActionResult process( HttpServletRequest request, HttpServletResponse response, AdminUser adminUser, SuggestAdminSearchFields searchFields )
            throws AccessDeniedException
    {
        IPluginActionResult result = new DefaultPluginActionResult( );

        int nIdSuggestSubmit;
        String strRedirect = SuggestJspBean.getJspManageSuggestSubmit( request );

        if ( ( searchFields.getSelectedSuggestSubmit( ) != null ) && !searchFields.getSelectedSuggestSubmit( ).isEmpty( ) )
        {
            // test All ressource selected before update
            for ( String strIdSuggestSubmit : searchFields.getSelectedSuggestSubmit( ) )
            {
                if ( StringUtils.isNotBlank( strIdSuggestSubmit ) && StringUtils.isNumeric( strIdSuggestSubmit ) )
                {
                    nIdSuggestSubmit = SuggestUtils.getIntegerParameter( strIdSuggestSubmit );

                    SuggestSubmit suggestSubmit = SuggestSubmitService.getService( ).findByPrimaryKey( nIdSuggestSubmit, false, getPlugin( ) );

                    if ( ( suggestSubmit == null )
                            || !RBACService.isAuthorized( Suggest.RESOURCE_TYPE, SuggestUtils.EMPTY_STRING + suggestSubmit.getSuggest( ).getIdSuggest( ),
                                    SuggestResourceIdService.PERMISSION_MANAGE_SUGGEST_SUBMIT, adminUser ) )
                    {
                        throw new AccessDeniedException( "Access denied" );
                    }
                }
            }

            boolean isDisabledVote = ( request.getParameter( PARAMETER_MASS_DISABLE_ACTION ) != null );

            // update all suggest submit selected
            for ( String strIdSuggestSubmittoUpdate : searchFields.getSelectedSuggestSubmit( ) )
            {
                if ( StringUtils.isNotBlank( strIdSuggestSubmittoUpdate ) && StringUtils.isNumeric( strIdSuggestSubmittoUpdate ) )
                {
                    nIdSuggestSubmit = SuggestUtils.getIntegerParameter( strIdSuggestSubmittoUpdate );

                    SuggestSubmit suggestSubmit = SuggestSubmitService.getService( ).findByPrimaryKey( nIdSuggestSubmit, false, getPlugin( ) );
                    suggestSubmit.setDisableComment( isDisabledVote );
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 552
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 711
        String strSQL = SuggestUtils.buildRequestWithFilter( SQL_QUERY_SELECT_ID_SUGGEST_SUBMIT_BY_FILTER, listStrFilter, strOrderBy );

        try( DAOUtil daoUtil = new DAOUtil( strSQL, plugin ) )
        {
            int nIndex = 1;

            if ( filter.containsIdSuggest( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdSuggest( ) );
                nIndex++;
            }

            if ( filter.containsIdSuggestSubmit( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdSuggestSubmit( ) );
                nIndex++;
            }

            if ( filter.containsIdSuggestSubmitState( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdSuggestSubmitState( ) );
                nIndex++;
            }

            if ( filter.containsIdCategory( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdCategory( ) );
                nIndex++;
            }

            if ( filter.containsDateFirst( ) )
            {
                daoUtil.setTimestamp( nIndex, filter.getDateFirst( ) );
                nIndex++;
            }

            if ( filter.containsDateLast( ) )
            {
                daoUtil.setTimestamp( nIndex, filter.getDateLast( ) );
                nIndex++;
            }

            if ( filter.containsIdReported( ) )
            {
                daoUtil.setBoolean( nIndex, filter.convertIdBoolean( filter.getIdReported( ) ) );
                nIndex++;
            }

            if ( filter.containsNumberVote( ) )
            {
                daoUtil.setInt( nIndex, filter.getNumberVote( ) );
                nIndex++;
            }

            if ( filter.containsIdPinned( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdPinned( ) );
                nIndex++;
            }

            if ( filter.containsLuteceUserKey( ) )
            {
                daoUtil.setString( nIndex, filter.getLuteceUserKey( ) );
                nIndex++;
            }

            if ( filter.containsIdType( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdType( ) );
                nIndex++;
            }

            daoUtil.executeQuery( );
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/EntryTypeImage.java 97
fr/paris/lutece/plugins/suggest/business/EntryTypeVideo.java 110
        String strShowInSuggestSubmitList = request.getParameter( PARAMETER_SHOW_IN_SUGGEST_SUBMIT_LIST );

        int nWidth = -1;
        int nHeight = -1;

        String strFieldError = EMPTY_STRING;

        if ( ( strTitle == null ) || strTitle.trim( ).equals( EMPTY_STRING ) )
        {
            strFieldError = FIELD_TITLE;
        }

        if ( !strFieldError.equals( EMPTY_STRING ) )
        {
            Object [ ] tabRequiredFields = {
                I18nService.getLocalizedString( strFieldError, locale )
            };

            return AdminMessageService.getMessageUrl( request, MESSAGE_MANDATORY_FIELD, tabRequiredFields, AdminMessage.TYPE_STOP );
        }

        try
        {
            if ( !( ( strHeight == null ) || strHeight.trim( ).equals( EMPTY_STRING ) ) )
            {
                nHeight = Integer.parseInt( strHeight );
            }
        }
        catch( NumberFormatException ne )
        {
            strFieldError = FIELD_HEIGHT;
        }

        try
        {
            if ( !( ( strWidth == null ) || strWidth.trim( ).equals( EMPTY_STRING ) ) )
            {
                nWidth = Integer.parseInt( strWidth );
            }
        }
        catch( NumberFormatException ne )
        {
            strFieldError = FIELD_WIDTH;
        }

        if ( !strFieldError.equals( EMPTY_STRING ) )
        {
            Object [ ] tabRequiredFields = {
                I18nService.getLocalizedString( strFieldError, locale )
            };

            return AdminMessageService.getMessageUrl( request, MESSAGE_NUMERIC_FIELD, tabRequiredFields, AdminMessage.TYPE_STOP );
        }
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 487
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 650
        if ( filter.containsIdSuggest( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_SUGGEST );
        }

        if ( filter.containsIdSuggestSubmit( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_SUGGEST_SUBMIT );
        }

        if ( filter.containsIdSuggestSubmitState( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_SUGGEST_SUBMIT_STATE );
        }

        if ( filter.containsIdCategory( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_CATEGORY );
        }

        if ( filter.containsDateFirst( ) )
        {
            listStrFilter.add( SQL_FILTER_DATE_FIRST_SUBMIT );
        }

        if ( filter.containsDateLast( ) )
        {
            listStrFilter.add( SQL_FILTER_DATE_LAST_SUBMIT );
        }

        if ( filter.containsIdReported( ) )
        {
            listStrFilter.add( SQL_FILTER_REPORTED );
        }

        if ( filter.containsNumberVote( ) )
        {
            listStrFilter.add( SQL_FILTER_NUMBER_VOTE );
        }

        if ( filter.containsIdPinned( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_PINNED );
        }
        if ( filter.containsLuteceUserKey( ) )
        {
            listStrFilter.add( SQL_FILTER_LUTECE_USER_KEY );
        }

        if ( filter.containsIdType( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_TYPE );
        }

        if ( filter.containsIdContainsCommentDisable( ) )
        {
            listStrFilter.add( ( filter.getIdContainsCommentDisable( ) == SubmitFilter.ID_TRUE ) ? SQL_FILTER_CONTAINS_COMMENT_DISABLE
                    : SQL_FILTER_NOT_CONTAINS_COMMENT_DISABLE );
        }
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 408
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 566
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 724
                daoUtil.setInt( nIndex, filter.getIdSuggest( ) );
                nIndex++;
            }

            if ( filter.containsIdSuggestSubmitState( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdSuggestSubmitState( ) );
                nIndex++;
            }

            if ( filter.containsIdCategory( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdCategory( ) );
                nIndex++;
            }

            if ( filter.containsDateFirst( ) )
            {
                daoUtil.setTimestamp( nIndex, filter.getDateFirst( ) );
                nIndex++;
            }

            if ( filter.containsDateLast( ) )
            {
                daoUtil.setTimestamp( nIndex, filter.getDateLast( ) );
                nIndex++;
            }

            if ( filter.containsIdReported( ) )
            {
                daoUtil.setBoolean( nIndex, filter.convertIdBoolean( filter.getIdReported( ) ) );
                nIndex++;
            }

            if ( filter.containsNumberVote( ) )
            {
                daoUtil.setInt( nIndex, filter.getNumberVote( ) );
                nIndex++;
            }

            if ( filter.containsIdPinned( ) )
            {
                daoUtil.setInt( nIndex, filter.getIdPinned( ) );
                nIndex++;
            }

            if ( filter.containsIdType( ) )
Fichier Ligne
fr/paris/lutece/plugins/suggest/web/action/MassChangeCommentSuggestSubmitAction.java 105
fr/paris/lutece/plugins/suggest/web/action/MassChangeVoteSuggestSubmitAction.java 105
fr/paris/lutece/plugins/suggest/web/action/MassPinnedSuggestSubmitAction.java 105
        return ( ( request.getParameter( PARAMETER_MASS_DISABLE_ACTION ) != null ) || ( request.getParameter( PARAMETER_MASS_ENABLE_ACTION ) != null ) );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public IPluginActionResult process( HttpServletRequest request, HttpServletResponse response, AdminUser adminUser, SuggestAdminSearchFields searchFields )
            throws AccessDeniedException
    {
        IPluginActionResult result = new DefaultPluginActionResult( );

        int nIdSuggestSubmit;
        String strRedirect = SuggestJspBean.getJspManageSuggestSubmit( request );

        if ( ( searchFields.getSelectedSuggestSubmit( ) != null ) && !searchFields.getSelectedSuggestSubmit( ).isEmpty( ) )
        {
            // test All ressource selected before update
            for ( String strIdSuggestSubmit : searchFields.getSelectedSuggestSubmit( ) )
            {
                if ( StringUtils.isNotBlank( strIdSuggestSubmit ) && StringUtils.isNumeric( strIdSuggestSubmit ) )
                {
                    nIdSuggestSubmit = SuggestUtils.getIntegerParameter( strIdSuggestSubmit );

                    SuggestSubmit suggestSubmit = SuggestSubmitService.getService( ).findByPrimaryKey( nIdSuggestSubmit, false, getPlugin( ) );

                    if ( ( suggestSubmit == null )
                            || !RBACService.isAuthorized( Suggest.RESOURCE_TYPE, SuggestUtils.EMPTY_STRING + suggestSubmit.getSuggest( ).getIdSuggest( ),
                                    SuggestResourceIdService.PERMISSION_MANAGE_SUGGEST_SUBMIT, adminUser ) )
                    {
                        throw new AccessDeniedException( "Access denied" );
                    }
                }
            }

            boolean isDisabledVote = ( request.getParameter( PARAMETER_MASS_DISABLE_ACTION ) != null );
Fichier Ligne
fr/paris/lutece/plugins/suggest/web/SuggestJspBean.java 2735
fr/paris/lutece/plugins/suggest/web/SuggestJspBean.java 2782
    public String doMoveUpEntry( HttpServletRequest request )
    {
        Plugin plugin = getPlugin( );
        IEntry entry;
        String strIdEntry = request.getParameter( PARAMETER_ID_ENTRY );
        int nIdEntry = SuggestUtils.getIntegerParameter( strIdEntry );

        entry = EntryHome.findByPrimaryKey( nIdEntry, plugin );

        Suggest suggest = SuggestHome.findByPrimaryKey( _nIdSuggest, plugin );

        if ( ( entry == null ) || ( suggest == null )
                || !RBACService.isAuthorized( Suggest.RESOURCE_TYPE, EMPTY_STRING + _nIdSuggest, SuggestResourceIdService.PERMISSION_MODIFY, getUser( ) ) )
        {
            return getJspManageSuggest( request );
        }

        List<IEntry> listEntry;
        EntryFilter filter = new EntryFilter( );
        filter.setIdSuggest( entry.getSuggest( ).getIdSuggest( ) );
        listEntry = EntryHome.getEntryList( filter, plugin );

        int nIndexEntry = SuggestUtils.getIndexEntryInTheEntryList( nIdEntry, listEntry );

        if ( nIndexEntry != 0 )
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/ResponseDAO.java 139
fr/paris/lutece/plugins/suggest/business/ResponseDAO.java 278
            if ( daoUtil.next( ) )
            {
                response = new Response( );
                response.setIdResponse( daoUtil.getInt( 1 ) );

                suggestSubmit = new SuggestSubmit( );
                suggestSubmit.setIdSuggestSubmit( daoUtil.getInt( 2 ) );
                response.setSuggestSubmit( suggestSubmit );

                response.setValueResponse( daoUtil.getString( 3 ) );
                entryType = new EntryType( );
                entryType.setClassName( daoUtil.getString( 4 ) );
                entryType.setIdType( daoUtil.getInt( 7 ) );

                try
                {
                    entry = (IEntry) Class.forName( entryType.getClassName( ) ).newInstance( );
                }
                catch( ClassNotFoundException | InstantiationException | IllegalAccessException e )
                {
                    // class doesn't exist or class is abstract or is an interface or haven't accessible builder or can't access to rhe class
                    AppLogService.error( e.getMessage( ), e );
                    bException = true;
                }

                if ( bException )
                {
                    return null;
Fichier Ligne
fr/paris/lutece/plugins/suggest/web/SuggestApp.java 801
fr/paris/lutece/plugins/suggest/web/SuggestApp.java 887
            SuggestSubscriptionProviderService.getService( ).createSuggestSubmitSubscription( luteceUserConnected, nIdSubmitSuggest );

            urlItem.addParameter( PARAMETER_ID_SUBMIT_SUGGEST, strIdSubmitSuggest );
            urlItem.addParameter( PARAMETER_ACTION, ACTION_VIEW_SUGGEST_SUBMIT );
        }
        else
        {
            String strIdFilterCategory = request.getParameter( PARAMETER_ID_FILTER_CATEGORY_SUGGEST );
            int nIdCategory = -1;

            if ( StringUtils.isNotEmpty( strIdFilterCategory ) && StringUtils.isNumeric( strIdFilterCategory ) )
            {
                nIdCategory = Integer.parseInt( strIdFilterCategory );
            }

            if ( nIdCategory > 0 )
            {
                if ( CategoryHome.findByPrimaryKey( nIdCategory, _plugin ) == null )
                {
                    SiteMessageService.setMessage( request, MESSAGE_ERROR, SiteMessage.TYPE_STOP );

                    return;
                }

                SuggestSubscriptionProviderService.getService( ).createSuggestCategorySubscription( luteceUserConnected, nIdCategory );
                urlItem.addParameter( PARAMETER_ID_FILTER_CATEGORY_SUGGEST, strIdFilterCategory );
            }
            else
            {
                String strIdSuggest = request.getParameter( PARAMETER_ID_SUGGEST );
                int nIdSuggest = SuggestUtils.getIntegerParameter( strIdSuggest );
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/rss/SuggestResourceRss.java 374
fr/paris/lutece/plugins/suggest/business/rss/SuggestResourceRss.java 429
        Map<String, ReferenceList> suggestMap = new HashMap<>( );

        for ( Suggest suggest : suggestList )
        {
            SubmitFilter submitFilter = new SubmitFilter( );
            submitFilter.setIdSuggest( suggest.getIdSuggest( ) );

            List<SuggestSubmit> suggestSubmitList = SuggestSubmitService.getService( ).getSuggestSubmitList( submitFilter, pluginSuggest );
            ReferenceList referenceSuggestSubmit = new ReferenceList( );

            for ( SuggestSubmit suggestSubmit : suggestSubmitList )
            {
                referenceSuggestSubmit.addItem( suggestSubmit.getIdSuggestSubmit( ), suggestSubmit.getSuggestSubmitValue( ).replaceAll( "<div[^>]+>", "" )
                        .replaceAll( "</div>", "" ) );
            }

            suggestMap.put( String.valueOf( suggest.getIdSuggest( ) ), referenceSuggestSubmit );
            referenceSuggest.addItem( suggest.getIdSuggest( ), suggest.getTitle( ) );
        }
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/CommentSubmitDAO.java 135
fr/paris/lutece/plugins/suggest/business/CommentSubmitDAO.java 274
            if ( daoUtil.next( ) )
            {
                commentSubmit = new CommentSubmit( );
                commentSubmit.setIdCommentSubmit( daoUtil.getInt( 1 ) );

                suggestSubmit = new SuggestSubmit( );
                suggestSubmit.setIdSuggestSubmit( daoUtil.getInt( 2 ) );
                commentSubmit.setSuggestSubmit( suggestSubmit );

                commentSubmit.setDateComment( daoUtil.getTimestamp( 3 ) );
                commentSubmit.setValue( daoUtil.getString( 4 ) );
                commentSubmit.setActive( daoUtil.getBoolean( 5 ) );
                commentSubmit.setLuteceUserKey( daoUtil.getString( 6 ) );
                commentSubmit.setOfficialAnswer( daoUtil.getBoolean( 7 ) );
                commentSubmit.setIdParent( daoUtil.getInt( 8 ) );
                commentSubmit.setDateModify( daoUtil.getTimestamp( 9 ) );
Fichier Ligne
fr/paris/lutece/plugins/suggest/web/SuggestApp.java 780
fr/paris/lutece/plugins/suggest/web/SuggestApp.java 866
    public void doSubscribeSuggest( HttpServletRequest request ) throws SiteMessageException
    {
        LuteceUser luteceUserConnected = SecurityService.getInstance( ).getRegisteredUser( request );
        String strIdSubmitSuggest = request.getParameter( PARAMETER_ID_SUBMIT_SUGGEST );

        UrlItem urlItem = new UrlItem( request.getRequestURL( ).toString( ) );
        urlItem.addParameter( PARAMETER_PAGE, CONSTANT_SUGGEST );
        urlItem.addParameter( PARAMETER_ID_SUGGEST, request.getParameter( PARAMETER_ID_SUGGEST ) );

        if ( StringUtils.isNotEmpty( strIdSubmitSuggest ) )
        {
            int nIdSubmitSuggest = SuggestUtils.getIntegerParameter( strIdSubmitSuggest );
            SuggestSubmit suggestSubmit = _suggestSubmitService.findByPrimaryKey( nIdSubmitSuggest, true, _plugin );

            if ( suggestSubmit == null )
            {
                SiteMessageService.setMessage( request, MESSAGE_ERROR, SiteMessage.TYPE_STOP );

                return;
            }

            SuggestSubscriptionProviderService.getService( ).createSuggestSubmitSubscription( luteceUserConnected, nIdSubmitSuggest );
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 340
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 494
fr/paris/lutece/plugins/suggest/business/SuggestSubmitDAO.java 657
            listStrFilter.add( SQL_FILTER_ID_SUGGEST );
        }

        if ( filter.containsIdSuggestSubmitState( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_SUGGEST_SUBMIT_STATE );
        }

        if ( filter.containsIdCategory( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_CATEGORY );
        }

        if ( filter.containsDateFirst( ) )
        {
            listStrFilter.add( SQL_FILTER_DATE_FIRST_SUBMIT );
        }

        if ( filter.containsDateLast( ) )
        {
            listStrFilter.add( SQL_FILTER_DATE_LAST_SUBMIT );
        }

        if ( filter.containsIdReported( ) )
        {
            listStrFilter.add( SQL_FILTER_REPORTED );
        }

        if ( filter.containsNumberVote( ) )
        {
            listStrFilter.add( SQL_FILTER_NUMBER_VOTE );
        }

        if ( filter.containsIdPinned( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_PINNED );
        }

        if ( filter.containsIdType( ) )
Fichier Ligne
fr/paris/lutece/plugins/suggest/web/SuggestJspBean.java 1527
fr/paris/lutece/plugins/suggest/web/SuggestJspBean.java 1560
    public String doDisableCommentSubmit( HttpServletRequest request )
    {
        String strIdCommentSubmit = request.getParameter( PARAMETER_ID_COMMENT_SUBMIT );
        Plugin plugin = getPlugin( );
        int nIdCommentSubmit = SuggestUtils.getIntegerParameter( strIdCommentSubmit );
        CommentSubmit commentSubmit = _commentSubmitService.findByPrimaryKey( nIdCommentSubmit, plugin );

        if ( commentSubmit != null )
        {
            SuggestSubmit suggestSubmit = _suggestSubmitService.findByPrimaryKey( commentSubmit.getSuggestSubmit( ).getIdSuggestSubmit( ), false, plugin );

            if ( !RBACService.isAuthorized( Suggest.RESOURCE_TYPE, EMPTY_STRING + suggestSubmit.getSuggest( ).getIdSuggest( ),
                    SuggestResourceIdService.PERMISSION_MANAGE_SUGGEST_SUBMIT, getUser( ) ) )
            {
                return getJspManageSuggest( request );
            }

            commentSubmit.setActive( false );
Fichier Ligne
fr/paris/lutece/plugins/suggest/web/DefaultMessageJspBean.java 221
fr/paris/lutece/plugins/suggest/web/SuggestJspBean.java 1768
                            }

                            else
                                if ( StringUtils.isEmpty( strNotificationNewCommentTitle ) )
                                {
                                    strFieldError = FIELD_NOTIFICATION_NEW_COMMENT_TITLE;

                                }
                                else
                                    if ( StringUtils.isEmpty( strNotificationNewCommentBody ) )
                                    {
                                        strFieldError = FIELD_NOTIFICATION_NEW_COMMENT_BODY;

                                    }

                                    else
                                        if ( StringUtils.isEmpty( strNotificationNewSuggestSubmitTitle ) )
                                        {

                                            strFieldError = FIELD_NOTIFICATION_NEW_SUGGEST_DUBMIT_TITLE;
                                        }
                                        else
                                            if ( StringUtils.isEmpty( strNotificationNewSuggestSubmitBody ) )
                                            {

                                                strFieldError = FIELD_NOTIFICATION_NEW_SUGGEST_DUBMIT_BODY;
                                            }

        if ( !strFieldError.equals( EMPTY_STRING ) )
        {
            Object [ ] tabRequiredFields = {
                I18nService.getLocalizedString( strFieldError, getLocale( ) )
            };

            return AdminMessageService.getMessageUrl( request, MESSAGE_MANDATORY_FIELD, tabRequiredFields, AdminMessage.TYPE_STOP );
        }

        if ( nNumberSuggestSubmitInTopScore < 0 )
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/CommentSubmitDAO.java 108
fr/paris/lutece/plugins/suggest/business/CommentSubmitDAO.java 178
            daoUtil.setInt( 1, commentSubmit.getIdCommentSubmit( ) );
            daoUtil.setInt( 2, commentSubmit.getSuggestSubmit( ).getIdSuggestSubmit( ) );
            daoUtil.setTimestamp( 3, commentSubmit.getDateComment( ) );
            daoUtil.setString( 4, commentSubmit.getValue( ) );
            daoUtil.setBoolean( 5, commentSubmit.isActive( ) );
            daoUtil.setString( 6, commentSubmit.getLuteceUserKey( ) );
            daoUtil.setBoolean( 7, commentSubmit.isOfficialAnswer( ) );
            daoUtil.setInt( 8, commentSubmit.getIdParent( ) );
            daoUtil.setTimestamp( 9, commentSubmit.getDateModify( ) );
Fichier Ligne
fr/paris/lutece/plugins/suggest/business/CommentSubmitDAO.java 140
fr/paris/lutece/plugins/suggest/business/CommentSubmitDAO.java 279
fr/paris/lutece/plugins/suggest/business/CommentSubmitDAO.java 315
                suggestSubmit = new SuggestSubmit( );
                suggestSubmit.setIdSuggestSubmit( daoUtil.getInt( 2 ) );
                commentSubmit.setSuggestSubmit( suggestSubmit );

                commentSubmit.setDateComment( daoUtil.getTimestamp( 3 ) );
                commentSubmit.setValue( daoUtil.getString( 4 ) );
                commentSubmit.setActive( daoUtil.getBoolean( 5 ) );
                commentSubmit.setLuteceUserKey( daoUtil.getString( 6 ) );
                commentSubmit.setOfficialAnswer( daoUtil.getBoolean( 7 ) );
                commentSubmit.setIdParent( daoUtil.getInt( 8 ) );
                commentSubmit.setDateModify( daoUtil.getTimestamp( 9 ) );
Fichier Ligne
fr/paris/lutece/plugins/suggest/web/SuggestJspBean.java 1253
fr/paris/lutece/plugins/suggest/web/SuggestJspBean.java 1305
        for ( String strIdSuggestSubmit : selectedSuggestSubmit )
        {
            if ( StringUtils.isNotBlank( strIdSuggestSubmit ) && StringUtils.isNumeric( strIdSuggestSubmit ) )
            {
                nIdSuggestSubmit = SuggestUtils.getIntegerParameter( strIdSuggestSubmit );

                SuggestSubmit suggestSubmit = SuggestSubmitService.getService( ).findByPrimaryKey( nIdSuggestSubmit, false, getPlugin( ) );

                if ( ( suggestSubmit == null )
                        || !RBACService.isAuthorized( Suggest.RESOURCE_TYPE, SuggestUtils.EMPTY_STRING + suggestSubmit.getSuggest( ).getIdSuggest( ),
                                SuggestResourceIdService.PERMISSION_MANAGE_SUGGEST_SUBMIT, getUser( ) ) )
                {
                    throw new AccessDeniedException( "Access denied" );
                }