Fork me on GitHub

Résultats CPD

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

Duplicatas

Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AdminUserFieldDAO.java 139
fr/paris/lutece/portal/business/user/attribute/AdminUserFieldDAO.java 542
            userField = new AdminUserField(  );
            userField.setIdUserField( daoUtil.getInt( 1 ) );
            userField.setValue( daoUtil.getString( 6 ) );

            // USER
            AdminUser user = new AdminUser(  );
            user.setUserId( daoUtil.getInt( 2 ) );
            user.setAccessCode( daoUtil.getString( 7 ) );
            user.setLastName( daoUtil.getString( 8 ) );
            user.setFirstName( daoUtil.getString( 9 ) );
            user.setEmail( daoUtil.getString( 10 ) );
            user.setStatus( daoUtil.getInt( 11 ) );
            user.setLocale( new Locale( daoUtil.getString( 12 ) ) );
            user.setUserLevel( daoUtil.getInt( 13 ) );
            userField.setUser( user );

            // ATTRIBUTE
            IAttribute attribute = null;

            try
            {
                attribute = (IAttribute) Class.forName( daoUtil.getString( 14 ) ).newInstance(  );
            }
            catch ( ClassNotFoundException e )
            {
                // class doesn't exist
                AppLogService.error( e );
            }
            catch ( InstantiationException e )
            {
                // Class is abstract or is an interface or haven't accessible
                // builder
                AppLogService.error( e );
            }
            catch ( IllegalAccessException e )
            {
                // can't access to the class
                AppLogService.error( e );
            }

            attribute.setIdAttribute( daoUtil.getInt( 3 ) );
            attribute.setTitle( daoUtil.getString( 15 ) );
            attribute.setHelpMessage( daoUtil.getString( 16 ) );
            attribute.setMandatory( daoUtil.getBoolean( 17 ) );
            attribute.setPosition( daoUtil.getInt( 18 ) );
            attribute.setAttributeType( new Locale( daoUtil.getString( 12 ) ) );
            userField.setAttribute( attribute );

            // ATTRIBUTEFIELD
            AttributeField attributeField = new AttributeField(  );
            attributeField.setIdField( daoUtil.getInt( 4 ) );
            attributeField.setTitle( daoUtil.getString( 19 ) );
            attributeField.setValue( daoUtil.getString( 20 ) );
            attributeField.setDefaultValue( daoUtil.getBoolean( 21 ) );
            attributeField.setHeight( daoUtil.getInt( 22 ) );
            attributeField.setWidth( daoUtil.getInt( 23 ) );
            attributeField.setMaxSizeEnter( daoUtil.getInt( 24 ) );
            attributeField.setMultiple( daoUtil.getBoolean( 25 ) );
            attributeField.setPosition( daoUtil.getInt( 26 ) );
            userField.setAttributeField( attributeField );

            // FILE
            if ( daoUtil.getObject( 5 ) != null ) // f.id_file
            {
                File file = new File(  );
                file.setIdFile( daoUtil.getInt( 5 ) ); // f.id_file
                userField.setFile( file );
            }
Fichier Ligne
fr/paris/lutece/portal/web/admin/AdminPagePortletJspBean.java 243
fr/paris/lutece/portal/web/admin/AdminPagePortletJspBean.java 290
    public String getModifyPortletStatus( HttpServletRequest request ) throws AccessDeniedException
    {
        String strPortletId = request.getParameter( Parameters.PORTLET_ID );
        String strStatus = request.getParameter( PORTLET_STATUS );
        if ( !StringUtils.isNumeric( strPortletId ) || !StringUtils.isNumeric( strStatus ) )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_ERROR);
        }
        int nPortletId = Integer.parseInt( strPortletId );
        Portlet portlet = null;
        try
        {
            portlet = PortletHome.findByPrimaryKey( nPortletId );
        } catch (NullPointerException e)
        {
            AppLogService.error( "Error looking for portlet with id " + nPortletId, e );
        }
        if ( portlet == null || portlet.getId( ) != nPortletId )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MESSAGE_INVALID_ENTRY, new Object[] { nPortletId }, AdminMessage.TYPE_ERROR);
        }
        int nStatus = Integer.parseInt( strStatus );
        if ( nStatus != Portlet.STATUS_PUBLISHED && nStatus != Portlet.STATUS_UNPUBLISHED )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MESSAGE_INVALID_ENTRY, new Object[] { nStatus }, AdminMessage.TYPE_ERROR);
        }
        AdminUser user = AdminUserService.getAdminUser( request );
        if ( !RBACService.isAuthorized( PortletType.RESOURCE_TYPE, portlet.getPortletTypeId(  ),
                PortletResourceIdService.PERMISSION_MANAGE, user ) )
        {
            throw new AccessDeniedException( "User " + user + " is not authorized to permission " + PortletResourceIdService.PERMISSION_MANAGE
                    + " on portlet " + nPortletId );
        }
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeCheckBox.java 200
fr/paris/lutece/portal/business/user/attribute/AttributeComboBox.java 209
        attributeType.setLabelType( PROPERTY_TYPE_CHECKBOX );
        setAttributeType( attributeType );
    }

    /**
     * Get the data of the user fields
     * @param request HttpServletRequest
     * @param user user
     * @return user field data
     */
    @Override
    public List<AdminUserField> getUserFieldsData( HttpServletRequest request, AdminUser user )
    {
        String[] strValues = request.getParameterValues( PARAMETER_ATTRIBUTE + CONSTANT_UNDERSCORE +
                getIdAttribute(  ) );

        return getUserFieldsData( strValues, user );
    }

    /**
     * Get the data of the user fields
     * @param strValues Values
     * @param user user
     * @return user field data
     */
    @Override
    public List<AdminUserField> getUserFieldsData( String[] strValues, AdminUser user )
    {
        List<AdminUserField> listUserFields = new ArrayList<AdminUserField>(  );

        if ( strValues != null )
        {
            for ( String strValue : strValues )
            {
                AdminUserField userField = new AdminUserField(  );
                AttributeField attributeField;

                if ( StringUtils.isNotBlank( strValue ) && StringUtils.isNumeric( strValue ) )
                {
                    int nIdField = Integer.parseInt( strValue );
                    attributeField = AttributeFieldService.getInstance(  ).getAttributeField( nIdField );
                }
                else
                {
                    attributeField = new AttributeField(  );
                    attributeField.setAttribute( this );
                    attributeField.setTitle( strValue );
                    attributeField.setValue( strValue );
                }

                userField.setUser( user );
                userField.setAttribute( this );
                userField.setAttributeField( attributeField );
                userField.setValue( attributeField.getTitle(  ) );

                listUserFields.add( userField );
            }
        }

        return listUserFields;
    }

    /**
     * Get whether the attribute is anonymizable.
     * @return True if the attribute can be anonymized, false otherwise.
     */
    @Override
    public boolean isAnonymizable(  )
    {
        return false;
    }
}
Fichier Ligne
fr/paris/lutece/portal/business/dashboard/AdminDashboardDAO.java 289
fr/paris/lutece/portal/business/dashboard/DashboardDAO.java 289
    public void store( IAdminDashboardComponent dashboardComponent )
    {
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE );

        int nIndex = setInsertOrUpdateValues( 1, dashboardComponent, daoUtil );
        daoUtil.setString( nIndex, dashboardComponent.getName(  ) );

        daoUtil.executeUpdate(  );

        daoUtil.free(  );
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<Integer> selectColumns(  )
    {
        List<Integer> listColumns = new ArrayList<Integer>(  );

        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_COLUMNS );

        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            listColumns.add( daoUtil.getInt( 1 ) );
        }

        daoUtil.free(  );

        return listColumns;
    }

    /**
     * Loads component data from daoUtil
     * @param component the component
     * @param daoUtil the daoutil
     */
    private void load( IDashboardComponent component, DAOUtil daoUtil )
    {
        int nIndex = 1;
        component.setName( daoUtil.getString( nIndex++ ) );
        component.setOrder( daoUtil.getInt( nIndex++ ) );
        component.setZone( daoUtil.getInt( nIndex++ ) );
    }

    /**
     * Sets daoUtil values from component
     * @param nStartIndex the start index
     * @param component the component
     * @param daoUtil daoutil
     * @return the end index
     */
    private int setInsertOrUpdateValues( int nStartIndex, IDashboardComponent component, DAOUtil daoUtil )
    {
        int nIndex = nStartIndex;
        daoUtil.setInt( nIndex++, component.getOrder(  ) );
        daoUtil.setInt( nIndex++, component.getZone(  ) );

        return nIndex;
    }

    /**
     * Builds sql filter
     * @param sbSQL the buffer
     * @param filter the filter
     */
    private void buildSQLFilter( StringBuilder sbSQL, AdminDashboardFilter filter )
