Fork me on GitHub

Résultats CPD

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

Duplicatas

Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 72
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strValue = request.getParameter( PARAMETER_VALUE );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
        String strShowInExport = request.getParameter( PARAMETER_SHOWN_IN_EXPORT );
        String strShowInCompleteness = request.getParameter( PARAMETER_SHOWN_IN_COMPLETENESS );

        String strFieldError = DirectoryUtils.EMPTY_STRING;

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

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

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

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

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

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );

        if ( this.getFields( ) == null )
        {
            ArrayList<Field> listFields = new ArrayList<Field>( );
            Field field = new Field( );
            listFields.add( field );
            this.setFields( listFields );
        }

        this.getFields( ).get( 0 ).setValue( strValue );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strIndexedAsTitle != null );
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        Plugin plugin = PluginService.getPlugin( DirectoryPlugin.PLUGIN_NAME );

        String strValueEntry = ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) ) ? lstValue.get( 0 ) : null;
        RecordField recordField = new RecordField( );
        recordField.setEntry( this );

        if ( ( record != null ) && bAddNewValue )
        {
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( record.getDirectory( ).getIdDirectory( ) );
            recordFieldFilter.setIdEntry( this.getIdEntry( ) );
            recordFieldFilter.setIdRecord( record.getIdRecord( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, plugin );

            if ( ( recordFieldList != null ) && !recordFieldList.isEmpty( ) && StringUtils.isNotBlank( recordFieldList.get( 0 ).getValue( ) ) )
            {
                strValueEntry = recordFieldList.get( 0 ).getValue( ) + ", " + strValueEntry;
            }
        }

        if ( strValueEntry != null )
        {
            if ( bTestDirectoryError && this.isMandatory( ) && strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }

            recordField.setValue( strValueEntry );
        }

        listRecordField.add( recordField );
    }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeMyLuteceUser.java 96
