Class DatabaseUserParameterService

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int countUserPasswordHistoryFromDate​(java.sql.Timestamp minDate, int nUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      fr.paris.lutece.util.ReferenceList findAll​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find all parameters
      fr.paris.lutece.util.ReferenceItem findByKey​(java.lang.String strParameterKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the parameter from a given key
      java.lang.String getEncryptionAlgorithm​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the encryption algorithm
      static DatabaseUserParameterService getService()
      Get the instance of the service
      boolean isAccountCreationValidationEmail​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if the account creation must be validated by email
      boolean isAutoLoginAfterValidationEmail​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if the user must be automatically logged after validation email
      boolean isJcaptchaEnable​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if the jcaptcha is enable or not
      boolean isPasswordEncrypted​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if the passwords must be encrypted or not
      java.util.List<java.lang.String> selectUserPasswordHistory​(int nUserID, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      void update​(fr.paris.lutece.util.ReferenceItem userParam, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update a parameter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • findByKey

        public fr.paris.lutece.util.ReferenceItem findByKey​(java.lang.String strParameterKey,
                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the parameter from a given key
        Specified by:
        findByKey in interface fr.paris.lutece.plugins.mylutece.service.IUserParameterService
        Parameters:
        strParameterKey - the key
        plugin - the plugin
        Returns:
        the parameter
      • update

        public void update​(fr.paris.lutece.util.ReferenceItem userParam,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update a parameter
        Specified by:
        update in interface fr.paris.lutece.plugins.mylutece.service.IUserParameterService
        Parameters:
        userParam - the parameter
        plugin - the plugin
      • findAll

        public fr.paris.lutece.util.ReferenceList findAll​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Find all parameters
        Specified by:
        findAll in interface fr.paris.lutece.plugins.mylutece.service.IUserParameterService
        Parameters:
        plugin - the plugin
        Returns:
        a ReferenceList
      • isPasswordEncrypted

        public boolean isPasswordEncrypted​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if the passwords must be encrypted or not
        Specified by:
        isPasswordEncrypted in interface fr.paris.lutece.plugins.mylutece.service.IUserParameterService
        Parameters:
        plugin - the plugin
        Returns:
        false. Passwords are in fact salted and hashed, but we don't want plugin-mylutece to try and hash the password itself
      • getEncryptionAlgorithm

        public java.lang.String getEncryptionAlgorithm​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the encryption algorithm
        Specified by:
        getEncryptionAlgorithm in interface fr.paris.lutece.plugins.mylutece.service.IUserParameterService
        Parameters:
        plugin - the plugin
        Returns:
        the encryption algorithm
      • isAccountCreationValidationEmail

        public boolean isAccountCreationValidationEmail​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if the account creation must be validated by email
        Specified by:
        isAccountCreationValidationEmail in interface IDatabaseUserParameterService
        Parameters:
        plugin - the plugin
        Returns:
        true if it must be validated by email, false otherwise
      • isAutoLoginAfterValidationEmail

        public boolean isAutoLoginAfterValidationEmail​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if the user must be automatically logged after validation email
        Specified by:
        isAutoLoginAfterValidationEmail in interface IDatabaseUserParameterService
        Parameters:
        plugin - the plugin
        Returns:
        true if the user must be automatically logged after validation email
      • isJcaptchaEnable

        public boolean isJcaptchaEnable​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if the jcaptcha is enable or not
        Specified by:
        isJcaptchaEnable in interface IDatabaseUserParameterService
        Parameters:
        plugin - the plugin
        Returns:
        true if it is enable, false otherwise
      • countUserPasswordHistoryFromDate

        public int countUserPasswordHistoryFromDate​(java.sql.Timestamp minDate,
                                                    int nUserId,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        countUserPasswordHistoryFromDate in interface fr.paris.lutece.plugins.mylutece.service.IUserParameterService
      • selectUserPasswordHistory

        public java.util.List<java.lang.String> selectUserPasswordHistory​(int nUserID,
                                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        selectUserPasswordHistory in interface fr.paris.lutece.plugins.mylutece.service.IUserParameterService