Fichier Ligne
fr/paris/lutece/portal/business/page/PageDAO.java 529
fr/paris/lutece/portal/business/page/PageDAO.java 610
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL );
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            Page page = new Page(  );

            page.setId( daoUtil.getInt( 1 ) );
            page.setParentPageId( daoUtil.getInt( 2 ) );
            page.setOrigParentPageId( daoUtil.getInt( 2 ) );
            page.setName( daoUtil.getString( 3 ) );
            page.setDescription( daoUtil.getString( 4 ) );
            page.setDateUpdate( daoUtil.getTimestamp( 5 ) );
            page.setOrder( daoUtil.getInt( 6 ) );
            page.setStatus( daoUtil.getInt( 7 ) );
            page.setRole( daoUtil.getString( 8 ) );
            page.setCodeTheme( daoUtil.getString( 9 ) );
            page.setImageContent( daoUtil.getBytes( 10 ) );
            page.setMimeType( daoUtil.getString( 11 ) );
            page.setMetaKeywords( daoUtil.getString( 12 ) );
            page.setMetaDescription( daoUtil.getString( 13 ) );

            if ( daoUtil.getObject( 14 ) != null )
            {
                page.setIdAuthorizationNode( daoUtil.getInt( 14 ) );
            }

            pageList.add( page );
        }

        daoUtil.free(  );

        return pageList;
    }

    /**
     * {@inheritDoc}
     */
    public void invalidatePage( int nPageId )
Fichier Ligne
fr/paris/lutece/portal/web/features/RightJspBean.java 164
fr/paris/lutece/portal/web/rbac/RoleManagementJspBean.java 837
        for ( AdminUser user : AdminUserHome.findByRight( strIdRight ) )
        {
            //Add users with higher level then connected user or add all users if connected user is administrator
            if ( ( user.getUserLevel(  ) > getUser(  ).getUserLevel(  ) ) || ( getUser(  ).isAdmin(  ) ) )
            {
                listAssignedUsers.add( user );
            }
        }

        List<AdminUser> listFilteredUsers = AdminUserService.getFilteredUsersInterface( listAssignedUsers, request,
                model, url );

        // AVAILABLE USERS
        ReferenceList listAvailableUsers = new ReferenceList(  );
        ReferenceItem itemUser = null;
        boolean bAssigned;

        for ( AdminUser user : AdminUserHome.findUserList(  ) )
        {
            itemUser = new ReferenceItem(  );
            itemUser.setCode( Integer.toString( user.getUserId(  ) ) );
            itemUser.setName( user.getAccessCode(  ) + "(" + user.getFirstName(  ) + " " + user.getLastName(  ) + ")" );
            bAssigned = Boolean.FALSE;

            for ( AdminUser assignedUser : listAssignedUsers )
            {
                if ( Integer.toString( assignedUser.getUserId(  ) ).equals( itemUser.getCode(  ) ) )
                {
                    bAssigned = Boolean.TRUE;

                    break;
                }
            }

            //Add users with higher level then connected user or add all users if connected user is administrator
            if ( !bAssigned &&
                    ( ( user.getUserLevel(  ) > getUser(  ).getUserLevel(  ) ) || ( getUser(  ).isAdmin(  ) ) ) &&
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeCheckBox.java 157
fr/paris/lutece/portal/business/user/attribute/AttributeRadioButton.java 157
    }

    /**
     * Set the data of the attribute
     * @param request HttpServletRequest
     * @return null if there are no errors
     */
    @Override
    public String setAttributeData( HttpServletRequest request )
    {
        String strTitle = request.getParameter( PARAMETER_TITLE );
        String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null )
            ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim(  ) : null;
        String strIsShownInSearch = request.getParameter( PARAMETER_IS_SHOWN_IN_SEARCH );
        String strIsShownInResultList = request.getParameter( PARAMETER_IS_SHOWN_IN_RESULT_LIST );
        String strMandatory = request.getParameter( PARAMETER_MANDATORY );
        String strFieldInLine = request.getParameter( PARAMETER_IS_FIELD_IN_LINE );

        if ( StringUtils.isNotBlank( strTitle ) )
        {
            setTitle( strTitle );
            setHelpMessage( strHelpMessage );
            setMandatory( strMandatory != null );
            setShownInSearch( strIsShownInSearch != null );
            setShownInResultList( strIsShownInResultList != null );
            setFieldInLine( strFieldInLine != null );

            return null;
        }

        return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
    }

    /**
     * Set attribute type
     * @param locale locale
     */
    @Override
    public void setAttributeType( Locale locale )
    {
        AttributeType attributeType = new AttributeType(  );
        attributeType.setLocale( locale );
        attributeType.setClassName( this.getClass(  ).getName(  ) );
        attributeType.setLabelType( PROPERTY_TYPE_CHECKBOX );
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 253
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 374
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_ALL );
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            int nIndex = 1;
            IAttribute attribute = null;

            try
            {
                attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance(  );
            }
            catch ( ClassNotFoundException e )
            {
                // class doesn't exist
                AppLogService.error( e );
            }
            catch ( InstantiationException e )
            {
                // Class is abstract or is an interface or haven't accessible
                // builder
                AppLogService.error( e );
            }
            catch ( IllegalAccessException e )
            {
                // can't access to the class
                AppLogService.error( e );
            }

            attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
            attribute.setTitle( daoUtil.getString( nIndex++ ) );
            attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
            attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
            attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
            attribute.setPosition( daoUtil.getInt( nIndex++ ) );
            attribute.setAnonymize( daoUtil.getBoolean( nIndex++ ) );