fr/paris/lutece/plugins/directory/business/EntryTypeRemoteMyLuteceUser.java 90
    @Override
    public String getTemplateCreate( )
    {
        return TEMPLATE_CREATE;
    }

    /**
     *
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return TEMPLATE_MODIFY;
    }

    /**
     *
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return TEMPLATE_HTML_FRONT_CODE_FORM_ENTRY;
        }

        return TEMPLATE_HTML_CODE_FORM_ENTRY;
    }

    /**
     *
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return TEMPLATE_HTML_FRONT_CODE_ENTRY_VALUE;
        }

        return TEMPLATE_HTML_CODE_ENTRY_VALUE;
    }

    /**
     *
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return TEMPLATE_HTML_FRONT_CODE_FORM_SEARCH_ENTRY;
        }

        return TEMPLATE_HTML_CODE_FORM_SEARCH_ENTRY;
    }

    /**
     *
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
        String strIsAllSearch = request.getParameter( PARAMETER_IS_ADD_VALUE_SEARCH_ALL );
        String strLabelValueAllSearch = request.getParameter( PARAMETER_LABEL_VALUE_SEARCH_ALL );

        // Check if we have to show every information of the users or not
        String strShowFullInfo = request.getParameter( PARAMETER_SHOW_ALL_INFO );

        String strShowInExport = request.getParameter( PARAMETER_SHOWN_IN_EXPORT );
        String strShowInCompleteness = request.getParameter( PARAMETER_SHOWN_IN_COMPLETENESS );

        String strFieldError = DirectoryUtils.EMPTY_STRING;

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

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

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

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strIndexedAsTitle != null );
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setFieldInLine( false );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );
        this.setAddValueAllSearch( strIsAllSearch != null );

        if ( strIsAllSearch != null )
        {
            this.setLabelValueAllSearch( strLabelValueAllSearch );
        }
        else
        {
            this.setLabelValueAllSearch( null );
        }

        if ( ( this.getFields( ) == null ) || ( this.getFields( ).size( ) == 0 ) )
        {
            List<Field> listFields = new ArrayList<Field>( );
            Field field = new Field( );
            field.setEntry( this );
            listFields.add( field );
            this.setFields( listFields );
        }

        // IMPORTANT !!!
        // The flag to show every information is stored in the database directory_field.DEFAULT_value
        this.getFields( ).get( 0 ).setDefaultValue( strShowFullInfo != null );

        return null;
    }

    /**
     *
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        if ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) )
        {
            String strUserLogin = lstValue.get( CONSTANT_POSITION_MYLUTECE_USER_LOGIN );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 220
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 210
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        Plugin plugin = PluginService.getPlugin( DirectoryPlugin.PLUGIN_NAME );

        String strValueEntry = ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) ) ? lstValue.get( 0 ) : null;
        List<RegularExpression> listRegularExpression = this.getFields( ).get( 0 ).getRegularExpressionList( );
        RecordField response = new RecordField( );
        response.setEntry( this );

        if ( ( record != null ) && bAddNewValue )
        {
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( record.getDirectory( ).getIdDirectory( ) );
            recordFieldFilter.setIdEntry( this.getIdEntry( ) );
            recordFieldFilter.setIdRecord( record.getIdRecord( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, plugin );

            if ( ( recordFieldList != null ) && !recordFieldList.isEmpty( ) && StringUtils.isNotBlank( recordFieldList.get( 0 ).getValue( ) ) )
            {
                strValueEntry = recordFieldList.get( 0 ).getValue( ) + ", " + strValueEntry;
            }
        }

        if ( strValueEntry != null )
        {
            if ( bTestDirectoryError && this.isMandatory( ) && strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }

            if ( bTestDirectoryError && ( !strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) ) && ( listRegularExpression != null )
                    && ( listRegularExpression.size( ) != 0 ) && RegularExpressionService.getInstance( ).isAvailable( ) )
            {
                for ( RegularExpression regularExpression : listRegularExpression )
                {
                    if ( !RegularExpressionService.getInstance( ).isMatches( strValueEntry, regularExpression ) )
                    {
                        throw new DirectoryErrorException( this.getTitle( ), regularExpression.getErrorMessage( ) );
                    }
                }
            }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 172
fr/paris/lutece/plugins/directory/business/EntryTypeSelect.java 189
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getFields( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getImportRecordFieldData( Record record, String strImportValue, boolean bTestDirectoryError, List<RecordField> listRecordField, Locale locale )
            throws DirectoryErrorException
    {
        List<String> lstValue = new ArrayList<String>( );
        Field field;
        field = DirectoryUtils.findFieldByValueInTheList( strImportValue, this.getFields( ) );

        if ( field != null )
        {
            lstValue.add( Integer.toString( field.getIdField( ) ) );
        }

        getRecordFieldData( record, lstValue, bTestDirectoryError, false, listRecordField, locale );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        String strIdField = ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) ) ? lstValue.get( 0 ) : null;
        int nIdField = DirectoryUtils.convertStringToInt( strIdField );
        Field field = null;
        RecordField recordField = new RecordField( );
        recordField.setEntry( this );

        if ( nIdField != DirectoryUtils.CONSTANT_ID_NULL )
        {
            field = DirectoryUtils.findFieldByIdInTheList( nIdField, this.getFields( ) );
        }

        if ( bTestDirectoryError && this.isMandatory( ) )
        {
            if ( ( field == null ) || field.getValue( ).equals( DirectoryUtils.EMPTY_STRING ) )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }
        }

        if ( field != null )
        {
            recordField.setValue( field.getValue( ) );
            recordField.setField( field );

            // set in the record the workgroup and the role assocdiated to the field
            if ( record != null )
            {
                if ( this.isRoleAssociated( ) )
                {
                    record.setRoleKey( field.getRoleKey( ) );
                }

                if ( this.isWorkgroupAssociated( ) )
                {
                    record.setWorkgroup( field.getWorkgroup( ) );
                }
            }
        }

        listRecordField.add( recordField );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void addSearchCriteria( HashMap<String, Object> mapSearchItem, RecordField recordField )
    {
        if ( ( recordField.getField( ) != null ) && ( recordField.getField( ).getValue( ) != null )
                && !recordField.getField( ).getValue( ).equals( DirectoryUtils.EMPTY_STRING ) )
        {
            List<Integer> listIdField = (List<Integer>) mapSearchItem.get( DirectorySearchItem.FIELD_ID_DIRECTORY_FIELD );

            if ( listIdField == null )
            {
                listIdField = new ArrayList<Integer>( );
            }

            listIdField.add( recordField.getField( ).getIdField( ) );
            mapSearchItem.put( DirectorySearchItem.FIELD_ID_DIRECTORY_FIELD, listIdField );
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isSortable( )
    {
        return true;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LocalizedPaginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex, Locale locale )
    {
        return new LocalizedPaginator( this.getFields( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex, locale );
    }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 210
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 214
        this.setAutocompleteEntry( strAutocomplete != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        Plugin plugin = PluginService.getPlugin( DirectoryPlugin.PLUGIN_NAME );

        String strValueEntry = ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) ) ? lstValue.get( 0 ) : null;
        List<RegularExpression> listRegularExpression = this.getFields( ).get( 0 ).getRegularExpressionList( );
        RecordField response = new RecordField( );
        response.setEntry( this );

        if ( ( record != null ) && bAddNewValue )
        {
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( record.getDirectory( ).getIdDirectory( ) );
            recordFieldFilter.setIdEntry( this.getIdEntry( ) );
            recordFieldFilter.setIdRecord( record.getIdRecord( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, plugin );

            if ( ( recordFieldList != null ) && !recordFieldList.isEmpty( ) && StringUtils.isNotBlank( recordFieldList.get( 0 ).getValue( ) ) )
            {
                strValueEntry = recordFieldList.get( 0 ).getValue( ) + ", " + strValueEntry;
            }
        }

        if ( strValueEntry != null )
        {
            if ( bTestDirectoryError && this.isMandatory( ) && strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }

            if ( bTestDirectoryError && ( !strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) ) && ( listRegularExpression != null )
                    && ( listRegularExpression.size( ) != 0 ) && RegularExpressionService.getInstance( ).isAvailable( ) )
            {
                for ( RegularExpression regularExpression : listRegularExpression )
                {
                    if ( !RegularExpressionService.getInstance( ).isMatches( strValueEntry, regularExpression ) )
                    {
                        throw new DirectoryErrorException( this.getTitle( ), regularExpression.getErrorMessage( ) );
                    }
                }
            }

            response.setValue( strValueEntry );
        }

        listRecordField.add( response );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isSortable( )
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 224
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 210
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        Plugin plugin = PluginService.getPlugin( DirectoryPlugin.PLUGIN_NAME );

        String strValueEntry = ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) ) ? lstValue.get( 0 ) : null;
        List<RegularExpression> listRegularExpression = this.getFields( ).get( 0 ).getRegularExpressionList( );
        RecordField response = new RecordField( );
        response.setEntry( this );

        if ( ( record != null ) && bAddNewValue )
        {
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( record.getDirectory( ).getIdDirectory( ) );
            recordFieldFilter.setIdEntry( this.getIdEntry( ) );
            recordFieldFilter.setIdRecord( record.getIdRecord( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, plugin );

            if ( ( recordFieldList != null ) && !recordFieldList.isEmpty( ) && StringUtils.isNotBlank( recordFieldList.get( 0 ).getValue( ) ) )
            {
                strValueEntry = recordFieldList.get( 0 ).getValue( ) + ", " + strValueEntry;
            }
        }

        if ( strValueEntry != null )
        {
            if ( bTestDirectoryError && this.isMandatory( ) && strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }

            if ( bTestDirectoryError && ( !strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) ) && ( listRegularExpression != null )
                    && ( listRegularExpression.size( ) != 0 ) && RegularExpressionService.getInstance( ).isAvailable( ) )
            {
                for ( RegularExpression regularExpression : listRegularExpression )
                {
                    if ( !RegularExpressionService.getInstance( ).isMatches( strValueEntry, regularExpression ) )
                    {
                        throw new DirectoryErrorException( this.getTitle( ), regularExpression.getErrorMessage( ) );
                    }
                }
            }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeMyLuteceUser.java 298
fr/paris/lutece/plugins/directory/business/EntryTypeRemoteMyLuteceUser.java 249
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getHtmlRecordFieldValue( Locale locale, RecordField recordField, boolean isDisplayFront )
    {
        if ( getTemplateHtmlRecordFieldValue( isDisplayFront ) != null )
        {
            Map<String, Object> model = new HashMap<String, Object>( );
            model.put( MARK_ENTRY, this );
            model.put( MARK_RECORD_FIELD, recordField );
            model.put( MARK_LOCALE, locale );

            if ( showAllInfo( ) )
            {
                int nIdRecord = recordField.getRecord( ).getIdRecord( );
                String strUserGuid = DirectoryService.getInstance( ).getUserGuid( nIdRecord, getIdEntry( ) );
                ReferenceList listUserInfos = DirectoryService.getInstance( ).getUserInfos( strUserGuid, getIdEntry( ) );

                model.put( MARK_MYLUTECE_USER_INFOS_LIST, listUserInfos );
                model.put( MARK_MYLUTECE_USER_LOGIN, strUserGuid );
            }

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

            return template.getHtml( );
        }

        return null;
    }

    /**
     * Convert the record field value to string
     * 
     * @param recordField
     *            the record field
     * @param locale
     *            Locale
     * @param bDisplayFront
     *            true if it is displayed in front
     * @param bExportDirectory
     *            true if it is exported
     */
    @Override
    public String convertRecordFieldValueToString( RecordField recordField, Locale locale, boolean bDisplayFront, boolean bExportDirectory )
    {
        String strValue = StringUtils.EMPTY;

        if ( ( recordField != null ) && StringUtils.isNotBlank( recordField.getValue( ) ) && ( recordField.getRecord( ) != null ) )
        {
            if ( bExportDirectory )
            {
                int nIdRecord = recordField.getRecord( ).getIdRecord( );
                String strUserGuid = DirectoryService.getInstance( ).getUserGuid( nIdRecord, getIdEntry( ) );
                ReferenceList listUserInfos = DirectoryService.getInstance( ).getUserInfos( strUserGuid, getIdEntry( ) );

                if ( showAllInfo( ) && StringUtils.isNotBlank( strUserGuid ) && ( listUserInfos != null ) )
                {
                    StringBuilder sbValue = new StringBuilder( );
                    sbValue.append( I18nService.getLocalizedString( PROPERTY_USER_LOGIN, locale ) + SPACE + TWO_POINTS + SPACE + strUserGuid );

                    for ( ReferenceItem userInfo : listUserInfos )
                    {
                        sbValue.append( COMMA );
                        sbValue.append( I18nService.getLocalizedString( PROPERTY_USER_INFO_PREFIX + userInfo.getCode( ), locale ) );
                        sbValue.append( SPACE + TWO_POINTS + SPACE );
                        sbValue.append( userInfo.getName( ) );
                    }

                    strValue = sbValue.toString( );
                }
            }

            if ( StringUtils.isBlank( strValue ) )
            {
                strValue = recordField.getValue( );
            }
        }

        return strValue;
    }

    /**
     * Convert the record field value to string
     * 
     * @param recordField
     *            the record field
     * @param locale
     *            Locale
     * @param bDisplayFront
     *            true if it is displayed in front
     */
    @Override
    public String convertRecordFieldTitleToString( RecordField recordField, Locale locale, boolean bDisplayFront )
    {
        return convertRecordFieldValueToString( recordField, locale, bDisplayFront, false );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isSortable( )
    {
        return true;
    }

    /**
     * Check if it must show every information of the user or not
     * 
     * @return true if it must show every information, false otherwise
     */
    private boolean showAllInfo( )
    {
        boolean bShow = false;
        List<Field> listFields = getFields( );

        if ( ( listFields == null ) || ( listFields.size( ) == 0 ) )
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryDAO.java 175
fr/paris/lutece/plugins/directory/business/EntryDAO.java 353
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, plugin );
        daoUtil.setInt( 1, entry.getIdEntry( ) );

        if ( entry.getParent( ) != null )
        {
            daoUtil.setInt( 2, entry.getParent( ).getIdEntry( ) );
        }
        else
        {
            daoUtil.setIntNull( 2 );
        }

        daoUtil.setInt( 3, entry.getDirectory( ).getIdDirectory( ) );
        daoUtil.setInt( 4, entry.getEntryType( ).getIdType( ) );
        daoUtil.setString( 5, trimEntryTitle( entry ) );
        daoUtil.setString( 6, entry.getHelpMessage( ) );
        daoUtil.setString( 7, entry.getHelpMessageSearch( ) );
        daoUtil.setString( 8, entry.getComment( ) );
        daoUtil.setBoolean( 9, entry.isMandatory( ) );
        daoUtil.setBoolean( 10, entry.isIndexed( ) );
        daoUtil.setBoolean( 11, entry.isIndexedAsTitle( ) );
        daoUtil.setBoolean( 12, entry.isIndexedAsSummary( ) );
        daoUtil.setBoolean( 13, entry.isShownInAdvancedSearch( ) );
        daoUtil.setBoolean( 14, entry.isShownInResultList( ) );
        daoUtil.setBoolean( 15, entry.isShownInResultRecord( ) );
        daoUtil.setBoolean( 16, entry.isFieldInLine( ) );
        daoUtil.setInt( 17, entry.getPosition( ) );
        daoUtil.setInt( 18, entry.getDisplayWidth( ) );
        daoUtil.setInt( 19, entry.getDisplayHeight( ) );
        daoUtil.setBoolean( 20, entry.isRoleAssociated( ) );
        daoUtil.setBoolean( 21, entry.isWorkgroupAssociated( ) );
        daoUtil.setBoolean( 22, entry.isMultipleSearchFields( ) );
        daoUtil.setBoolean( 23, entry.isShownInHistory( ) );
        daoUtil.setInt( 24, entry.getEntryAssociate( ) );
        daoUtil.setString( 25, entry.getRequestSQL( ) );
        daoUtil.setBoolean( 26, entry.isAddValueAllSearch( ) );
        daoUtil.setString( 27, entry.getLabelValueAllSearch( ) );

        // map provider
        String strMapProvider = ( entry.getMapProvider( ) == null ) ? DirectoryUtils.EMPTY_STRING : entry.getMapProvider( ).getKey( );
        daoUtil.setString( 28, strMapProvider );
        daoUtil.setBoolean( 29, entry.isAutocompleteEntry( ) );
        daoUtil.setBoolean( 30, entry.isShownInExport( ) );
        daoUtil.setBoolean( 31, entry.isShownInCompleteness( ) );
        daoUtil.setInt( 32, entry.getNumberRow( ) );
        daoUtil.setInt( 33, entry.getNumberColumn( ) );

        daoUtil.executeUpdate( );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 428
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 577
                record.setDateModification( daoUtil.getTimestamp( 31 ) );

                recordField.setRecord( record );
                recordField.setValue( daoUtil.getString( 3 ) ); // drf.record_field_value

                entryType = new EntryType( );
                entryType.setClassName( daoUtil.getString( 4 ) ); // type.class_name

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

                if ( bException )
                {
                    daoUtil.free( );

                    return null;
                }

                entry.setEntryType( entryType );
                entry.setIdEntry( daoUtil.getInt( 5 ) ); // ent.id_entry
                entry.setTitle( daoUtil.getString( 6 ) ); // ent.title
                entry.setDisplayWidth( daoUtil.getInt( 7 ) ); // ent.display_width
                entry.setDisplayHeight( daoUtil.getInt( 8 ) ); // ent.display_height
                recordField.setEntry( entry );

                if ( daoUtil.getObject( 14 ) != null ) // field.id_field
                {
                    field = new Field( );
                    field.setIdField( daoUtil.getInt( 14 ) ); // field.id_field

                    Entry entryField = new Entry( );
                    entryField.setIdEntry( daoUtil.getInt( 15 ) ); // field.id_entry
                    field.setEntry( entryField );

                    field.setTitle( daoUtil.getString( 16 ) ); // field.id_entry
                    field.setValue( daoUtil.getString( 17 ) ); // field.default_value
                    field.setHeight( daoUtil.getInt( 18 ) ); // field.height
                    field.setWidth( daoUtil.getInt( 19 ) ); // field.width
                    field.setDefaultValue( daoUtil.getBoolean( 20 ) ); // field.default_value
                    field.setMaxSizeEnter( daoUtil.getInt( 21 ) ); // field.max_size_enter
                    field.setPosition( daoUtil.getInt( 22 ) ); // field.field_position
                    field.setValueTypeDate( daoUtil.getDate( 23 ) ); // field.value_type_date
                    field.setRoleKey( daoUtil.getString( 24 ) ); // field.role_key
                    field.setWorkgroup( daoUtil.getString( 25 ) ); // field.workgroup_key

                    recordField.setField( field );
                }

                if ( daoUtil.getObject( 9 ) != null ) // fil.id_file
                {
                    file = new File( );
                    file.setIdFile( daoUtil.getInt( 9 ) ); // fil.id_file
                    file.setTitle( daoUtil.getString( 10 ) ); // fil.title

                    PhysicalFile pf = new PhysicalFile( );
                    pf.setIdPhysicalFile( daoUtil.getInt( 11 ) ); // fil.id_physical_file
                    file.setPhysicalFile( pf );
                    file.setSize( daoUtil.getInt( 12 ) ); // fil.file_size
                    file.setMimeType( daoUtil.getString( 13 ) ); // fil.mime_type
                    recordField.setFile( file );
                }

                recordFieldList.add( recordField );
            }

            daoUtil.free( );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 147
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 137
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strWidth = request.getParameter( PARAMETER_WIDTH );
        String strMaxSizeEnter = request.getParameter( PARAMETER_MAX_SIZE_ENTER );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
        String strShowInExport = request.getParameter( PARAMETER_SHOWN_IN_EXPORT );
        String strShowInCompleteness = request.getParameter( PARAMETER_SHOWN_IN_COMPLETENESS );

        int nWidth = DirectoryUtils.convertStringToInt( strWidth );
        int nMaxSizeEnter = DirectoryUtils.convertStringToInt( strMaxSizeEnter );

        String strFieldError = DirectoryUtils.EMPTY_STRING;

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

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

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

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

        if ( nWidth == -1 )
        {
            strFieldError = FIELD_WIDTH;
        }
        else
            if ( ( strMaxSizeEnter != null ) && !strMaxSizeEnter.trim( ).equals( DirectoryUtils.EMPTY_STRING ) && ( nMaxSizeEnter == -1 ) )
            {
                strFieldError = FIELD_MAX_SIZE_ENTER;
            }

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

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

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );

        if ( this.getFields( ) == null )
        {
            ArrayList<Field> listFields = new ArrayList<Field>( );
            Field field = new Field( );
            listFields.add( field );
            this.setFields( listFields );
        }

        this.getFields( ).get( 0 ).setValue( strValue );
        this.getFields( ).get( 0 ).setWidth( nWidth );
        this.getFields( ).get( 0 ).setMaxSizeEnter( nMaxSizeEnter );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strIndexedAsTitle != null );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRss.java 695
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRss.java 926
        filter.setIdDirectory( directory.getIdDirectory( ) );

        HashMap<String, List<RecordField>> mapSearchQuery = new HashMap<String, List<RecordField>>( );

        if ( config.getIdEntryFilter1( ) != DirectoryUtils.CONSTANT_ID_NULL )
        {
            IEntry entry = EntryHome.findByPrimaryKey( config.getIdEntryFilter1( ), pluginDirectory );
            RecordField recordField = new RecordField( );
            recordField.setEntry( entry );

            if ( DirectoryUtils.convertStringToInt( config.getValueFilter1( ) ) != DirectoryUtils.CONSTANT_ID_NULL )
            {
                Field field = FieldHome.findByPrimaryKey( DirectoryUtils.convertStringToInt( config.getValueFilter1( ) ), pluginDirectory );
                recordField.setField( field );
            }

            recordField.setValue( config.getValueFilter1( ) );

            List<RecordField> recordFieldList = new ArrayList<RecordField>( );
            recordFieldList.add( recordField );

            mapSearchQuery.put( Integer.toString( config.getIdEntryFilter1( ) ), recordFieldList );
        }

        if ( config.getIdEntryFilter2( ) != DirectoryUtils.CONSTANT_ID_NULL )
        {
            IEntry entry = EntryHome.findByPrimaryKey( config.getIdEntryFilter2( ), pluginDirectory );
            RecordField recordField = new RecordField( );
            recordField.setEntry( entry );

            if ( DirectoryUtils.convertStringToInt( config.getValueFilter2( ) ) != DirectoryUtils.CONSTANT_ID_NULL )
            {
                Field field = FieldHome.findByPrimaryKey( DirectoryUtils.convertStringToInt( config.getValueFilter2( ) ), pluginDirectory );
                recordField.setField( field );
            }

            recordField.setValue( config.getValueFilter2( ) );

            List<RecordField> recordFieldList = new ArrayList<RecordField>( );
            recordFieldList.add( recordField );

            mapSearchQuery.put( Integer.toString( config.getIdEntryFilter2( ) ), recordFieldList );
        }

        List<Integer> listResultRecordId = DirectorySearchService.getInstance( ).getSearchResults( directory, mapSearchQuery, null, null, null, filter,
                pluginDirectory );

        if ( ( directory.getIdWorkflow( ) != DirectoryUtils.CONSTANT_ID_NULL ) && ( config.getIdWorkflowState( ) != DirectoryUtils.CONSTANT_ID_NULL )
                && WorkflowService.getInstance( ).isAvailable( ) )
        {
            List<Integer> listTmpResultRecordId = WorkflowService.getInstance( ).getAuthorizedResourceList( Record.WORKFLOW_RESOURCE_TYPE,
                    directory.getIdWorkflow( ), config.getIdWorkflowState( ), Integer.valueOf( directory.getIdDirectory( ) ), null );

            listResultRecordId = DirectoryUtils.retainAll( listResultRecordId, listTmpResultRecordId );
        }

        List<HashMap<String, Object>> listItem = new ArrayList<HashMap<String, Object>>( );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 138
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 143
        String strAutocomplete = request.getParameter( PARAMETER_AUTOCOMPLETE );
        String strShowInExport = request.getParameter( PARAMETER_SHOWN_IN_EXPORT );
        String strShowInCompleteness = request.getParameter( PARAMETER_SHOWN_IN_COMPLETENESS );

        int nWidth = DirectoryUtils.convertStringToInt( strWidth );
        int nMaxSizeEnter = DirectoryUtils.convertStringToInt( strMaxSizeEnter );

        String strFieldError = DirectoryUtils.EMPTY_STRING;

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

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

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

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

        if ( nWidth == -1 )
        {
            strFieldError = FIELD_WIDTH;
        }
        else
            if ( ( strMaxSizeEnter != null ) && !strMaxSizeEnter.trim( ).equals( DirectoryUtils.EMPTY_STRING ) && ( nMaxSizeEnter == -1 ) )
            {
                strFieldError = FIELD_MAX_SIZE_ENTER;
            }

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

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

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );

        if ( this.getFields( ) == null )
        {
            ArrayList<Field> listFields = new ArrayList<Field>( );
            Field field = new Field( );
            listFields.add( field );
            this.setFields( listFields );
        }

        this.getFields( ).get( 0 ).setValue( strValue );
        this.getFields( ).get( 0 ).setWidth( nWidth );
        this.getFields( ).get( 0 ).setMaxSizeEnter( nMaxSizeEnter );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strDocumentTitle != null );
        this.setIndexedAsSummary( strDocumentSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setAutocompleteEntry( strAutocomplete != null );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 153
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 138
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
        String strShowInExport = request.getParameter( PARAMETER_SHOWN_IN_EXPORT );
        String strShowInCompleteness = request.getParameter( PARAMETER_SHOWN_IN_COMPLETENESS );

        int nWidth = DirectoryUtils.convertStringToInt( strWidth );
        int nMaxSizeEnter = DirectoryUtils.convertStringToInt( strMaxSizeEnter );

        String strFieldError = DirectoryUtils.EMPTY_STRING;

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

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

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

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

        if ( nWidth == -1 )
        {
            strFieldError = FIELD_WIDTH;
        }
        else
            if ( ( strMaxSizeEnter != null ) && !strMaxSizeEnter.trim( ).equals( DirectoryUtils.EMPTY_STRING ) && ( nMaxSizeEnter == -1 ) )
            {
                strFieldError = FIELD_MAX_SIZE_ENTER;
            }

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

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

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );

        if ( this.getFields( ) == null )
        {
            ArrayList<Field> listFields = new ArrayList<Field>( );
            Field field = new Field( );
            listFields.add( field );
            this.setFields( listFields );
        }

        this.getFields( ).get( 0 ).setValue( strValue );
        this.getFields( ).get( 0 ).setWidth( nWidth );
        this.getFields( ).get( 0 ).setMaxSizeEnter( nMaxSizeEnter );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strIndexedAsTitle != null );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 176
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 205
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        Plugin plugin = PluginService.getPlugin( DirectoryPlugin.PLUGIN_NAME );

        String strValueEntry = ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) ) ? lstValue.get( 0 ) : null;
        RecordField recordField = new RecordField( );
        recordField.setEntry( this );

        if ( ( record != null ) && bAddNewValue )
        {
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( record.getDirectory( ).getIdDirectory( ) );
            recordFieldFilter.setIdEntry( this.getIdEntry( ) );
            recordFieldFilter.setIdRecord( record.getIdRecord( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, plugin );

            if ( ( recordFieldList != null ) && !recordFieldList.isEmpty( ) && StringUtils.isNotBlank( recordFieldList.get( 0 ).getValue( ) ) )
            {
                strValueEntry = recordFieldList.get( 0 ).getValue( ) + ", " + strValueEntry;
            }
        }

        if ( strValueEntry != null )
        {
            if ( bTestDirectoryError && this.isMandatory( ) && strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }

            recordField.setValue( strValueEntry );
        }

        listRecordField.add( recordField );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isSortable( )
    {
        return true;
    }

    /**
     * Check if entries of this type are anonymizable or not.
     * 
     * @return True if the entry type is anonymizable, false otherwise
     */
    @Override
    public boolean isAnonymizable( )
    {
        return true;
    }
}
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryDAO.java 566
fr/paris/lutece/plugins/directory/business/EntryDAO.java 911
            daoUtil.setBoolean( nIndex, filter.getIsShownInHistory( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsIndexed( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsIndexed( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsIndexedAsTitle( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsIndexedAsTitle( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsIndexedAsSummary( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsIndexedAsSummary( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsComment( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsComment( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsMyLuteceUser( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsMyLuteceUser( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsWorkgroupAssociated( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsWorkgroupAssociated( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsRoleAssociated( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsRoleAssociated( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

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

        if ( filter.containsIdEntryAssociate( ) )
        {
            daoUtil.setInt( nIndex, filter.getIdEntryAssociate( ) );
            nIndex++;
        }

        if ( filter.containsIsAutocompleteEntry( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsAutocompleteEntry( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsShownInExport( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsShownInExport( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsShownInCompleteness( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsShownInCompleteness( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 176
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 205
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        Plugin plugin = PluginService.getPlugin( DirectoryPlugin.PLUGIN_NAME );

        String strValueEntry = ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) ) ? lstValue.get( 0 ) : null;
        RecordField recordField = new RecordField( );
        recordField.setEntry( this );

        if ( ( record != null ) && bAddNewValue )
        {
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( record.getDirectory( ).getIdDirectory( ) );
            recordFieldFilter.setIdEntry( this.getIdEntry( ) );
            recordFieldFilter.setIdRecord( record.getIdRecord( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, plugin );

            if ( ( recordFieldList != null ) && !recordFieldList.isEmpty( ) && StringUtils.isNotBlank( recordFieldList.get( 0 ).getValue( ) ) )
            {
                strValueEntry = recordFieldList.get( 0 ).getValue( ) + ", " + strValueEntry;
            }
        }

        if ( strValueEntry != null )
        {
            if ( bTestDirectoryError && this.isMandatory( ) && strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }

            recordField.setValue( strValueEntry );
        }

        listRecordField.add( recordField );
    }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCamera.java 293
fr/paris/lutece/plugins/directory/business/EntryTypeImg.java 379
            if ( bTestDirectoryError && this.isMandatory( ) && ( ( sourceImage == null ) || StringUtils.isEmpty( sourceImage ) ) )
            {
                RecordField recordField = new RecordField( );
                recordField.setEntry( this );
                recordField.setValue( FIELD_IMAGE );
                listRecordField.add( recordField );

                throw new DirectoryErrorException( this.getTitle( ) );
            }
        }
        else
            if ( bTestDirectoryError )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LocalizedPaginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex, Locale locale )
    {
        return new LocalizedPaginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName,
                strPageIndex, locale );
    }

    // PROTECTED METHODS

    /**
     * {@inheritDoc}
     */
    @Override
    protected String checkEntryData( HttpServletRequest request, Locale locale )
    {
        String strError = super.checkEntryData( request, locale );

        if ( StringUtils.isBlank( strError ) )
        {
            String strFieldError = StringUtils.EMPTY;
            String strTitle = request.getParameter( PARAMETER_TITLE );

            String strWidth = request.getParameter( PARAMETER_WIDTH );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRss.java 371
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRss.java 526
            List<IEntry> entryList = EntryHome.getEntryList( filter, pluginDirectory );

            for ( IEntry entry : entryList )
            {
                for ( int i = 0; i < strTabAcceptEntryType.length; i++ )
                {
                    if ( entry.getEntryType( ).getIdType( ) == Integer.parseInt( strTabAcceptEntryType [i] ) )
                    {
                        if ( entry.isMandatory( ) )
                        {
                            referenceEntry.addItem( entry.getIdEntry( ), entry.getTitle( ) );
                        }

                        referenceEntryFilter.addItem( entry.getIdEntry( ), entry.getTitle( ) );
                    }
                }

                for ( int i = 0; i < strTabAcceptEntryTypeForLink.length; i++ )
                {
                    if ( entry.getEntryType( ).getIdType( ) == Integer.parseInt( strTabAcceptEntryTypeForLink [i] ) )
                    {
                        referenceEntryLink.addItem( entry.getIdEntry( ), entry.getTitle( ) );
                    }
                }

                if ( entry.getEntryType( ).getIdType( ) == entryTypeImage )
                {
                    referenceEntryImage.addItem( entry.getIdEntry( ), entry.getTitle( ) );
                }
            }

            if ( !referenceEntryLink.isEmpty( ) )
            {
                referenceEntryLink.addItem( -1, "" );
                model.put( MARK_ENTRY_LIST_LINK, referenceEntryLink );
            }

            if ( !referenceEntryImage.isEmpty( ) )
            {
                referenceEntryImage.addItem( -1, "" );
                model.put( MARK_ENTRY_LIST_IMAGE, referenceEntryImage );
            }

            if ( !referenceEntryFilter.isEmpty( ) )
            {
                referenceEntryFilter.addItem( -1, "" );
                model.put( MARK_ENTRY_LIST_FILTER, referenceEntryFilter );
                model.put( MARK_LOCALE, locale );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 77
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 83
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strValue = request.getParameter( PARAMETER_VALUE );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strDocumentTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strDocumentSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strWidth = request.getParameter( PARAMETER_WIDTH );
        String strMaxSizeEnter = request.getParameter( PARAMETER_MAX_SIZE_ENTER );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
        String strAutocomplete = request.getParameter( PARAMETER_AUTOCOMPLETE );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCamera.java 161
fr/paris/lutece/plugins/directory/business/EntryTypeImg.java 179
        this.setDisplayHeight( nHeight );

        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strIndexedAsTitle != null );
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInFormMainSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInCompleteness( strShowInCompleteness != null );
        // image can't be exported in csv
        this.setShownInExport( false );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        // add Empty recordField(Use for data import)
        RecordField recordField = new RecordField( );
        recordField.setEntry( this );
        listRecordField.add( recordField );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getImportRecordFieldData( Record record, String strImportValue, boolean bTestDirectoryError, List<RecordField> listRecordField, Locale locale )
            throws DirectoryErrorException
    {
        // add Empty recordField
        RecordField recordField = new RecordField( );
        recordField.setEntry( this );
        listRecordField.add( recordField );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, HttpServletRequest request, boolean bTestDirectoryError, boolean bAddNewValue,
            List<RecordField> listRecordField, Locale locale ) throws DirectoryErrorException
    {
        if ( request instanceof MultipartHttpServletRequest )
        {
Fichier Ligne
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRss.java 751
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRss.java 982
        List<HashMap<String, Object>> listItem = new ArrayList<HashMap<String, Object>>( );
        IRecordService recordService = SpringContextService.getBean( RecordService.BEAN_SERVICE );

        for ( Integer idRecord : listResultRecordId )
        {
            Record record = recordService.findByPrimaryKey( idRecord, pluginDirectory );
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( config.getIdDirectory( ) );
            recordFieldFilter.setIdRecord( idRecord );

            recordFieldFilter.setIdEntry( config.getIdEntryTitle( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, pluginDirectory );
            RecordField recordFieldTitle = recordFieldList.get( 0 );

            recordFieldFilter.setIdEntry( config.getIdEntryDescription( ) );

            List<RecordField> recordFieldList2 = RecordFieldHome.getRecordFieldList( recordFieldFilter, pluginDirectory );
            RecordField recordFieldDescription = recordFieldList2.get( 0 );

            recordFieldFilter.setIdEntry( config.getIdEntryImage( ) );

            List<RecordField> recordFieldListImage = RecordFieldHome.getRecordFieldList( recordFieldFilter, pluginDirectory );
            RecordField recordFieldImage = null;

            if ( !recordFieldListImage.isEmpty( ) )
            {
                recordFieldImage = recordFieldListImage.get( 0 );
            }

            recordFieldFilter.setIdEntry( config.getIdEntryLink( ) );

            List<RecordField> recordFieldListLink = RecordFieldHome.getRecordFieldList( recordFieldFilter, pluginDirectory );
            RecordField recordFieldLink = null;

            if ( !recordFieldListLink.isEmpty( ) )
            {
                recordFieldLink = recordFieldListLink.get( 0 );
            }

            if ( ( recordFieldTitle != null ) && ( recordFieldDescription != null ) )
            {
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 77
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 83
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strValue = request.getParameter( PARAMETER_VALUE );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strDocumentTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strDocumentSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strWidth = request.getParameter( PARAMETER_WIDTH );
        String strMaxSizeEnter = request.getParameter( PARAMETER_MAX_SIZE_ENTER );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRss.java 185
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRss.java 220
    public void doSaveConfig( HttpServletRequest request, Locale locale )
    {
        Plugin pluginDirectory = PluginService.getPlugin( DirectoryPlugin.PLUGIN_NAME );

        String idDirectory = request.getParameter( PARAMETER_ID_DIRECTORY );
        String idEntryDescription = request.getParameter( PARAMETER_ID_ENTRY_DESCRIPTION );
        String idEntryTitle = request.getParameter( PARAMETER_ID_ENTRY_TITLE );
        String idWorkflowState = request.getParameter( PARAMETER_ID_WORKFLOW_STATE );
        String idEntryImage = request.getParameter( PARAMETER_ID_ENTRY_IMAGE );
        String idEntryLink = request.getParameter( PARAMETER_ID_ENTRY_LINK );
        String idEntryFilter1 = request.getParameter( PARAMETER_ID_ENTRY_FILTER_1 );
        String idEntryFilter2 = request.getParameter( PARAMETER_ID_ENTRY_FILTER_2 );
        String strValueFilter1 = request.getParameter( idEntryFilter1 );
        String strValueFilter2 = request.getParameter( idEntryFilter2 );

        DirectoryResourceRssConfig config = new DirectoryResourceRssConfig( );
        config.setIdRss( this.getId( ) );
        config.setIdDirectory( DirectoryUtils.convertStringToInt( idDirectory ) );
        config.setIdEntryTitle( DirectoryUtils.convertStringToInt( idEntryTitle ) );
        config.setIdEntryDescription( DirectoryUtils.convertStringToInt( idEntryDescription ) );
        config.setIdEntryImage( DirectoryUtils.convertStringToInt( idEntryImage ) );
        config.setIdEntryLink( DirectoryUtils.convertStringToInt( idEntryLink ) );
        config.setIdEntryFilter1( DirectoryUtils.convertStringToInt( idEntryFilter1 ) );
        config.setIdEntryFilter2( DirectoryUtils.convertStringToInt( idEntryFilter2 ) );
        config.setValueFilter1( strValueFilter1 );
        config.setValueFilter2( strValueFilter2 );
        config.setIdWorkflowState( DirectoryUtils.convertStringToInt( idWorkflowState ) );

        DirectoryResourceRssConfigHome.create( config, pluginDirectory );
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3495
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3571
    public String getCreateDirectoryRecord( HttpServletRequest request ) throws AccessDeniedException
    {
        String strIdDirectory = request.getParameter( PARAMETER_ID_DIRECTORY );
        int nIdDirectory = DirectoryUtils.convertStringToInt( strIdDirectory );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, getPlugin( ) );

        if ( ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, strIdDirectory, DirectoryResourceIdService.PERMISSION_CREATE_RECORD, getUser( ) )
                || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        Map<String, Object> model = new HashMap<String, Object>( );

        /**
         * Map of idEntry, RecordFields 1) The user has uploaded/deleted a file - The updated map is stored in the session 2) The user has not uploaded/delete
         * a file - The map is filled with the data from the database - The asynchronous uploaded files map is reinitialized
         */
        Map<String, List<RecordField>> map = null;

        // Get the map of <idEntry, RecordFields from session if it exists :
        /**
         * 1) Case when the user has uploaded a file, the the map is stored in the session
         */
        HttpSession session = request.getSession( false );

        if ( session != null )
        {
            map = (Map<String, List<RecordField>>) session.getAttribute( DirectoryUtils.SESSION_DIRECTORY_LIST_SUBMITTED_RECORD_FIELDS );

            if ( map != null )
            {
                model.put( MARK_MAP_ID_ENTRY_LIST_RECORD_FIELD, map );
                // IMPORTANT : Remove the map from the session
                session.removeAttribute( DirectoryUtils.SESSION_DIRECTORY_LIST_SUBMITTED_RECORD_FIELDS );
            }
        }

        // Get the map idEntry, RecordFields classically from the database
        /** 2) The user has not uploaded/delete a file */
        if ( map == null )
        {
            // Remove asynchronous uploaded file from session
            DirectoryAsynchronousUploadHandler.getHandler( ).removeSessionFiles( request.getSession( ).getId( ) );
        }

        List<IEntry> listEntry = DirectoryUtils.getFormEntries( nIdDirectory, getPlugin( ), getUser( ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 213
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 572
        if ( daoUtil.next( ) )
        {
            recordField = new RecordField( );
            recordField.setIdRecordField( daoUtil.getInt( 1 ) );
            record = new Record( );
            record.setIdRecord( daoUtil.getInt( 2 ) );
            recordField.setRecord( record );
            recordField.setValue( daoUtil.getString( 3 ) );

            /**
             * if( daoUtil.getBytes( 3 ) != null ) { recordField.setValue( new String( daoUtil.getBytes( 3 ) ) ); }
             **/
            entryType = new EntryType( );
            entryType.setClassName( daoUtil.getString( 4 ) );

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

            if ( bException )
            {
                daoUtil.free( );

                return null;
            }

            entry.setEntryType( entryType );
            entry.setIdEntry( daoUtil.getInt( 5 ) );
            entry.setTitle( daoUtil.getString( 6 ) );
            entry.setDisplayWidth( daoUtil.getInt( 7 ) );
            entry.setDisplayHeight( daoUtil.getInt( 8 ) );

            recordField.setEntry( entry );

            if ( daoUtil.getObject( 9 ) != null )
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 1557
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 1803
        Map<String, Object> model = new HashMap<String, Object>( );

        // For Entry Type Directory
        String strAutorizeEntryType = AppPropertiesService.getProperty( PROPERTY_ENTRY_AUTORIZE_FOR_ENTRY_DIRECTORY );
        String [ ] strTabAutorizeEntryType = strAutorizeEntryType.split( "," );

        ReferenceList listEntryAssociateWithoutJavascript = new ReferenceList( );
        List<List<IEntry>> listEntryWithJavascript = new ArrayList<List<IEntry>>( );

        for ( ReferenceItem item : DirectoryHome.getDirectoryList( plugin ) )
        {
            List<IEntry> listEntry = new ArrayList<IEntry>( );
            Directory directoryTmp = DirectoryHome.findByPrimaryKey( DirectoryUtils.convertStringToInt( item.getCode( ) ), plugin );
            EntryFilter entryFilter = new EntryFilter( );
            entryFilter.setIdDirectory( directoryTmp.getIdDirectory( ) );

            for ( IEntry entryTmp : EntryHome.getEntryList( entryFilter, plugin ) )
            {
                boolean bEntryAutorize = false;

                for ( int i = 0; ( i < strTabAutorizeEntryType.length ) && !bEntryAutorize; i++ )
                {
                    if ( entryTmp.getEntryType( ).getIdType( ) == DirectoryUtils.convertStringToInt( strTabAutorizeEntryType [i] ) )
                    {
                        bEntryAutorize = true;
                    }
                }

                if ( bEntryAutorize )
                {
                    listEntryAssociateWithoutJavascript.addItem( entryTmp.getIdEntry( ), directoryTmp.getTitle( ) + " - " + entryTmp.getTitle( ) );
                    listEntry.add( entryTmp );
                }
            }

            listEntryWithJavascript.add( listEntry );
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDate.java 79
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 93
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 72
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strValue = request.getParameter( PARAMETER_VALUE );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strMultipleSearchFields = request.getParameter( PARAMETER_MULTIPLE_SEARCH_FIELDS );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/FieldDAO.java 167
fr/paris/lutece/plugins/directory/business/FieldDAO.java 209
        daoUtil.setInt( 1, nId );
        daoUtil.executeQuery( );

        Field field = null;
        IEntry entry = null;

        if ( daoUtil.next( ) )
        {
            field = new Field( );
            field.setIdField( daoUtil.getInt( 1 ) );
            // parent entry
            entry = new Entry( );
            entry.setIdEntry( daoUtil.getInt( 2 ) );
            field.setEntry( entry );
            field.setTitle( daoUtil.getString( 3 ) );
            field.setValue( daoUtil.getString( 4 ) );
            field.setHeight( daoUtil.getInt( 5 ) );
            field.setWidth( daoUtil.getInt( 6 ) );
            field.setDefaultValue( daoUtil.getBoolean( 7 ) );
            field.setMaxSizeEnter( daoUtil.getInt( 8 ) );
            field.setPosition( daoUtil.getInt( 9 ) );
            field.setValueTypeDate( daoUtil.getDate( 10 ) );
            field.setRoleKey( daoUtil.getString( 11 ) );
            field.setWorkgroup( daoUtil.getString( 12 ) );
            field.setShownInResultList( daoUtil.getBoolean( 13 ) );
            field.setShownInResultRecord( daoUtil.getBoolean( 14 ) );
            field.setImageType( daoUtil.getString( 15 ) );
        }

        daoUtil.free( );

        return field;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Field loadByValue( int nIdEntry, String strValue, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryApp.java 267
fr/paris/lutece/plugins/directory/web/DirectoryApp.java 449
                    directory = DirectoryHome.findByPrimaryKey( record.getDirectory( ).getIdDirectory( ), plugin );

                    listRecord = (List<Record>) session.getAttribute( SESSION_ID_LAST_RECORD );

                    if ( ( listRecord != null ) && ( listRecord.size( ) > 0 )
                            && ( listRecord.get( listRecord.size( ) - 1 ).getIdRecord( ) != record.getIdRecord( ) ) )
                    {
                        listRecord.add( record );
                    }
                    else
                        if ( listRecord == null )
                        {
                            listRecord = new ArrayList<Record>( );
                            listRecord.add( record );
                        }

                    session.setAttribute( SESSION_ID_LAST_RECORD, listRecord );

                    listIdDirectory = (List<Integer>) session.getAttribute( SESSION_ID_LAST_DIRECTORY );

                    if ( ( listIdDirectory != null ) && ( listIdDirectory.size( ) > 0 )
                            && !listIdDirectory.get( listIdDirectory.size( ) - 1 ).equals( record.getDirectory( ).getIdDirectory( ) ) )
                    {
                        listIdDirectory.add( record.getDirectory( ).getIdDirectory( ) );
                    }
                    else
                        if ( listIdDirectory == null )
                        {
                            listIdDirectory = new ArrayList<Integer>( );
                            listIdDirectory.add( record.getDirectory( ).getIdDirectory( ) );
                        }

                    session.setAttribute( SESSION_ID_LAST_DIRECTORY, listIdDirectory );
                }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCheckBox.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 71
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDirectory.java 93
fr/paris/lutece/plugins/directory/business/EntryTypeSelect.java 74
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/FieldDAO.java 136
fr/paris/lutece/plugins/directory/business/FieldDAO.java 261
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, plugin );
        daoUtil.setInt( 1, field.getIdField( ) );
        daoUtil.setInt( 2, field.getEntry( ).getIdEntry( ) );
        daoUtil.setString( 3, field.getTitle( ) );
        daoUtil.setString( 4, field.getValue( ) );
        daoUtil.setInt( 5, field.getHeight( ) );
        daoUtil.setInt( 6, field.getWidth( ) );
        daoUtil.setBoolean( 7, field.isDefaultValue( ) );
        daoUtil.setInt( 8, field.getMaxSizeEnter( ) );
        daoUtil.setInt( 9, field.getPosition( ) );
        daoUtil.setDate( 10, ( field.getValueTypeDate( ) == null ) ? null : new Date( field.getValueTypeDate( ).getTime( ) ) );

        daoUtil.setString( 11, field.getRoleKey( ) );
        daoUtil.setString( 12, field.getWorkgroup( ) );
        daoUtil.setBoolean( 13, field.isShownInResultList( ) );
        daoUtil.setBoolean( 14, field.isShownInResultRecord( ) );
        daoUtil.setString( 15, field.getImageType( ) );

        daoUtil.executeUpdate( );
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2209
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2272
    public String doMoveUpEntry( HttpServletRequest request ) throws AccessDeniedException
    {
        Plugin plugin = getPlugin( );
        IEntry entry;

        String strIdEntry = request.getParameter( PARAMETER_ID_ENTRY );
        int nIdEntry = DirectoryUtils.convertStringToInt( strIdEntry );
        entry = EntryHome.findByPrimaryKey( nIdEntry, plugin );

        int nIdDirectory = _searchFields.getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, plugin );

        if ( ( entry == null )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY,
                        getUser( ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        List<IEntry> listEntry;
        EntryFilter filter = new EntryFilter( );
        filter.setIdDirectory( entry.getDirectory( ).getIdDirectory( ) );

        if ( entry.getParent( ) != null )
        {
            filter.setIdEntryParent( entry.getParent( ).getIdEntry( ) );
        }
        else
        {
            filter.setIsEntryParentNull( EntryFilter.FILTER_TRUE );
        }

        listEntry = EntryHome.getEntryList( filter, plugin );

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

        if ( nIndexEntry != 0 )
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryDAO.java 458
fr/paris/lutece/plugins/directory/business/EntryDAO.java 823
            listStrFilter.add( SQL_FILTER_IS_SHOWN_IN_HISTORY );
        }

        if ( filter.containsIsIndexed( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_INDEXED );
        }

        if ( filter.containsIsIndexedAsTitle( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_INDEXED_AS_TITLE );
        }

        if ( filter.containsIsIndexedAsSummary( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_INDEXED_AS_SUMMARY );
        }

        if ( filter.containsIsComment( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_COMMENT );
        }

        if ( filter.containsIsMyLuteceUser( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_MYLUTECE_USER );
        }

        if ( filter.containsIsWorkgroupAssociated( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_WORKGROUP_ASSOCIATED );
        }

        if ( filter.containsIsRoleAssociated( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_ROLE_ASSOCIATED );
        }

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

        if ( filter.containsIdEntryAssociate( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_ENTRY_ASSOCIATE );
        }

        if ( filter.containsIsAutocompleteEntry( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_AUTOCOMPLETE_ENTRY );
        }

        if ( filter.containsIsShownInExport( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_SHOWN_IN_EXPORT );
        }

        if ( filter.containsIsShownInCompleteness( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_SHOWN_IN_COMPLETENESS );
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/FieldDAO.java 173
fr/paris/lutece/plugins/directory/business/FieldDAO.java 215
fr/paris/lutece/plugins/directory/business/FieldDAO.java 296
        if ( daoUtil.next( ) )
        {
            field = new Field( );
            field.setIdField( daoUtil.getInt( 1 ) );
            // parent entry
            entry = new Entry( );
            entry.setIdEntry( daoUtil.getInt( 2 ) );
            field.setEntry( entry );
            field.setTitle( daoUtil.getString( 3 ) );
            field.setValue( daoUtil.getString( 4 ) );
            field.setHeight( daoUtil.getInt( 5 ) );
            field.setWidth( daoUtil.getInt( 6 ) );
            field.setDefaultValue( daoUtil.getBoolean( 7 ) );
            field.setMaxSizeEnter( daoUtil.getInt( 8 ) );
            field.setPosition( daoUtil.getInt( 9 ) );
            field.setValueTypeDate( daoUtil.getDate( 10 ) );
            field.setRoleKey( daoUtil.getString( 11 ) );
            field.setWorkgroup( daoUtil.getString( 12 ) );
            field.setShownInResultList( daoUtil.getBoolean( 13 ) );
            field.setShownInResultRecord( daoUtil.getBoolean( 14 ) );
            field.setImageType( daoUtil.getString( 15 ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryDAO.java 246
fr/paris/lutece/plugins/directory/business/EntryDAO.java 653
            entryType = new EntryType( );
            entryType.setIdType( daoUtil.getInt( 1 ) );
            entryType.setTitleI18nKey( daoUtil.getString( 2 ) );
            entryType.setGroup( daoUtil.getBoolean( 3 ) );
            entryType.setComment( daoUtil.getBoolean( 4 ) );
            entryType.setMyLuteceUser( daoUtil.getBoolean( 5 ) );
            entryType.setClassName( daoUtil.getString( 6 ) );

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

            if ( bException )
            {
                daoUtil.free( );

                return null;
            }

            entry.setEntryType( entryType );
            entry.setIdEntry( daoUtil.getInt( 7 ) );
            // insert directory
            directory = new Directory( );
            directory.setIdDirectory( daoUtil.getInt( 8 ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/DirectoryDAO.java 192
fr/paris/lutece/plugins/directory/business/DirectoryDAO.java 402
        if ( daoUtil.next( ) )
        {
            directory = new Directory( );
            directory.setIdDirectory( daoUtil.getInt( 1 ) );
            directory.setTitle( daoUtil.getString( 2 ) );
            directory.setDescription( daoUtil.getString( 3 ) );
            directory.setUnavailabilityMessage( daoUtil.getString( 4 ) );
            directory.setWorkgroup( daoUtil.getString( 5 ) );
            directory.setRoleKey( daoUtil.getString( 6 ) );
            directory.setEnabled( daoUtil.getBoolean( 7 ) );
            directory.setDateCreation( daoUtil.getTimestamp( 8 ) );

            if ( daoUtil.getObject( 9 ) != null )
            {
                directory.setIdResultListTemplate( daoUtil.getInt( 9 ) );
            }

            if ( daoUtil.getObject( 10 ) != null )
            {
                directory.setIdResultRecordTemplate( daoUtil.getInt( 10 ) );
            }

            if ( daoUtil.getObject( 11 ) != null )
            {
                directory.setIdFormSearchTemplate( daoUtil.getInt( 11 ) );
            }

            directory.setNumberRecordPerPage( daoUtil.getInt( 12 ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 218
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 428
            record.setIdRecord( daoUtil.getInt( 2 ) );
            recordField.setRecord( record );
            recordField.setValue( daoUtil.getString( 3 ) );

            /**
             * if( daoUtil.getBytes( 3 ) != null ) { recordField.setValue( new String( daoUtil.getBytes( 3 ) ) ); }
             **/
            entryType = new EntryType( );
            entryType.setClassName( daoUtil.getString( 4 ) );

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

            if ( bException )
            {
                daoUtil.free( );

                return null;
            }

            entry.setEntryType( entryType );
            entry.setIdEntry( daoUtil.getInt( 5 ) );
            entry.setTitle( daoUtil.getString( 6 ) );
            entry.setDisplayWidth( daoUtil.getInt( 7 ) );
            entry.setDisplayHeight( daoUtil.getInt( 8 ) );

            recordField.setEntry( entry );

            if ( daoUtil.getObject( 9 ) != null )
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3372
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 5363
                        _recordService.create( record, getPlugin( ) );
                    }
                    catch( DirectoryErrorException error )
                    {
                        _searchFields.getError( ).append( I18nService.getLocalizedString( PROPERTY_LINE, getLocale( ) ) );
                        _searchFields.getError( ).append( _searchFields.getCountLine( ) );
                        _searchFields.getError( ).append( " > " );

                        if ( error.isMandatoryError( ) )
                        {
                            Object [ ] tabRequiredFields = {
                                error.getTitleField( )
                            };
                            _searchFields.getError( ).append(
                                    I18nService.getLocalizedString( MESSAGE_DIRECTORY_ERROR_MANDATORY_FIELD, tabRequiredFields, getLocale( ) ) );
                        }
                        else
                        {
                            Object [ ] tabRequiredFields = {
                                    error.getTitleField( ), error.getErrorMessage( )
                            };
                            _searchFields.getError( ).append( I18nService.getLocalizedString( MESSAGE_DIRECTORY_ERROR, tabRequiredFields, getLocale( ) ) );
                        }

                        _searchFields.getError( ).append( "<br/>" );
                        _searchFields.setCountLineFailure( _searchFields.getCountLineFailure( ) + 1 );
                    }
                }
            }
        }

        catch( IOException e )
        {
            AppLogService.error( e );
        }

        return getJspImportDirectoryRecord( request, nIdDirectory );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDirectory.java 130
fr/paris/lutece/plugins/directory/business/EntryTypeMyLuteceUser.java 155
fr/paris/lutece/plugins/directory/business/EntryTypeRemoteMyLuteceUser.java 145
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
        String strIsAllSearch = request.getParameter( PARAMETER_IS_ADD_VALUE_SEARCH_ALL );
        String strLabelValueAllSearch = request.getParameter( PARAMETER_LABEL_VALUE_SEARCH_ALL );
        String strIdEntryAssociate = request.getParameter( PARAMETER_ENTRY_ASSOCIATE );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDate.java 79
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 93
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 77
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 83
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strValue = request.getParameter( PARAMETER_VALUE );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCheckBox.java 133
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 134
        int nFieldInLine = DirectoryUtils.convertStringToInt( strFieldInLine );

        String strFieldError = DirectoryUtils.EMPTY_STRING;

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

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

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

        // for don't update fields listFields=null
        this.setFields( null );

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strIndexedAsTitle != null );
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setFieldInLine( nFieldInLine == 1 );
        this.setShownInHistory( strShowInHistory != null );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 203
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 203
fr/paris/lutece/plugins/directory/business/EntryTypeSQL.java 208
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 232
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
        Plugin plugin = PluginService.getPlugin( DirectoryPlugin.PLUGIN_NAME );

        String strValueEntry = ( ( lstValue != null ) && ( lstValue.size( ) > 0 ) ) ? lstValue.get( 0 ) : null;
        RecordField recordField = new RecordField( );
        recordField.setEntry( this );

        if ( ( record != null ) && bAddNewValue )
        {
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( record.getDirectory( ).getIdDirectory( ) );
            recordFieldFilter.setIdEntry( this.getIdEntry( ) );
            recordFieldFilter.setIdRecord( record.getIdRecord( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, plugin );

            if ( ( recordFieldList != null ) && !recordFieldList.isEmpty( ) && StringUtils.isNotBlank( recordFieldList.get( 0 ).getValue( ) ) )
Fichier Ligne
fr/paris/lutece/plugins/directory/business/Record.java 365
fr/paris/lutece/plugins/directory/business/Record.java 626
        for ( IEntry entry : listEntryResultSearch )
        {
            if ( entry.getEntryType( ).getGroup( ) && ( entry.getChildren( ) != null ) )
            {
                for ( IEntry entryChildren : entry.getChildren( ) )
                {
                    if ( !entryChildren.getEntryType( ).getComment( ) )
                    {
                        getXmlListRecordField( entryChildren, strXml, plugin, locale, bWithHtmlCode,
                                mapEntryRecordFields.get( Integer.toString( entryChildren.getIdEntry( ) ) ), bDisplayTitleEntryTypeSelect, bDisplayFront,
                                bDisplayExport );
                    }
                }
            }
            else
                if ( !entry.getEntryType( ).getComment( ) )
                {
                    getXmlListRecordField( entry, strXml, plugin, locale, bWithHtmlCode, mapEntryRecordFields.get( Integer.toString( entry.getIdEntry( ) ) ),
                            bDisplayTitleEntryTypeSelect, bDisplayFront, bDisplayExport );
                }
        }

        XmlUtil.endElement( strXml, Entry.TAG_LIST_ENTRY );
        XmlUtil.endElement( strXml, TAG_RECORD );

        return strXml;
    }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 568
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 748
        }

        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            recordField = new RecordField( );
            recordField.setIdRecordField( daoUtil.getInt( 1 ) ); // drf.id_record_field
            record = new Record( );
            record.setIdRecord( daoUtil.getInt( 2 ) ); // drf.id_record
            recordField.setRecord( record );
            recordField.setValue( daoUtil.getString( 3 ) ); // drf.record_field_value

            entryType = new EntryType( );
            entryType.setClassName( daoUtil.getString( 4 ) ); // type.class_name

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

            if ( bException )
            {
                daoUtil.free( );

                return null;
            }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDirectory.java 93
fr/paris/lutece/plugins/directory/business/EntryTypeDownloadUrl.java 115
fr/paris/lutece/plugins/directory/business/EntryTypeSelect.java 74
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDownloadUrl.java 220
fr/paris/lutece/plugins/directory/business/EntryTypeFile.java 275
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator<RegularExpression> getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator<RegularExpression>( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName,
                strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, HttpServletRequest request, boolean bTestDirectoryError, boolean bAddNewValue,
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3266
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 5294
    public String doImportDirectoryRecord( HttpServletRequest request ) throws AccessDeniedException
    {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        FileItem fileItem = multipartRequest.getFile( PARAMETER_FILE_IMPORT );
        String strMimeType = FileSystemUtil.getMIMEType( FileUploadService.getFileNameOnly( fileItem ) );

        if ( ( fileItem == null ) || ( fileItem.getName( ) == null ) || DirectoryUtils.EMPTY_STRING.equals( fileItem.getName( ) ) )
        {
            Object [ ] tabRequiredFields = {
                I18nService.getLocalizedString( FIELD_FILE_IMPORT, getLocale( ) )
            };

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

        if ( ( !strMimeType.equals( CONSTANT_MIME_TYPE_CSV ) && !strMimeType.equals( CONSTANT_MIME_TYPE_OCTETSTREAM ) && !strMimeType
                .equals( CONSTANT_MIME_TYPE_TEXT_CSV ) ) || !fileItem.getName( ).toLowerCase( ).endsWith( CONSTANT_EXTENSION_CSV_FILE ) )
        {
            return AdminMessageService.getMessageUrl( request, MESSAGE_ERROR_CSV_FILE_IMPORT, AdminMessage.TYPE_STOP );
        }

        String strIdDirectory = request.getParameter( PARAMETER_ID_DIRECTORY );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 216
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 296
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 216
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 282
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 245
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 286
        recordField.setEntry( this );

        if ( ( record != null ) && bAddNewValue )
        {
            RecordFieldFilter recordFieldFilter = new RecordFieldFilter( );
            recordFieldFilter.setIdDirectory( record.getDirectory( ).getIdDirectory( ) );
            recordFieldFilter.setIdEntry( this.getIdEntry( ) );
            recordFieldFilter.setIdRecord( record.getIdRecord( ) );

            List<RecordField> recordFieldList = RecordFieldHome.getRecordFieldList( recordFieldFilter, plugin );

            if ( ( recordFieldList != null ) && !recordFieldList.isEmpty( ) && StringUtils.isNotBlank( recordFieldList.get( 0 ).getValue( ) ) )
            {
                strValueEntry = recordFieldList.get( 0 ).getValue( ) + ", " + strValueEntry;
            }
        }

        if ( strValueEntry != null )
        {
            if ( bTestDirectoryError && this.isMandatory( ) && strValueEntry.equals( DirectoryUtils.EMPTY_STRING ) )
            {
                throw new DirectoryErrorException( this.getTitle( ) );
            }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 213
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 752
        if ( daoUtil.next( ) )
        {
            recordField = new RecordField( );
            recordField.setIdRecordField( daoUtil.getInt( 1 ) );
            record = new Record( );
            record.setIdRecord( daoUtil.getInt( 2 ) );
            recordField.setRecord( record );
            recordField.setValue( daoUtil.getString( 3 ) );

            /**
             * if( daoUtil.getBytes( 3 ) != null ) { recordField.setValue( new String( daoUtil.getBytes( 3 ) ) ); }
             **/
            entryType = new EntryType( );
            entryType.setClassName( daoUtil.getString( 4 ) );

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

            if ( bException )
            {
                daoUtil.free( );

                return null;
            }
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2772
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2820
    public String doMoveUpField( HttpServletRequest request ) throws AccessDeniedException
    {
        Plugin plugin = getPlugin( );
        List<Field> listField;
        Field field;
        String strIdField = request.getParameter( PARAMETER_ID_FIELD );
        int nIdField = DirectoryUtils.convertStringToInt( strIdField );
        field = FieldHome.findByPrimaryKey( nIdField, plugin );

        int nIdDirectory = _searchFields.getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, plugin );

        if ( ( field == null )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY,
                        getUser( ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        listField = FieldHome.getFieldListByIdEntry( field.getEntry( ).getIdEntry( ), plugin );

        int nIndexField = DirectoryUtils.getIndexFieldInTheFieldList( nIdField, listField );

        if ( nIndexField != 0 )
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3225
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 5252
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, strIdDirectory, DirectoryResourceIdService.PERMISSION_IMPORT_RECORD, getUser( ) )
                || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        Map<String, Object> model = new HashMap<String, Object>( );

        if ( request.getParameter( PARAMETER_SESSION ) != null )
        {
            if ( _searchFields.getError( ) != null )
            {
                model.put( MARK_STR_ERROR, _searchFields.getError( ).toString( ) );
            }

            model.put( MARK_NUMBER_LINES_ERROR, _searchFields.getCountLineFailure( ) );
            model.put( MARK_NUMBER_LINES_IMPORTED, _searchFields.getCountLine( ) - _searchFields.getCountLineFailure( ) );
            model.put( MARK_FINISH_IMPORT, true );
            _searchFields.setCountLine( 0 );
            _searchFields.setCountLineFailure( 0 );
            _searchFields.setError( null );
        }

        model.put( MARK_LOCALE, getLocale( ) );
        model.put( MARK_DIRECTORY, directory );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCheckBox.java 109
fr/paris/lutece/plugins/directory/business/EntryTypeDirectory.java 130
fr/paris/lutece/plugins/directory/business/EntryTypeGeolocation.java 200
fr/paris/lutece/plugins/directory/business/EntryTypeMyLuteceUser.java 155
fr/paris/lutece/plugins/directory/business/EntryTypeRemoteMyLuteceUser.java 145
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
        String strFieldInLine = request.getParameter( PARAMETER_FIELD_IN_LINE );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCamera.java 308
fr/paris/lutece/plugins/directory/business/EntryTypeImg.java 394
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 247
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 233
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 237
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LocalizedPaginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex, Locale locale )
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeSQL.java 168
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 206
        this.setRequestSQL( strRequestSQL );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strDocumentTitle != null );
        this.setIndexedAsSummary( strDocumentSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 190
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 175
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 175
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 180
            }

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

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

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );

        if ( this.getFields( ) == null )
        {
            ArrayList<Field> listFields = new ArrayList<Field>( );
            Field field = new Field( );
            listFields.add( field );
            this.setFields( listFields );
        }

        this.getFields( ).get( 0 ).setValue( strValue );
        this.getFields( ).get( 0 ).setWidth( nWidth );
        this.getFields( ).get( 0 ).setMaxSizeEnter( nMaxSizeEnter );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRssConfigDAO.java 67
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRssConfigDAO.java 93
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, plugin );

        int nPos = 0;

        daoUtil.setInt( ++nPos, config.getIdRss( ) );
        daoUtil.setInt( ++nPos, config.getIdDirectory( ) );
        daoUtil.setInt( ++nPos, config.getIdEntryTitle( ) );
        daoUtil.setInt( ++nPos, config.getIdEntryDescription( ) );
        daoUtil.setInt( ++nPos, config.getIdEntryImage( ) );
        daoUtil.setInt( ++nPos, config.getIdEntryLink( ) );
        daoUtil.setInt( ++nPos, config.getIdEntryFilter1( ) );
        daoUtil.setString( ++nPos, config.getValueFilter1( ) );
        daoUtil.setInt( ++nPos, config.getIdEntryFilter2( ) );
        daoUtil.setString( ++nPos, config.getValueFilter2( ) );
        daoUtil.setInt( ++nPos, config.getIdWorkflowState( ) );

        daoUtil.executeUpdate( );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCheckBox.java 109
fr/paris/lutece/plugins/directory/business/EntryTypeSelect.java 111
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDirectory.java 130
fr/paris/lutece/plugins/directory/business/EntryTypeGeolocation.java 200
fr/paris/lutece/plugins/directory/business/EntryTypeMyLuteceUser.java 155
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 108
fr/paris/lutece/plugins/directory/business/EntryTypeRemoteMyLuteceUser.java 145
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );
        String strShowInAdvancedSearch = request.getParameter( PARAMETER_SHOWN_IN_ADVANCED_SEARCH );
        String strShowInResultList = request.getParameter( PARAMETER_SHOWN_IN_RESULT_LIST );
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 715
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 863
        String strSQL = DirectoryUtils.buildRequetteWithFilter( SQL_QUERY_SELECT_RECORD_FIELD_BY_FILTER, listStrFilter, SQL_ORDER_BY_ID_RECORD_FIELD );

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

        if ( filter.containsIdRecord( ) )
        {
            daoUtil.setInt( nIndex, filter.getIdRecord( ) );
            nIndex++;
        }

        if ( filter.containsIdField( ) )
        {
            daoUtil.setInt( nIndex, filter.getIdField( ) );
            nIndex++;
        }

        if ( filter.containsIdEntry( ) )
        {
            daoUtil.setInt( nIndex, filter.getIdEntry( ) );
            nIndex++;
        }

        if ( filter.containsIsEntryShownInResultList( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsEntryShownInResultList( ) == RecordFieldFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsEntryShownInResultRecord( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsEntryShownInResultRecord( ) == RecordFieldFilter.FILTER_TRUE );
            nIndex++;
        }

        daoUtil.executeQuery( );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeArray.java 73
fr/paris/lutece/plugins/directory/business/EntryTypeDate.java 79
fr/paris/lutece/plugins/directory/business/EntryTypeDirectory.java 93
fr/paris/lutece/plugins/directory/business/EntryTypeDownloadUrl.java 115
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 93
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeSQL.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeSelect.java 74
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 77
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 72
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 83
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlFormSearchEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_search_entry;
        }

        return _template_html_code_form_search_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2209
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2272
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2335
    public String doMoveUpEntry( HttpServletRequest request ) throws AccessDeniedException
    {
        Plugin plugin = getPlugin( );
        IEntry entry;

        String strIdEntry = request.getParameter( PARAMETER_ID_ENTRY );
        int nIdEntry = DirectoryUtils.convertStringToInt( strIdEntry );
        entry = EntryHome.findByPrimaryKey( nIdEntry, plugin );

        int nIdDirectory = _searchFields.getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, plugin );

        if ( ( entry == null )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY,
                        getUser( ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        List<IEntry> listEntry;
        EntryFilter filter = new EntryFilter( );
        filter.setIdDirectory( entry.getDirectory( ).getIdDirectory( ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/web/action/ExportDirectoryAction.java 449
fr/paris/lutece/plugins/directory/web/action/ExportDirectoryAction.java 481
                    nTmpListId.add( listResultRecordId.get( j ) );
                }

                List<Record> nTmpListRecords = recordService.loadListByListId( nTmpListId, plugin );

                for ( Record record : nTmpListRecords )
                {
                    State state = workflowService.getState( record.getIdRecord( ), Record.WORKFLOW_RESOURCE_TYPE, idWorflow,
                            Integer.valueOf( directory.getIdDirectory( ) ) );

                    if ( bIsCsvExport )
                    {
                        strBufferListRecordXml.append( record.getXmlForCsvExport( plugin, locale, false, state, listEntryResultSearch, false, false, true,
                                bDisplayDateCreation, bDisplayDateModification, hashFields ) );
                    }
                    else
                    {
                        strBufferListRecordXml.append( record.getXml( plugin, locale, false, state, listEntryResultSearch, false, false, true,
                                bDisplayDateCreation, bDisplayDateModification, hashFields ) );
                    }
                }

                strBufferListRecordXml = this.appendPartialContent( strBufferListRecordXml, bufferedWriter, physicalFile, bIsCsvExport, strXslId,
                        nXmlHeaderLength, xmlTransformerService );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDownloadUrl.java 228
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 255
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 241
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 245
        return new Paginator<RegularExpression>( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName,
                strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, HttpServletRequest request, boolean bTestDirectoryError, boolean bAddNewValue,
Fichier Ligne
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRssConfigDAO.java 131
fr/paris/lutece/plugins/directory/business/rss/DirectoryResourceRssConfigDAO.java 178
            config = new DirectoryResourceRssConfig( );
            config.setIdRss( daoUtil.getInt( ++nPos ) );
            config.setIdDirectory( daoUtil.getInt( ++nPos ) );
            config.setIdEntryTitle( daoUtil.getInt( ++nPos ) );
            config.setIdEntryDescription( daoUtil.getInt( ++nPos ) );
            config.setIdEntryImage( daoUtil.getInt( ++nPos ) );
            config.setIdEntryLink( daoUtil.getInt( ++nPos ) );
            config.setIdEntryFilter1( daoUtil.getInt( ++nPos ) );
            config.setValueFilter1( daoUtil.getString( ++nPos ) );
            config.setIdEntryFilter2( daoUtil.getInt( ++nPos ) );
            config.setValueFilter2( daoUtil.getString( ++nPos ) );
            config.setIdWorkflowState( daoUtil.getInt( ++nPos ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 4097
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 4142
    public String doDisableDirectoryRecord( HttpServletRequest request ) throws AccessDeniedException
    {
        String strIdDirectoryRecord = request.getParameter( PARAMETER_ID_DIRECTORY_RECORD );
        int nIdDirectoryRecord = DirectoryUtils.convertStringToInt( strIdDirectoryRecord );
        Record record = _recordService.findByPrimaryKey( nIdDirectoryRecord, getPlugin( ) );

        int nIdDirectory = record.getDirectory( ).getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, getPlugin( ) );

        if ( ( record == null )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ),
                        DirectoryResourceIdService.PERMISSION_CHANGE_STATE_RECORD, getUser( ) ) || !AdminWorkgroupService.isAuthorized( record, getUser( ) )
                || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        record.setEnabled( false );
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2868
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2901
    public String doRemoveRegularExpression( HttpServletRequest request ) throws AccessDeniedException
    {
        String strIdExpression = request.getParameter( PARAMETER_ID_EXPRESSION );
        String strIdField = request.getParameter( PARAMETER_ID_FIELD );
        int nIdField = DirectoryUtils.convertStringToInt( strIdField );
        int nIdExpression = DirectoryUtils.convertStringToInt( strIdExpression );

        int nIdDirectory = _searchFields.getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, getPlugin( ) );

        if ( ( nIdExpression == DirectoryUtils.CONSTANT_ID_NULL )
                || ( nIdField == DirectoryUtils.CONSTANT_ID_NULL )
                || ( directory == null )
                || ( !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY,
                        getUser( ) ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        FieldHome.removeVerifyBy( nIdField, nIdExpression, getPlugin( ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCamera.java 96
fr/paris/lutece/plugins/directory/business/EntryTypeFile.java 80
fr/paris/lutece/plugins/directory/business/EntryTypeImg.java 113
    @Override
    public String getTemplateHtmlFormEntry( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_form_entry;
        }

        return _template_html_code_form_entry;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateHtmlRecordFieldValue( boolean isDisplayFront )
    {
        if ( isDisplayFront )
        {
            return _template_html_front_code_entry_value;
        }

        return _template_html_code_entry_value;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
        String strIndexedAsSummary = request.getParameter( PARAMETER_INDEXED_AS_SUMMARY );

        String strWidth = request.getParameter( PARAMETER_WIDTH );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCheckBox.java 304
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 268
fr/paris/lutece/plugins/directory/business/EntryTypeSelect.java 285
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void addSearchCriteria( HashMap<String, Object> mapSearchItem, RecordField recordField )
    {
        if ( ( recordField.getField( ) != null ) && ( recordField.getField( ).getValue( ) != null )
                && !recordField.getField( ).getValue( ).equals( DirectoryUtils.EMPTY_STRING ) )
        {
            List<Integer> listIdField = (List<Integer>) mapSearchItem.get( DirectorySearchItem.FIELD_ID_DIRECTORY_FIELD );

            if ( listIdField == null )
            {
                listIdField = new ArrayList<Integer>( );
            }

            listIdField.add( recordField.getField( ).getIdField( ) );
            mapSearchItem.put( DirectorySearchItem.FIELD_ID_DIRECTORY_FIELD, listIdField );
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isSortable( )
    {
        return false;
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3881
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 5413
    public String getConfirmRemoveDirectoryRecord( HttpServletRequest request ) throws AccessDeniedException
    {
        String [ ] listIdsDirectoryRecord = request.getParameterValues( PARAMETER_ID_DIRECTORY_RECORD );

        if ( ( listIdsDirectoryRecord != null ) && ( listIdsDirectoryRecord.length > 0 ) )
        {
            String strIdDirectory = request.getParameter( PARAMETER_ID_DIRECTORY );

            // If the id directory is not in the parameter, then fetch it from the first record
            // assuming all records are from the same directory
            if ( StringUtils.isBlank( strIdDirectory ) || !StringUtils.isNumeric( strIdDirectory ) )
            {
                String strIdDirectoryRecord = listIdsDirectoryRecord [0];
                int nIdDirectoryRecord = DirectoryUtils.convertStringToInt( strIdDirectoryRecord );
                Record record = _recordService.findByPrimaryKey( nIdDirectoryRecord, getPlugin( ) );
                strIdDirectory = Integer.toString( record.getDirectory( ).getIdDirectory( ) );
            }

            int nIdDirectory = DirectoryUtils.convertStringToInt( strIdDirectory );
            Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, getPlugin( ) );

            UrlItem url = new UrlItem( JSP_DO_REMOVE_DIRECTORY_RECORD );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 151
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 335
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, plugin );

        daoUtil.setInt( 1, recordField.getIdRecordField( ) );
        daoUtil.setInt( 2, recordField.getRecord( ).getIdRecord( ) );
        daoUtil.setString( 3, recordField.getValue( ) );
        // daoUtil.setBytes( 3 , recordField.getValue().getBytes() );
        daoUtil.setInt( 4, recordField.getEntry( ).getIdEntry( ) );

        if ( recordField.getField( ) != null )
        {
            daoUtil.setInt( 5, recordField.getField( ).getIdField( ) );
        }
        else
        {
            daoUtil.setIntNull( 5 );
        }

        if ( recordField.getFile( ) != null )
        {
            daoUtil.setInt( 6, recordField.getFile( ).getIdFile( ) );
        }
        else
        {
            daoUtil.setIntNull( 6 );
        }

        daoUtil.executeUpdate( );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCamera.java 316
fr/paris/lutece/plugins/directory/business/EntryTypeFile.java 283
fr/paris/lutece/plugins/directory/business/EntryTypeImg.java 402
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LocalizedPaginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex, Locale locale )
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3743
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3828
    public String getModifyDirectoryRecord( HttpServletRequest request ) throws AccessDeniedException
    {
        String strIdDirectoryRecord = request.getParameter( PARAMETER_ID_DIRECTORY_RECORD );
        int nIdDirectoryRecord = DirectoryUtils.convertStringToInt( strIdDirectoryRecord );
        Record record = _recordService.findByPrimaryKey( nIdDirectoryRecord, getPlugin( ) );

        int nIdDirectory = record.getDirectory( ).getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, getPlugin( ) );

        if ( ( record == null )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY_RECORD,
                        getUser( ) ) || !AdminWorkgroupService.isAuthorized( record, getUser( ) )
                || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCamera.java 316
fr/paris/lutece/plugins/directory/business/EntryTypeDownloadUrl.java 228
fr/paris/lutece/plugins/directory/business/EntryTypeImg.java 402
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LocalizedPaginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex, Locale locale )
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCheckBox.java 140
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 140
fr/paris/lutece/plugins/directory/business/EntryTypeSelect.java 148
        }

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

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

        // for don't update fields listFields=null
        this.setFields( null );

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strIndexedAsTitle != null );
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setFieldInLine( nFieldInLine == 1 );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeFile.java 283
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 255
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 241
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 245
        return new Paginator<RegularExpression>( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName,
                strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
    {
        ReferenceList refListRegularExpression = null;

        if ( RegularExpressionService.getInstance( ).isAvailable( ) )
        {
            refListRegularExpression = new ReferenceList( );

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

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

        return refListRegularExpression;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LocalizedPaginator<RegularExpression> getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex,
Fichier Ligne
fr/paris/lutece/plugins/directory/business/DirectoryXslDAO.java 152
fr/paris/lutece/plugins/directory/business/DirectoryXslDAO.java 258
        if ( daoUtil.next( ) )
        {
            directoryXsl = new DirectoryXsl( );
            directoryXsl.setIdDirectoryXsl( daoUtil.getInt( 1 ) );
            directoryXsl.setTitle( daoUtil.getString( 2 ) );
            directoryXsl.setDescription( daoUtil.getString( 3 ) );
            directoryXsl.setExtension( daoUtil.getString( 4 ) );

            if ( daoUtil.getObject( 5 ) != null )
            {
                file = new File( );
                file.setIdFile( daoUtil.getInt( 5 ) );
                directoryXsl.setFile( file );
            }

            if ( daoUtil.getObject( 6 ) != null )
            {
                category = new Category( );
                category.setIdCategory( daoUtil.getInt( 6 ) );
                directoryXsl.setCategory( category );
            }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 148
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 190
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 148
fr/paris/lutece/plugins/directory/business/EntryTypeText.java 175
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 175
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 180
        }

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

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

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );

        if ( this.getFields( ) == null )
        {
            ArrayList<Field> listFields = new ArrayList<Field>( );
            Field field = new Field( );
            listFields.add( field );
            this.setFields( listFields );
        }

        this.getFields( ).get( 0 ).setValue( strValue );
        this.setMandatory( strMandatory != null );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/DirectoryXslDAO.java 95
fr/paris/lutece/plugins/directory/business/DirectoryXslDAO.java 198
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, plugin );
        daoUtil.setInt( 1, directoryXsl.getIdDirectoryXsl( ) );
        daoUtil.setString( 2, directoryXsl.getTitle( ) );
        daoUtil.setString( 3, directoryXsl.getDescription( ) );
        daoUtil.setString( 4, directoryXsl.getExtension( ) );

        if ( directoryXsl.getFile( ) != null )
        {
            daoUtil.setInt( 5, directoryXsl.getFile( ).getIdFile( ) );
        }
        else
        {
            daoUtil.setIntNull( 5 );
        }

        if ( directoryXsl.getCategory( ) != null )
        {
            daoUtil.setInt( 6, directoryXsl.getCategory( ).getIdCategory( ) );
        }
        else
        {
            daoUtil.setIntNull( 6 );
        }

        daoUtil.executeUpdate( );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 220
fr/paris/lutece/plugins/directory/business/EntryTypeSQL.java 172
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        return new Paginator( this.getFields( ).get( 0 ).getRegularExpressionList( ), nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ReferenceList getReferenceListRegularExpression( IEntry entry, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/directory/web/action/DirectoryActionResult.java 238
fr/paris/lutece/plugins/directory/web/action/DirectoryActionResult.java 268
            List<Map<String, Object>> listMapRecords = new ArrayList<Map<String, Object>>( _listIdsSuccessRecord.size( ) );

            for ( Record record : listRecords )
            {
                Map<String, Object> mapRecord = new HashMap<String, Object>( );
                mapRecord.put( MARK_RECORD, record );
                mapRecord.put( MARK_MAP_ID_ENTRY_LIST_RECORD_FIELD,
                        DirectoryUtils.getMapIdEntryListRecordField( listEntries, record.getIdRecord( ), plugin, false ) );

                WorkflowService workflowService = WorkflowService.getInstance( );
                State state = workflowService.getState( record.getIdRecord( ), Record.WORKFLOW_RESOURCE_TYPE, directory.getIdWorkflow( ),
                        Integer.valueOf( directory.getIdDirectory( ) ) );
                mapRecord.put( MARK_WORKFLOW_STATE, state );
                listMapRecords.add( mapRecord );
            }

            model.put( MARK_LIST_SUCCESS_RECORDS, listMapRecords );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCamera.java 453
fr/paris/lutece/plugins/directory/business/EntryTypeImg.java 640
        if ( ( image == null ) && StringUtils.isNotBlank( imageSource ) )
        {
            String strErrorMessage = I18nService.getLocalizedString( MESSAGE_ERROR_NOT_AN_IMAGE, locale );
            throw new DirectoryErrorException( this.getTitle( ), strErrorMessage );
        }
    }

    // PRIVATE METHODS

    /**
     * Build the field full size
     * 
     * @param request
     *            the HTTP request
     * @return the field
     */
    private Field buildFieldFullSize( HttpServletRequest request )
    {
        Field fieldFullImage = DirectoryUtils.findFieldByValueInTheList( FIELD_IMAGE, getFields( ) );

        if ( fieldFullImage == null )
        {
            fieldFullImage = new Field( );
        }

        if ( request.getParameter( PARAMETER_IMAGE_SHOWN_IN_RESULT_LIST ) != null )
        {
            fieldFullImage.setShownInResultList( true );
        }
        else
        {
            fieldFullImage.setShownInResultList( false );
        }

        if ( request.getParameter( PARAMETER_IMAGE_SHOWN_IN_RESULT_RECORD ) != null )
        {
            fieldFullImage.setShownInResultRecord( true );
        }
        else
        {
            fieldFullImage.setShownInResultRecord( false );
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 428
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 757
                record.setDateModification( daoUtil.getTimestamp( 31 ) );

                recordField.setRecord( record );
                recordField.setValue( daoUtil.getString( 3 ) ); // drf.record_field_value

                entryType = new EntryType( );
                entryType.setClassName( daoUtil.getString( 4 ) ); // type.class_name

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

                if ( bException )
                {
                    daoUtil.free( );

                    return null;
                }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/DirectoryActionDAO.java 65
fr/paris/lutece/plugins/directory/business/DirectoryActionDAO.java 93
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_ACTIONS, plugin );
        daoUtil.setInt( 1, nState );
        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            DirectoryAction action = new DirectoryAction( );
            action.setNameKey( daoUtil.getString( 1 ) );
            action.setDescriptionKey( daoUtil.getString( 2 ) );
            action.setUrl( daoUtil.getString( 3 ) );
            action.setIconUrl( daoUtil.getString( 4 ) );
            action.setPermission( daoUtil.getString( 5 ) );
            action.setFormState( daoUtil.getInt( 6 ) );
            listActions.add( action );
        }

        daoUtil.free( );

        return listActions;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<DirectoryAction> selectActionsByDirectoryRecordState( int nState, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3903
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 3947
            url.addParameter( DirectoryUtils.PARAMETER_ID_DIRECTORY, nIdDirectory );

            for ( String strIdDirectoryRecord : listIdsDirectoryRecord )
            {
                int nIdDirectoryRecord = DirectoryUtils.convertStringToInt( strIdDirectoryRecord );
                Record record = _recordService.findByPrimaryKey( nIdDirectoryRecord, getPlugin( ) );

                if ( ( record == null )
                        || ( directory == null )
                        || ( record.getDirectory( ).getIdDirectory( ) != nIdDirectory )
                        || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ),
                                DirectoryResourceIdService.PERMISSION_DELETE_RECORD, getUser( ) ) || !AdminWorkgroupService.isAuthorized( record, getUser( ) )
                        || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
                {
                    throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
                }
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 5435
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 5478
            url.addParameter( DirectoryUtils.PARAMETER_ID_DIRECTORY, nIdDirectory );

            for ( String strIdDirectoryRecord : listIdsDirectoryRecord )
            {
                int nIdDirectoryRecord = DirectoryUtils.convertStringToInt( strIdDirectoryRecord );
                Record record = _recordService.findByPrimaryKey( nIdDirectoryRecord, getPlugin( ) );

                if ( ( record == null )
                        || ( directory == null )
                        || ( record.getDirectory( ).getIdDirectory( ) != nIdDirectory )
                        || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ),
                                DirectoryResourceIdService.PERMISSION_CHANGE_STATE_RECORD, getUser( ) )
                        || !AdminWorkgroupService.isAuthorized( record, getUser( ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
                {
                    throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
                }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 139
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 139
fr/paris/lutece/plugins/directory/business/EntryTypeSQL.java 144
        }

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

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

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

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

        this.setTitle( strTitle );
        this.setHelpMessage( strHelpMessage );
        this.setHelpMessageSearch( strHelpMessageSearch );
        this.setComment( strComment );
Fichier Ligne
fr/paris/lutece/plugins/directory/web/action/ExportDirectoryAction.java 452
fr/paris/lutece/plugins/directory/web/action/ExportDirectoryAction.java 484
fr/paris/lutece/plugins/directory/web/action/ExportDirectoryAction.java 536
                List<Record> nTmpListRecords = recordService.loadListByListId( nTmpListId, plugin );

                for ( Record record : nTmpListRecords )
                {
                    State state = workflowService.getState( record.getIdRecord( ), Record.WORKFLOW_RESOURCE_TYPE, idWorflow,
                            Integer.valueOf( directory.getIdDirectory( ) ) );

                    if ( bIsCsvExport )
                    {
                        strBufferListRecordXml.append( record.getXmlForCsvExport( plugin, locale, false, state, listEntryResultSearch, false, false, true,
                                bDisplayDateCreation, bDisplayDateModification, hashFields ) );
                    }
                    else
                    {
                        strBufferListRecordXml.append( record.getXml( plugin, locale, false, state, listEntryResultSearch, false, false, true,
                                bDisplayDateCreation, bDisplayDateModification, hashFields ) );
                    }
                }
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 1700
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2093
        String strIdEntry = request.getParameter( PARAMETER_ID_ENTRY );
        int nIdEntry = DirectoryUtils.convertStringToInt( strIdEntry );
        entry = EntryHome.findByPrimaryKey( nIdEntry, plugin );

        int nIdDirectory = _searchFields.getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, plugin );

        if ( ( entry == null )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY,
                        getUser( ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        _searchFields.setIdEntry( nIdEntry );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/DirectoryDAO.java 226
fr/paris/lutece/plugins/directory/business/DirectoryDAO.java 431
            directory.setDisplaySearchState( daoUtil.getBoolean( 14 ) );
            directory.setDisplayComplementarySearchState( daoUtil.getBoolean( 15 ) );

            directory.setAscendingSort( daoUtil.getBoolean( 16 ) );
            directory.setRecordActivated( daoUtil.getBoolean( 17 ) );
            directory.setIdSortEntry( daoUtil.getString( 18 ) );
            directory.setIndexed( daoUtil.getBoolean( 19 ) );
            directory.setIdSortEntryFront( daoUtil.getString( 20 ) );
            directory.setAscendingSortFront( daoUtil.getBoolean( 21 ) );
            directory.setFrontOfficeTitle( daoUtil.getString( 22 ) );
            directory.setIdWorkflowStateToRemove( daoUtil.getInt( 23 ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDownloadUrl.java 188
fr/paris/lutece/plugins/directory/business/EntryTypeSQL.java 168
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 206
        this.setFields( request );

        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strDocumentTitle != null );
        this.setIndexedAsSummary( strDocumentSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator<RegularExpression> getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeDownloadUrl.java 188
fr/paris/lutece/plugins/directory/business/EntryTypeSQL.java 168
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 201
fr/paris/lutece/plugins/directory/business/EntryTypeUrl.java 206
        this.setFields( request );

        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strDocumentTitle != null );
        this.setIndexedAsSummary( strDocumentSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Paginator<RegularExpression> getPaginator( int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 172
fr/paris/lutece/plugins/directory/business/EntryTypeMail.java 216
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 172
        this.getFields( ).get( 0 ).setValue( strValue );
        this.setMandatory( strMandatory != null );
        this.setIndexed( strIndexed != null );
        this.setIndexedAsTitle( strIndexedAsTitle != null );
        this.setIndexedAsSummary( strIndexedAsSummary != null );
        this.setShownInAdvancedSearch( strShowInAdvancedSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryDAO.java 534
fr/paris/lutece/plugins/directory/business/EntryDAO.java 891
        if ( filter.containsIdDirectory( ) )
        {
            daoUtil.setInt( nIndex, filter.getIdDirectory( ) );
            nIndex++;
        }

        if ( filter.containsIdEntryParent( ) )
        {
            daoUtil.setInt( nIndex, filter.getIdEntryParent( ) );
            nIndex++;
        }

        if ( filter.containsIsGroup( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsGroup( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsShownInResultList( ) )
        {
            daoUtil.setBoolean( nIndex, filter.getIsShownInResultList( ) == EntryFilter.FILTER_TRUE );
            nIndex++;
        }

        if ( filter.containsIsShownInResultRecord( ) )
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 1700
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2093
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2214
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2277
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2339
        String strIdEntry = request.getParameter( PARAMETER_ID_ENTRY );
        int nIdEntry = DirectoryUtils.convertStringToInt( strIdEntry );
        entry = EntryHome.findByPrimaryKey( nIdEntry, plugin );

        int nIdDirectory = _searchFields.getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, plugin );

        if ( ( entry == null )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY,
                        getUser( ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2607
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2777
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 2825
        String strIdField = request.getParameter( PARAMETER_ID_FIELD );
        int nIdField = DirectoryUtils.convertStringToInt( strIdField );
        field = FieldHome.findByPrimaryKey( nIdField, plugin );

        int nIdDirectory = _searchFields.getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, plugin );

        if ( ( field == null )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY,
                        getUser( ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 681
fr/paris/lutece/plugins/directory/business/RecordFieldDAO.java 834
        List<String> listStrFilter = new ArrayList<String>( );
        listStrFilter.add( SQL_FILTER_ASSOCIATION_ON_ID_ENTRY );
        listStrFilter.add( SQL_FILTER_ASSOCIATION_ON_ID_TYPE );

        if ( filter.containsIdRecord( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_RECORD );
        }

        if ( filter.containsIdField( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_FIELD );
        }

        if ( filter.containsIdEntry( ) )
        {
            listStrFilter.add( SQL_FILTER_ID_ENTRY );
        }

        if ( filter.containsIsEntryShownInResultList( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_ENTRY_SHOWN_IN_RESULT_LIST );
        }

        if ( filter.containsIsEntryShownInResultRecord( ) )
        {
            listStrFilter.add( SQL_FILTER_IS_ENTRY_SHOWN_IN_RESULT_RECORD );
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeArray.java 366
fr/paris/lutece/plugins/directory/business/EntryTypeCheckBox.java 312
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 276
fr/paris/lutece/plugins/directory/business/EntryTypeSelect.java 293
        if ( !recordField.getValue( ).equals( DirectoryUtils.EMPTY_STRING ) && ( recordField.getField( ) != null )
                && ( recordField.getField( ).getValue( ) != null ) && !recordField.getField( ).getValue( ).equals( DirectoryUtils.EMPTY_STRING ) )
        {
            List<Integer> listIdField = (List<Integer>) mapSearchItem.get( DirectorySearchItem.FIELD_ID_DIRECTORY_FIELD );

            if ( listIdField == null )
            {
                listIdField = new ArrayList<Integer>( );
            }

            listIdField.add( recordField.getField( ).getIdField( ) );
            mapSearchItem.put( DirectorySearchItem.FIELD_ID_DIRECTORY_FIELD, listIdField );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 129
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 131
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 129
        String strShowInResultRecord = request.getParameter( PARAMETER_SHOWN_IN_RESULT_RECORD );
        String strShowInHistory = request.getParameter( PARAMETER_SHOWN_IN_HISTORY );
        String strShowInExport = request.getParameter( PARAMETER_SHOWN_IN_EXPORT );
        String strShowInCompleteness = request.getParameter( PARAMETER_SHOWN_IN_COMPLETENESS );

        String strFieldError = DirectoryUtils.EMPTY_STRING;

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

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

            return AdminMessageService.getMessageUrl( request, MESSAGE_MANDATORY_FIELD, tabRequiredFields, AdminMessage.TYPE_STOP );
        }
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeCheckBox.java 109
fr/paris/lutece/plugins/directory/business/EntryTypeDownloadUrl.java 152
fr/paris/lutece/plugins/directory/business/EntryTypeGeolocation.java 200
fr/paris/lutece/plugins/directory/business/EntryTypeMyLuteceUser.java 155
fr/paris/lutece/plugins/directory/business/EntryTypeRadioButton.java 108
fr/paris/lutece/plugins/directory/business/EntryTypeRemoteMyLuteceUser.java 145
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getEntryData( HttpServletRequest request, Locale locale )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
        String strHelpMessageSearch = ( request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE_SEARCH )
                .trim( ) : null;
        String strComment = request.getParameter( PARAMETER_COMMENT );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strIndexed = request.getParameter( PARAMETER_INDEXED );
        String strIndexedAsTitle = request.getParameter( PARAMETER_INDEXED_AS_TITLE );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/RecordDAO.java 150
fr/paris/lutece/plugins/directory/business/RecordDAO.java 347
        if ( daoUtil.next( ) )
        {
            record = new Record( );
            record.setIdRecord( daoUtil.getInt( 1 ) );
            record.setDateCreation( daoUtil.getTimestamp( 2 ) );
            directory = new Directory( );
            directory.setIdDirectory( daoUtil.getInt( 3 ) );
            record.setDirectory( directory );
            record.setEnabled( daoUtil.getBoolean( 4 ) );
            record.setRoleKey( daoUtil.getString( 5 ) );
            record.setWorkgroup( daoUtil.getString( 6 ) );
            record.setDateModification( daoUtil.getTimestamp( 7 ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/service/search/DirectorySearchIndexer.java 188
fr/paris/lutece/plugins/directory/service/search/DirectorySearchIndexer.java 249
        EntryFilter entryFilter = new EntryFilter( );
        entryFilter.setIdDirectory( nIdDirectory );
        entryFilter.setIsIndexed( EntryFilter.FILTER_TRUE );

        List<IEntry> listIndexedEntry = EntryHome.getEntryList( entryFilter, plugin );

        entryFilter = new EntryFilter( );
        entryFilter.setIdDirectory( nIdDirectory );
        entryFilter.setIsIndexedAsTitle( EntryFilter.FILTER_TRUE );

        List<IEntry> listIndexedAsTitleEntry = EntryHome.getEntryList( entryFilter, plugin );

        entryFilter = new EntryFilter( );
        entryFilter.setIdDirectory( nIdDirectory );
        entryFilter.setIsIndexedAsSummary( EntryFilter.FILTER_TRUE );

        List<IEntry> listIndexedAsSummaryEntry = EntryHome.getEntryList( entryFilter, plugin );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/FileDAO.java 128
fr/paris/lutece/plugins/directory/business/FileDAO.java 217
            file.setIdFile( daoUtil.getInt( 1 ) );
            file.setTitle( daoUtil.getString( 2 ) );

            if ( daoUtil.getObject( 3 ) != null )
            {
                physicalFile = new PhysicalFile( );
                physicalFile.setIdPhysicalFile( daoUtil.getInt( 3 ) );
                file.setPhysicalFile( physicalFile );
            }

            file.setSize( daoUtil.getInt( 4 ) );
            file.setMimeType( daoUtil.getString( 5 ) );
            file.setExtension( daoUtil.getString( 6 ) );
            file.setDateExpiration( daoUtil.getTimestamp( 7 ) );
Fichier Ligne
fr/paris/lutece/plugins/directory/business/EntryTypeFile.java 142
fr/paris/lutece/plugins/directory/business/EntryTypeInternalLink.java 177
fr/paris/lutece/plugins/directory/business/EntryTypeRichText.java 177
fr/paris/lutece/plugins/directory/business/EntryTypeTextArea.java 206
        this.setShownInAdvancedSearch( strShowInFormMainSearch != null );
        this.setShownInResultList( strShowInResultList != null );
        this.setShownInResultRecord( strShowInResultRecord != null );
        this.setShownInHistory( strShowInHistory != null );
        this.setShownInExport( strShowInExport != null );
        this.setShownInCompleteness( strShowInCompleteness != null );

        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateCreate( )
    {
        return _template_create;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getTemplateModify( )
    {
        return _template_modify;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void getRecordFieldData( Record record, List<String> lstValue, boolean bTestDirectoryError, boolean bAddNewValue, List<RecordField> listRecordField,
            Locale locale ) throws DirectoryErrorException
    {
Fichier Ligne
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 1874
fr/paris/lutece/plugins/directory/web/DirectoryJspBean.java 1944
        int nIdEntry = DirectoryUtils.convertStringToInt( strIdEntry );

        int nIdDirectory = _searchFields.getIdDirectory( );
        Directory directory = DirectoryHome.findByPrimaryKey( nIdDirectory, plugin );

        if ( ( nIdEntry == -1 )
                || ( directory == null )
                || !RBACService.isAuthorized( Directory.RESOURCE_TYPE, Integer.toString( nIdDirectory ), DirectoryResourceIdService.PERMISSION_MODIFY,
                        getUser( ) ) || !AdminWorkgroupService.isAuthorized( directory, getUser( ) ) )
        {
            throw new AccessDeniedException( MESSAGE_ACCESS_DENIED );
        }

        entry = EntryHome.findByPrimaryKey( nIdEntry, plugin );

        if ( request.getParameter( PARAMETER_CANCEL ) == null )