Fichier Ligne
fr/paris/lutece/portal/web/admin/AdminPagePortletJspBean.java 138
fr/paris/lutece/portal/web/admin/AdminPagePortletJspBean.java 197
    public String getRemovePortlet( HttpServletRequest request ) throws AccessDeniedException
    {
        String strPortletId = request.getParameter( Parameters.PORTLET_ID );
        if ( !StringUtils.isNumeric( strPortletId ) )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_ERROR);
        }
        int nPortletId = Integer.parseInt( strPortletId );
        Portlet portlet = null;
        try
        {
            portlet = PortletHome.findByPrimaryKey( nPortletId );
        } catch (NullPointerException e)
        {
            AppLogService.error( "Error looking for portlet with id " + nPortletId, e );
        }
        if ( portlet == null || portlet.getId( ) != nPortletId )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MESSAGE_INVALID_ENTRY, new Object[] { nPortletId }, AdminMessage.TYPE_ERROR);
        }
        AdminUser user = AdminUserService.getAdminUser( request );
        if ( !RBACService.isAuthorized( PortletType.RESOURCE_TYPE, portlet.getPortletTypeId(  ),
                PortletResourceIdService.PERMISSION_MANAGE, user ) )
        {
            throw new AccessDeniedException( "User " + user + " is not authorized to permission " + PortletResourceIdService.PERMISSION_MANAGE
                    + " on portlet " + nPortletId );
        }
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 145
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 324
            try
            {
                attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance(  );
            }
            catch ( ClassNotFoundException e )
            {
                // class doesn't exist
                AppLogService.error( e );
            }
            catch ( InstantiationException e )
            {
                // Class is abstract or is an interface or haven't accessible
                // builder
                AppLogService.error( e );
            }
            catch ( IllegalAccessException e )
            {
                // can't access to rhe class
                AppLogService.error( e );
            }

            attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
            attribute.setTitle( daoUtil.getString( nIndex++ ) );
            attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
            attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
            attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
            attribute.setPosition( daoUtil.getInt( nIndex++ ) );
            attribute.setAttributeType( locale );

            Plugin plugin = PluginService.getPlugin( daoUtil.getString( nIndex++ ) );
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 320
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 379
            nIndex = 1;

            IAttribute attribute = null;

            try
            {
                attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance(  );
            }
            catch ( ClassNotFoundException e )
            {
                // class doesn't exist
                AppLogService.error( e );
            }
            catch ( InstantiationException e )
            {
                // Class is abstract or is an interface or haven't accessible
                // builder
                AppLogService.error( e );
            }
            catch ( IllegalAccessException e )
            {
                // can't access to rhe class
                AppLogService.error( e );
            }

            attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
            attribute.setTitle( daoUtil.getString( nIndex++ ) );
            attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
            attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
            attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
            attribute.setPosition( daoUtil.getInt( nIndex++ ) );
            attribute.setAttributeType( locale );
Fichier Ligne
fr/paris/lutece/portal/service/plugin/Plugin.java 717
fr/paris/lutece/portal/service/plugin/PluginFile.java 164
    }

    /**
     * Returns the name of the plugin
     *
     * @return the plugin name as a String
     */
    public String getName(  )
    {
        return _strName;
    }

    /**
     * Sets the name of the plugin
     *
     * @param strName The plugin name
     */
    public void setName( String strName )
    {
        _strName = strName;
    }

    /**
     * Returns the version of the plugin
     *
     * @return the plugin version as a String
     */
    public String getVersion(  )
    {
        return _strVersion;
    }

    /**
     * Sets the version plugin name
     * @param strVersion The version
     */
    public void setVersion( String strVersion )
    {
        _strVersion = strVersion;
    }

    /**
     * Returns the description of the plugin
     *
     * @return the plugin description as a String
     */
    public String getDescription(  )
    {
        return _strDescription;
    }

    /**
     * Sets the description of the plugin
     *
     * @param strDescription The description
     */
    public void setDescription( String strDescription )
    {
        _strDescription = strDescription;
    }

    /**
     * Returns the Provider of the plugin
     *
     * @return the plugin Provider as a String
     */
    public String getProvider(  )
    {
        return _strProvider;
    }

    /**
     * Sets the provider name
     *
     * @param strProvider The provider name
     */
    public void setProvider( String strProvider )
    {
        _strProvider = strProvider;
    }

    /**
     * Returns the Provider's URL of the plugin
     *
     * @return the plugin Provider's URL as a String
     */
    public String getProviderUrl(  )
    {
        return _strProviderUrl;
    }

    /**
     * Sets the provider url
     *
     * @param strProviderUrl the name of the provider
     */
    public void setProviderUrl( String strProviderUrl )
    {
        _strProviderUrl = strProviderUrl;
    }

    /**
     * Returns the Icon's URL of the plugin
     *
     * @return the plugin Icon's URL as a String
     */
    public String getIconUrl(  )
    {
        return _strIconUrl;
    }

    /**
     * Sets the url of the plugin's icon
     *
     * @param strIconUrl The url of icon
     */
    public void setIconUrl( String strIconUrl )
    {
        _strIconUrl = strIconUrl;
    }

    /**
     * Returns the Documentation's URL of the plugin
     *
     * @return the plugin Documentation's URL as a String
     */
    public String getDocumentationUrl(  )
    {
        return _strDocumentationUrl;
    }

    /**
     * Sets the url of the plugin's Documentation
     *
     * @param strDocumentationUrl The documentation Url
     */
    public void setDocumentationUrl( String strDocumentationUrl )
    {
        _strDocumentationUrl = strDocumentationUrl;
    }

    /**
     * Returns the Copyright of the plugin
     *
     * @return the plugin Copyright as a String
     */
    public String getCopyright(  )
    {
        return _strCopyright;
    }

    /**
     * Sets the copyright
     *
     * @param strCopyright The copyright
     */
    public void setCopyright( String strCopyright )
    {
        _strCopyright = strCopyright;
    }

    /**
     * Returns the main Class of the plugin
     *
     * @return the Class as a String
     */
    public String getServiceClass(  )
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeCheckBox.java 200
fr/paris/lutece/portal/business/user/attribute/AttributeComboBox.java 209
fr/paris/lutece/portal/business/user/attribute/AttributeRadioButton.java 200
        attributeType.setLabelType( PROPERTY_TYPE_CHECKBOX );
        setAttributeType( attributeType );
    }

    /**
     * Get the data of the user fields
     * @param request HttpServletRequest
     * @param user user
     * @return user field data
     */
    @Override
    public List<AdminUserField> getUserFieldsData( HttpServletRequest request, AdminUser user )
    {
        String[] strValues = request.getParameterValues( PARAMETER_ATTRIBUTE + CONSTANT_UNDERSCORE +
                getIdAttribute(  ) );

        return getUserFieldsData( strValues, user );
    }

    /**
     * Get the data of the user fields
     * @param strValues Values
     * @param user user
     * @return user field data
     */
    @Override
    public List<AdminUserField> getUserFieldsData( String[] strValues, AdminUser user )
    {
        List<AdminUserField> listUserFields = new ArrayList<AdminUserField>(  );

        if ( strValues != null )
        {
            for ( String strValue : strValues )
            {
                AdminUserField userField = new AdminUserField(  );
                AttributeField attributeField;

                if ( StringUtils.isNotBlank( strValue ) && StringUtils.isNumeric( strValue ) )
                {
                    int nIdField = Integer.parseInt( strValue );
                    attributeField = AttributeFieldService.getInstance(  ).getAttributeField( nIdField );
                }
                else
                {
                    attributeField = new AttributeField(  );
                    attributeField.setAttribute( this );
                    attributeField.setTitle( strValue );
                    attributeField.setValue( strValue );
                }
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 258
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 320
            int nIndex = 1;
            IAttribute attribute = null;

            try
            {
                attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance(  );
            }
            catch ( ClassNotFoundException e )
            {
                // class doesn't exist
                AppLogService.error( e );
            }
            catch ( InstantiationException e )
            {
                // Class is abstract or is an interface or haven't accessible
                // builder
                AppLogService.error( e );
            }
            catch ( IllegalAccessException e )
            {
                // can't access to the class
                AppLogService.error( e );
            }

            attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
            attribute.setTitle( daoUtil.getString( nIndex++ ) );
            attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
            attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
            attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
            attribute.setPosition( daoUtil.getInt( nIndex++ ) );
            attribute.setAnonymize( daoUtil.getBoolean( nIndex++ ) );
Fichier Ligne
fr/paris/lutece/portal/util/mvc/admin/MVCAdminJspBean.java 137
fr/paris/lutece/portal/util/mvc/xpage/MVCApplication.java 380
    }

    ////////////////////////////////////////////////////////////////////////////
    // Page utils 

    /**
     * Add an error message
     * @param strMessage The message
     */
    protected void addError( String strMessage )
    {
        _listErrors.add( new MVCMessage( strMessage ) );
    }

    /**
     * Add an error message
     * @param strMessageKey The message
     * @param locale The locale
     */
    protected void addError( String strMessageKey, Locale locale )
    {
        _listErrors.add( new MVCMessage( I18nService.getLocalizedString( strMessageKey, locale ) ) );
    }

    /**
     * Add an info message
     * @param strMessage The message
     */
    protected void addInfo( String strMessage )
    {
        _listInfos.add( new MVCMessage( strMessage ) );
    }

    /**
     * Add an info message
     * @param strMessageKey The message key
     * @param locale The locale
     */
    protected void addInfo( String strMessageKey, Locale locale )
    {
        _listInfos.add( new MVCMessage( I18nService.getLocalizedString( strMessageKey, locale ) ) );
    }

    /**
    * Fill the model with commons objects used in templates
    * @param model The model
    */
    protected void fillCommons( Map<String, Object> model )
    {
        List<ErrorMessage> listErrors = new ArrayList<ErrorMessage>( _listErrors );
        List<ErrorMessage> listInfos = new ArrayList<ErrorMessage>( _listInfos );
        model.put( MARK_ERRORS, listErrors );
        model.put( MARK_INFOS, listInfos );
        _listErrors.clear(  );
        _listInfos.clear(  );
    }

    /**
     * Get a model Object filled with default values
     * @return The model
     */
    protected Map<String, Object> getModel(  )
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 145
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 382
            try
            {
                attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance(  );
            }
            catch ( ClassNotFoundException e )
            {
                // class doesn't exist
                AppLogService.error( e );
            }
            catch ( InstantiationException e )
            {
                // Class is abstract or is an interface or haven't accessible
                // builder
                AppLogService.error( e );
            }
            catch ( IllegalAccessException e )
            {
                // can't access to rhe class
                AppLogService.error( e );
            }

            attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
            attribute.setTitle( daoUtil.getString( nIndex++ ) );
            attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
            attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
            attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
            attribute.setPosition( daoUtil.getInt( nIndex++ ) );
            attribute.setAttributeType( locale );
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 145
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java 261
            try
            {
                attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance(  );
            }
            catch ( ClassNotFoundException e )
            {
                // class doesn't exist
                AppLogService.error( e );
            }
            catch ( InstantiationException e )
            {
                // Class is abstract or is an interface or haven't accessible
                // builder
                AppLogService.error( e );
            }
            catch ( IllegalAccessException e )
            {
                // can't access to rhe class
                AppLogService.error( e );
            }

            attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
            attribute.setTitle( daoUtil.getString( nIndex++ ) );
            attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
            attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
            attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
            attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
            attribute.setPosition( daoUtil.getInt( nIndex++ ) );
            attribute.setAttributeType( locale );
Fichier Ligne
fr/paris/lutece/portal/business/page/PageDAO.java 194
fr/paris/lutece/portal/business/page/PageDAO.java 246
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT );
        daoUtil.setInt( 1, nPageId );

        daoUtil.executeQuery(  );

        Page page = new Page(  );

        if ( daoUtil.next(  ) )
        {
            page.setId( nPageId );
            page.setParentPageId( daoUtil.getInt( 1 ) );
            page.setOrigParentPageId( daoUtil.getInt( 1 ) );
            page.setName( daoUtil.getString( 2 ) );
            page.setDescription( daoUtil.getString( 3 ) );
            page.setPageTemplateId( daoUtil.getInt( 4 ) );
            page.setTemplate( daoUtil.getString( 5 ) );
            page.setOrder( daoUtil.getInt( 6 ) );
            page.setStatus( daoUtil.getInt( 7 ) );
            page.setRole( daoUtil.getString( 8 ) );
            page.setCodeTheme( daoUtil.getString( 9 ) );
            page.setNodeStatus( daoUtil.getInt( 10 ) );
            page.setImageContent( daoUtil.getBytes( 11 ) );
Fichier Ligne
fr/paris/lutece/portal/business/right/RightDAO.java 187
fr/paris/lutece/portal/business/right/RightDAO.java 236
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            Right right = new Right(  );

            right.setId( daoUtil.getString( 1 ) );
            right.setNameKey( daoUtil.getString( 2 ) );
            right.setLevel( daoUtil.getInt( 3 ) );
            right.setUrl( daoUtil.getString( 4 ) );
            right.setDescriptionKey( daoUtil.getString( 5 ) );
            right.setPluginName( daoUtil.getString( 6 ) );
            right.setFeatureGroup( daoUtil.getString( 7 ) );
            right.setIconUrl( daoUtil.getString( 8 ) );
            right.setDocumentationUrl( daoUtil.getString( 9 ) );
            right.setOrder( daoUtil.getInt( 10 ) );

            rightList.add( right );
        }

        daoUtil.free(  );

        return rightList;
    }
Fichier Ligne
fr/paris/lutece/portal/business/user/AdminUserDAO.java 865
fr/paris/lutece/portal/business/user/AdminUserDAO.java 896
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            AdminUser user = new AdminUser(  );
            user.setUserId( daoUtil.getInt( 1 ) );
            user.setAccessCode( daoUtil.getString( 2 ) );
            user.setLastName( daoUtil.getString( 3 ) );
            user.setFirstName( daoUtil.getString( 4 ) );
            user.setEmail( daoUtil.getString( 5 ) );
            user.setStatus( daoUtil.getInt( 6 ) );
            user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
            user.setUserLevel( daoUtil.getInt( 8 ) );
            user.setAccessibilityMode( daoUtil.getBoolean( 9 ) );
            userList.add( user );
        }

        daoUtil.free(  );

        return userList;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Collection<AdminUser> selectUsersByRight( String strIdRight )
Fichier Ligne
fr/paris/lutece/portal/web/features/RightJspBean.java 203
fr/paris/lutece/portal/web/workgroup/AdminWorkgroupJspBean.java 449
                listAvailableUsers.add( itemUser );
            }
        }

        // SORT
        String strSortedAttributeName = request.getParameter( Parameters.SORTED_ATTRIBUTE_NAME );
        String strAscSort = null;

        if ( strSortedAttributeName != null )
        {
            strAscSort = request.getParameter( Parameters.SORTED_ASC );

            boolean bIsAscSort = Boolean.parseBoolean( strAscSort );

            Collections.sort( listFilteredUsers, new AttributeComparator( strSortedAttributeName, bIsAscSort ) );
        }

        _strCurrentPageIndex = Paginator.getPageIndex( request, Paginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex );
        _nDefaultItemsPerPage = AppPropertiesService.getPropertyInt( PROPERTY_USERS_PER_PAGE, 50 );
        _nItemsPerPage = Paginator.getItemsPerPage( request, Paginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage,
                _nDefaultItemsPerPage );

        if ( strSortedAttributeName != null )
        {
            url.addParameter( Parameters.SORTED_ATTRIBUTE_NAME, strSortedAttributeName );
        }

        if ( strAscSort != null )
        {
            url.addParameter( Parameters.SORTED_ASC, strAscSort );
        }

        // ITEM NAVITATOR
        setItemNavigator( strIdRight, url.getUrl(  ) );
Fichier Ligne
fr/paris/lutece/portal/web/user/AdminLoginJspBean.java 215
fr/paris/lutece/portal/web/user/AdminLoginJspBean.java 255
    public String getForgotPassword( HttpServletRequest request )
    {
        Map<String, Object> model = new HashMap<String, Object>(  );

        // Invalidate a previous session
        HttpSession session = request.getSession(  );

        if ( session != null )
        {
            session.removeAttribute( SESSION_ATTRIBUTE_USER );
        }

        Locale locale = AdminUserService.getLocale( request );

        Enumeration<String> enumParams = request.getParameterNames(  );
        ReferenceList listParams = new ReferenceList(  );
        String strParamName;

        while ( enumParams.hasMoreElements(  ) )
        {
            strParamName = enumParams.nextElement(  );

            String strParamValue = request.getParameter( strParamName );
            listParams.addItem( strParamName, strParamValue );
        }

        model.put( MARK_PARAM_VERSION, AppInfo.getVersion(  ) );
        model.put( MARK_PARAMS_LIST, listParams );

        HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_ADMIN_FORGOT_PASSWORD, locale, model );
Fichier Ligne
fr/paris/lutece/portal/business/dashboard/AdminDashboardDAO.java 188
fr/paris/lutece/portal/business/dashboard/DashboardDAO.java 188
                AppLogService.error( "Admindashboard named " + strBeanName + " not found" );
            }
        }

        daoUtil.free(  );

        return listDashboards;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int selectMaxOrder(  )
    {
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_MAX_ORDER );

        int nMaxOrder = 0;

        daoUtil.executeQuery(  );

        if ( daoUtil.next(  ) )
        {
            nMaxOrder = daoUtil.getInt( 1 );
        }

        daoUtil.free(  );

        return nMaxOrder;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int selectMaxOrder( int nColumn )
    {
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_MAX_ORDER_COLUMN );

        int nMaxOrder = 0;

        daoUtil.setInt( 1, nColumn );

        daoUtil.executeQuery(  );

        if ( daoUtil.next(  ) )
        {
            nMaxOrder = daoUtil.getInt( 1 );
        }

        daoUtil.free(  );

        return nMaxOrder;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<IAdminDashboardComponent> selectDashboardComponents( AdminDashboardFilter filter )
Fichier Ligne
fr/paris/lutece/portal/business/xsl/XslExportDAO.java 201
fr/paris/lutece/portal/business/xsl/XslExportDAO.java 245
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT );

        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            xslExport = new XslExport(  );
            xslExport.setIdXslExport( daoUtil.getInt( 1 ) );
            xslExport.setTitle( daoUtil.getString( 2 ) );
            xslExport.setDescription( daoUtil.getString( 3 ) );
            xslExport.setExtension( daoUtil.getString( 4 ) );

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

            xslExport.setPlugin( daoUtil.getString( 6 ) );

            listXslExport.add( xslExport );
        }

        daoUtil.free(  );

        return listXslExport;
    }
Fichier Ligne
fr/paris/lutece/portal/business/user/AdminUserDAO.java 232
fr/paris/lutece/portal/business/user/AdminUserDAO.java 895
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL );
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            AdminUser user = new AdminUser(  );
            user.setUserId( daoUtil.getInt( 1 ) );
            user.setAccessCode( daoUtil.getString( 2 ) );
            user.setLastName( daoUtil.getString( 3 ) );
            user.setFirstName( daoUtil.getString( 4 ) );
            user.setEmail( daoUtil.getString( 5 ) );
            user.setStatus( daoUtil.getInt( 6 ) );
            user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
            user.setUserLevel( daoUtil.getInt( 8 ) );
            user.setAccessibilityMode( daoUtil.getBoolean( 9 ) );
Fichier Ligne
fr/paris/lutece/portal/business/user/AdminUserDAO.java 233
fr/paris/lutece/portal/business/user/AdminUserDAO.java 865
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            AdminUser user = new AdminUser(  );
            user.setUserId( daoUtil.getInt( 1 ) );
            user.setAccessCode( daoUtil.getString( 2 ) );
            user.setLastName( daoUtil.getString( 3 ) );
            user.setFirstName( daoUtil.getString( 4 ) );
            user.setEmail( daoUtil.getString( 5 ) );
            user.setStatus( daoUtil.getInt( 6 ) );
            user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
            user.setUserLevel( daoUtil.getInt( 8 ) );
            user.setAccessibilityMode( daoUtil.getBoolean( 9 ) );
Fichier Ligne
fr/paris/lutece/portal/web/features/RightJspBean.java 255
fr/paris/lutece/portal/web/rbac/RoleManagementJspBean.java 927
        model.put( MARK_RIGHT, right );
        model.put( MARK_USER_LEVELS_LIST, filteredLevels );
        model.put( MARK_AVAILABLE_USERS_LIST, listAvailableUsers );
        model.put( MARK_ASSIGNED_USERS_LIST, paginator.getPageItems(  ) );
        model.put( MARK_ASSIGNED_USERS_NUMBER, listAssignedUsers.size(  ) );
        model.put( MARK_ITEM_NAVIGATOR, _itemNavigator );
        model.put( MARK_PAGINATOR, paginator );
        model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );

        HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_ASSIGN_USERS, getLocale(  ), model );

        return getAdminPage( template.getHtml(  ) );
    }

    /**
     * Process the data capture form for assign users to a role
     *
     * @param request The HTTP Request
     * @return The Jsp URL of the process result
     */
    public String doAssignUsers( HttpServletRequest request )
    {
        String strReturn;

        String strActionCancel = request.getParameter( PARAMETER_CANCEL );

        if ( strActionCancel != null )
        {
            strReturn = JSP_URL_RIGHTS_MANAGEMENT;
Fichier Ligne
fr/paris/lutece/portal/web/user/AdminUserJspBean.java 641
fr/paris/lutece/portal/web/user/AdminUserJspBean.java 876
        if ( StringUtils.isEmpty( strAccessCode ) )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
        }

        if ( StringUtils.isEmpty( strLastName ) )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
        }

        if ( StringUtils.isEmpty( strFirstName ) )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
        }

        if ( StringUtils.isBlank( strEmail ) )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
        }

        if ( !AdminUserService.checkEmail( strEmail ) )
        {
            return AdminUserService.getEmailErrorMessageUrl( request );
        }
Fichier Ligne
fr/paris/lutece/portal/web/user/AdminLoginJspBean.java 451
fr/paris/lutece/portal/web/user/AdminUserJspBean.java 2454
        String strSenderEmail = MailService.getNoReplyEmail(  );
        String strEmailSubject = I18nService.getLocalizedString( MESSAGE_EMAIL_SUBJECT, locale );
        HashMap<String, Object> model = new HashMap<String, Object>(  );
        model.put( MARK_NEW_PASSWORD, strPassword );
        model.put( MARK_LOGIN_URL,
            AppPathService.getBaseUrl( request ) + AdminAuthenticationService.getInstance(  ).getLoginPageUrl(  ) );
        model.put( MARK_SITE_LINK, MailService.getSiteLink( AppPathService.getBaseUrl( request ), false ) );

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

        MailService.sendMailHtml( user.getEmail(  ), strSenderEmail, strSenderEmail, strEmailSubject,
            template.getHtml(  ) );
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/SimpleAdminUserFieldListener.java 90
fr/paris/lutece/portal/business/user/attribute/SimpleAdminUserFieldListener.java 122
    public void doCreateUserFields( AdminUser user, HttpServletRequest request, Locale locale )
    {
        List<IAttribute> listAttributes = AttributeService.getInstance(  )
                                                          .getPluginAttributesWithoutFields( getPlugin(  ).getName(  ),
                locale );
        List<AdminUserField> listUserFields = new ArrayList<AdminUserField>(  );

        for ( IAttribute attribute : listAttributes )
        {
            List<AdminUserField> userFields = attribute.getUserFieldsData( request, user );

            for ( AdminUserField userField : userFields )
            {
                if ( ( userField != null ) && StringUtils.isNotBlank( userField.getValue(  ) ) )
                {
                    // Change the value of the user field
                    // Instead of having the ID of the attribute field, we put the attribute field title
                    // which represents the profile's ID
                    userField.setValue( userField.getAttributeField(  ).getTitle(  ) );
                    AdminUserFieldHome.create( userField );
                    listUserFields.add( userField );
                }
            }
        }
Fichier Ligne
fr/paris/lutece/portal/web/xsl/XslExportJspBean.java 203
fr/paris/lutece/portal/web/xsl/XslExportJspBean.java 292
        HashMap<String, Object> model = new HashMap<String, Object>(  );

        Collection<Plugin> listPlugins = PluginService.getPluginList(  );
        ReferenceList refListPlugins = new ReferenceList(  );
        ReferenceItem refItem = new ReferenceItem(  );
        Plugin pluginCore = PluginService.getCore(  );
        refItem.setCode( pluginCore.getName(  ) );
        refItem.setName( pluginCore.getName(  ) );
        refListPlugins.add( refItem );

        for ( Plugin plugin : listPlugins )
        {
            if ( plugin != null )
            {
                refItem = new ReferenceItem(  );
                refItem.setCode( plugin.getName(  ) );
                refItem.setName( plugin.getName(  ) );
                refListPlugins.add( refItem );
            }
        }

        model.put( MARK_LIST_PLUGINS, refListPlugins );
Fichier Ligne
fr/paris/lutece/portal/business/right/RightDAO.java 106
fr/paris/lutece/portal/business/right/RightDAO.java 191
fr/paris/lutece/portal/business/right/RightDAO.java 240
            right = new Right(  );
            right.setId( daoUtil.getString( 1 ) );
            right.setNameKey( daoUtil.getString( 2 ) );
            right.setLevel( daoUtil.getInt( 3 ) );
            right.setUrl( daoUtil.getString( 4 ) );
            right.setDescriptionKey( daoUtil.getString( 5 ) );
            right.setPluginName( daoUtil.getString( 6 ) );
            right.setFeatureGroup( daoUtil.getString( 7 ) );
            right.setIconUrl( daoUtil.getString( 8 ) );
            right.setDocumentationUrl( daoUtil.getString( 9 ) );
            right.setOrder( daoUtil.getInt( 10 ) );
Fichier Ligne
fr/paris/lutece/portal/business/style/ModeDAO.java 131
fr/paris/lutece/portal/business/style/ModeDAO.java 196
            mode = new Mode(  );
            mode.setId( daoUtil.getInt( 1 ) );
            mode.setDescription( daoUtil.getString( 2 ) );
            mode.setPath( daoUtil.getString( 3 ) );
            mode.setOutputXslPropertyMethod( daoUtil.getString( 4 ) );
            mode.setOutputXslPropertyVersion( daoUtil.getString( 5 ) );
            mode.setOutputXslPropertyMediaType( daoUtil.getString( 6 ) );
            mode.setOutputXslPropertyEncoding( daoUtil.getString( 7 ) );
            mode.setOutputXslPropertyIndent( daoUtil.getString( 8 ) );
            mode.setOutputXslPropertyOmitXmlDeclaration( daoUtil.getString( 9 ) );
            mode.setOutputXslPropertyStandalone( daoUtil.getString( 10 ) );
Fichier Ligne
fr/paris/lutece/portal/business/dashboard/AdminDashboardDAO.java 357
fr/paris/lutece/portal/business/dashboard/DashboardDAO.java 357
    private void buildSQLFilter( StringBuilder sbSQL, AdminDashboardFilter filter )
    {
        List<String> listFilters = new ArrayList<String>(  );

        if ( filter.containsFilterOrder(  ) )
        {
            listFilters.add( SQL_QUERY_FILTER_ORDER );
        }

        if ( filter.containsFilterColumn(  ) )
        {
            listFilters.add( SQL_QUERY_FILTER_COLUMN );
        }

        if ( !listFilters.isEmpty(  ) )
        {
            sbSQL.append( SQL_QUERY_KEYWORD_WHERE );

            boolean bFirstFilter = true;

            for ( String strFilter : listFilters )
            {
                sbSQL.append( strFilter );

                if ( !bFirstFilter )
                {
                    sbSQL.append( SQL_QUERY_KEYWORD_AND );
                }
                else
                {
                    bFirstFilter = false;
                }
            }
        }
    }

    /**
     * Add daoUtil parameters
     * @param daoUtil daoUtil
     * @param nStartIndex start index
     * @param filter the filter to apply
     * @return end index
     */
    private int applySQLFilter( DAOUtil daoUtil, int nStartIndex, AdminDashboardFilter filter )
Fichier Ligne
fr/paris/lutece/portal/business/user/AdminUserDAO.java 651
fr/paris/lutece/portal/business/user/AdminUserDAO.java 682
        daoUtil.setString( 1, strRoleKey );
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            AdminUser user = new AdminUser(  );
            user.setUserId( daoUtil.getInt( 1 ) );
            user.setAccessCode( daoUtil.getString( 2 ) );
            user.setLastName( daoUtil.getString( 3 ) );
            user.setFirstName( daoUtil.getString( 4 ) );
            user.setEmail( daoUtil.getString( 5 ) );
            user.setStatus( daoUtil.getInt( 6 ) );
            user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
            user.setAccessibilityMode( daoUtil.getBoolean( 8 ) );
Fichier Ligne
fr/paris/lutece/portal/web/dashboard/AdminDashboardJspBean.java 209
fr/paris/lutece/portal/web/dashboard/DashboardJspBean.java 183
            dashboard = AdminDashboardFactory.getDashboardComponent( strDashboardName );

            if ( dashboard == null )
            {
                return AdminMessageService.getMessageUrl( request, MESSAGE_DASHBOARD_NOT_FOUND, AdminMessage.TYPE_STOP );
            }
        }
        else
        {
            nOldOrder = dashboard.getOrder(  );
            nOldColumn = dashboard.getZone(  );
        }

        // set order and column
        String strOrder = request.getParameter( PARAMETER_DASHBOARD_ORDER );
        String strColumn = request.getParameter( PARAMETER_DASHBOARD_COLUMN );

        int nOrder = StringUtil.getIntValue( strOrder, -1 );
        int nColumn = StringUtil.getIntValue( strColumn, -1 );

        dashboard.setOrder( nOrder );
        dashboard.setZone( nColumn );

        _service.doMoveDashboard( dashboard, nOldColumn, nOldOrder, bCreate );

        return JSP_MANAGE_DASHBOARDS;
    }
Fichier Ligne
fr/paris/lutece/portal/web/dashboard/AdminDashboardJspBean.java 139
fr/paris/lutece/portal/web/dashboard/DashboardJspBean.java 113
        model.put( MARK_LIST_AVAILABLE_COLUMNS, getListAvailableColumns(  ) );
        model.put( MARK_MAP_COLUMN_ORDER_STATUS, _service.getOrderedColumnsStatus(  ) );

        HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_DASHBOARDS, user.getLocale(  ), model );

        return getAdminPage( template.getHtml(  ) );
    }

    /**
     * Reorders columns
     * @param request the request
     * @return url
     */
    public String doReorderColumn( HttpServletRequest request )
    {
        String strColumnName = request.getParameter( PARAMETER_COLUMN );

        if ( StringUtils.isBlank( strColumnName ) )
        {
            return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
        }

        int nColumn = 0;

        try
        {
            nColumn = Integer.parseInt( strColumnName );
        }
        catch ( NumberFormatException nfe )
        {
            AppLogService.error( "AdminDashboardJspBean.doReorderColumn : " + nfe.getMessage(  ), nfe );
Fichier Ligne
fr/paris/lutece/portal/web/util/LocalizedDelegatePaginator.java 76
fr/paris/lutece/portal/web/util/LocalizedPaginator.java 89
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getLabelFirst(  )
    {
        return I18nService.getLocalizedString( KEY_FIRST, _locale );
    }

    /**
     * {@inheritDoc }
     */
    @Override
    public String getLabelPrevious(  )
    {
        return I18nService.getLocalizedString( KEY_PREVIOUS, _locale );
    }

    /**
     * {@inheritDoc }
     */
    @Override
    public String getLabelNext(  )
    {
        return I18nService.getLocalizedString( KEY_NEXT, _locale );
    }

    /**
     * {@inheritDoc }
     */
    @Override
    public String getLabelLast(  )
    {
        return I18nService.getLocalizedString( KEY_LAST, _locale );
    }

    /**
     * {@inheritDoc }
     */
    @Override
    public String getLabelItemCount(  )
    {
        return I18nService.getLocalizedString( KEY_ITEM_COUNT, _locale );
    }

    /**
     * {@inheritDoc }
     */
    @Override
    public String getLabelItemCountPerPage(  )
    {
        return I18nService.getLocalizedString( KEY_ITEM_COUNT_PER_PAGE, _locale );
    }
}
Fichier Ligne
fr/paris/lutece/portal/business/dashboard/AdminDashboardFilter.java 42
fr/paris/lutece/portal/business/dashboard/DashboardFilter.java 42
{
    private Integer _nFilterColumn;
    private Integer _nFilterOrder;

    /**
     * Filter column
     * @return Filter column
     */
    public Integer getFilterColumn(  )
    {
        return _nFilterColumn;
    }

    /**
     * Filter column
     * @param nFilterColumn the Filter column
     */
    public void setFilterColumn( Integer nFilterColumn )
    {
        _nFilterColumn = nFilterColumn;
    }

    /**
     * Filter order
     * @return Filter order
     */
    public Integer getFilterOrder(  )
    {
        return _nFilterOrder;
    }

    /**
     * Filter order
     * @param nFilterOrder the Filter order
     */
    public void setFilterOrder( Integer nFilterOrder )
    {
        _nFilterOrder = nFilterOrder;
    }

    /**
     * true if {@link #getFilterOrder()} != null
     * @return <code>true</code> if {@link #getFilterOrder()} != null, <code>false</code> otherwise.
     */
    public boolean containsFilterOrder(  )
    {
        return _nFilterOrder != null;
    }

    /**
     * true if {@link #getFilterColumn()} != null
     * @return <code>true</code> if {@link #getFilterColumn()} != null, <code>false</code> otherwise
     */
    public boolean containsFilterColumn(  )
    {
        return _nFilterColumn != null;
    }

    /**
     *
     * {@inheritDoc}
     */
    @Override
    public String toString(  )
    {
        return this.getClass(  ).getName(  ) + "[column=" + this.getFilterColumn(  ) + ", order=" +
        this.getFilterOrder(  ) + "]";
    }
}
Fichier Ligne
fr/paris/lutece/portal/web/user/attribute/AttributeFieldJspBean.java 274
fr/paris/lutece/portal/web/user/attribute/AttributeFieldJspBean.java 320
    public String doMoveUpAttributeField( HttpServletRequest request )
    {
        String strIdAttribute = request.getParameter( PARAMETER_ID_ATTRIBUTE );
        String strIdField = request.getParameter( PARAMETER_ID_FIELD );

        if ( StringUtils.isNotBlank( strIdField ) && StringUtils.isNumeric( strIdField ) &&
                StringUtils.isNotBlank( strIdAttribute ) && StringUtils.isNumeric( strIdAttribute ) )
        {
            int nIdAttribute = Integer.parseInt( strIdAttribute );
            int nIdField = Integer.parseInt( strIdField );

            IAttribute attribute = _attributeService.getAttributeWithFields( nIdAttribute, getLocale(  ) );
            List<AttributeField> listAttributeFields = attribute.getListAttributeFields(  );

            if ( listAttributeFields.size(  ) > 0 )
            {
                AttributeField previousField = null;
Fichier Ligne
fr/paris/lutece/portal/service/daemon/AccountLifeTimeDaemon.java 116
fr/paris/lutece/portal/service/daemon/AccountLifeTimeDaemon.java 183
fr/paris/lutece/portal/service/daemon/AccountLifeTimeDaemon.java 254
            for ( Integer nIdUser : accountsToSetAsExpired )
            {
                try
                {
                    AdminUser user = AdminUserHome.findByPrimaryKey( nIdUser );
                    String strUserMail = user.getEmail(  );

                    if ( ( strUserMail != null ) && StringUtils.isNotBlank( strUserMail ) )
                    {
                        Map<String, String> model = new HashMap<String, String>(  );
                        addParametersToModel( model, nIdUser );

                        HtmlTemplate template = AppTemplateService.getTemplateFromStringFtl( strBody,
                                user.getLocale(  ), model );
                        MailService.sendMailHtml( strUserMail, strSender, strSender, strSubject, template.getHtml(  ) );
                    }
                }
                catch ( Exception e )
                {
                    AppLogService.error( "AccountLifeTimeDaemon - Error sending expiration alert to admin user : " +
Fichier Ligne
fr/paris/lutece/portal/business/style/ThemeDAO.java 97
fr/paris/lutece/portal/business/style/ThemeDAO.java 157
            theme = new Theme(  );
            theme.setCodeTheme( daoUtil.getString( 1 ) );
            theme.setThemeDescription( daoUtil.getString( 2 ) );
            theme.setPathImages( daoUtil.getString( 3 ) );
            theme.setPathCss( daoUtil.getString( 4 ) );
            theme.setThemeAuthor( daoUtil.getString( 5 ) );
            theme.setThemeAuthorUrl( daoUtil.getString( 6 ) );
            theme.setThemeVersion( daoUtil.getString( 7 ) );
            theme.setThemeLicence( daoUtil.getString( 8 ) );
            theme.setPathJs( daoUtil.getString( 9 ) );
Fichier Ligne
fr/paris/lutece/portal/business/user/AdminUserDAO.java 232
fr/paris/lutece/portal/business/user/AdminUserDAO.java 651
fr/paris/lutece/portal/business/user/AdminUserDAO.java 682
fr/paris/lutece/portal/business/user/AdminUserDAO.java 895
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL );
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            AdminUser user = new AdminUser(  );
            user.setUserId( daoUtil.getInt( 1 ) );
            user.setAccessCode( daoUtil.getString( 2 ) );
            user.setLastName( daoUtil.getString( 3 ) );
            user.setFirstName( daoUtil.getString( 4 ) );
            user.setEmail( daoUtil.getString( 5 ) );
            user.setStatus( daoUtil.getInt( 6 ) );
            user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
            user.setUserLevel( daoUtil.getInt( 8 ) );
Fichier Ligne
fr/paris/lutece/portal/business/xsl/XslExportDAO.java 128
fr/paris/lutece/portal/business/xsl/XslExportDAO.java 205
fr/paris/lutece/portal/business/xsl/XslExportDAO.java 248
        if ( daoUtil.next(  ) )
        {
            xslExport = new XslExport(  );
            xslExport.setIdXslExport( daoUtil.getInt( 1 ) );
            xslExport.setTitle( daoUtil.getString( 2 ) );
            xslExport.setDescription( daoUtil.getString( 3 ) );
            xslExport.setExtension( daoUtil.getString( 4 ) );

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

            xslExport.setPlugin( daoUtil.getString( 6 ) );
Fichier Ligne
fr/paris/lutece/portal/business/user/AdminUserDAO.java 652
fr/paris/lutece/portal/business/user/AdminUserDAO.java 683
fr/paris/lutece/portal/business/user/AdminUserDAO.java 865
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            AdminUser user = new AdminUser(  );
            user.setUserId( daoUtil.getInt( 1 ) );
            user.setAccessCode( daoUtil.getString( 2 ) );
            user.setLastName( daoUtil.getString( 3 ) );
            user.setFirstName( daoUtil.getString( 4 ) );
            user.setEmail( daoUtil.getString( 5 ) );
            user.setStatus( daoUtil.getInt( 6 ) );
            user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
            user.setAccessibilityMode( daoUtil.getBoolean( 8 ) );
Fichier Ligne
fr/paris/lutece/portal/service/mail/MailUtil.java 329
fr/paris/lutece/portal/service/mail/MailUtil.java 404
        if ( fileAttachements != null )
        {
            for ( FileAttachment fileAttachement : fileAttachements )
            {
                String strFileName = fileAttachement.getFileName(  );
                byte[] bContentFile = fileAttachement.getData(  );
                String strContentType = fileAttachement.getType(  );
                ByteArrayDataSource dataSource = new ByteArrayDataSource( bContentFile, strContentType );
                msgBodyPart = new MimeBodyPart(  );
                msgBodyPart.setDataHandler( new DataHandler( dataSource ) );
                msgBodyPart.setFileName( strFileName );
                msgBodyPart.setDisposition( CONSTANT_DISPOSITION_ATTACHMENT );
                multipart.addBodyPart( msgBodyPart );
            }
        }

        msg.setContent( multipart );

        sendMessage( msg, transport );
    }

    /**
     * Send a Multipart text message with attached files. FIXME: use
     * prepareMessage method
     *
     * @param strRecipientsTo
     *            The list of the main recipients email.Every recipient must be
     *            separated by the mail separator defined in config.properties
     * @param strRecipientsCc
     *            The recipients list of the carbon copies .
     * @param strRecipientsBcc
     *            The recipients list of the blind carbon copies .
     * @param strSenderName
     *            The sender name.
     * @param strSenderEmail
     *            The sender email address.
     * @param strSubject
     *            The message subject.
     * @param strMessage
     *            The message.
     * @param fileAttachements
     *            The list of attached files
     * @param transport
     *            the smtp transport object
     * @param session
     *            the smtp session object
     * @throws AddressException
     *             If invalid address
     * @throws SendFailedException
     *             If an error occured during sending
     * @throws MessagingException
     *             If a messaging error occured
     */
    protected static void sendMultipartMessageText( String strRecipientsTo, String strRecipientsCc,
Fichier Ligne
fr/paris/lutece/portal/business/user/attribute/AttributeImage.java 286
fr/paris/lutece/portal/web/xsl/XslExportJspBean.java 587
                        getIdAttribute(  ) );

                if ( ( fileItem != null ) && ( fileItem.getName(  ) != null ) &&
                        !EMPTY_STRING.equals( fileItem.getName(  ) ) )
                {
                    File file = new File(  );
                    PhysicalFile physicalFile = new PhysicalFile(  );
                    physicalFile.setValue( fileItem.get(  ) );
                    file.setTitle( FileUploadService.getFileNameOnly( fileItem ) );
                    file.setSize( (int) fileItem.getSize(  ) );
                    file.setPhysicalFile( physicalFile );
                    file.setMimeType( FileSystemUtil.getMIMEType( FileUploadService.getFileNameOnly( fileItem ) ) );
Fichier Ligne
fr/paris/lutece/portal/business/user/AdminUserDAO.java 177
fr/paris/lutece/portal/business/user/AdminUserDAO.java 237
fr/paris/lutece/portal/business/user/AdminUserDAO.java 869
fr/paris/lutece/portal/business/user/AdminUserDAO.java 900
            user = new AdminUser(  );
            user.setUserId( daoUtil.getInt( 1 ) );
            user.setAccessCode( daoUtil.getString( 2 ) );
            user.setLastName( daoUtil.getString( 3 ) );
            user.setFirstName( daoUtil.getString( 4 ) );
            user.setEmail( daoUtil.getString( 5 ) );
            user.setStatus( daoUtil.getInt( 6 ) );
            user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
            user.setUserLevel( daoUtil.getInt( 8 ) );
            user.setPasswordReset( daoUtil.getBoolean( 9 ) );
Fichier Ligne
fr/paris/lutece/portal/business/xsl/XslExportDAO.java 93
fr/paris/lutece/portal/business/xsl/XslExportDAO.java 169
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT );
        daoUtil.setInt( 1, xslExport.getIdXslExport(  ) );
        daoUtil.setString( 2, xslExport.getTitle(  ) );
        daoUtil.setString( 3, xslExport.getDescription(  ) );
        daoUtil.setString( 4, xslExport.getExtension(  ) );

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

        daoUtil.setString( 6, xslExport.getPlugin(  ) );

        daoUtil.executeUpdate(  );