Interface IUserDao

  • All Known Implementing Classes:
    UserDaoJdbc

    public interface IUserDao
    Interface for user DAO operations.
    Since:
    4.0.0
    Version:
    $Revision: 23034 $ $Date: 2019-08-05 16:52:47 -0300 (Mon, 05 Aug 2019) $
    • Method Detail

      • updateLoginHistory

        void updateLoginHistory​(java.lang.String userId,
                                boolean loginSuccess)
                         throws PortalException
        Updates persistence information about a user login history. This method is to be called after a login attempt.

        Note: This method uses its own transaction.

        Parameters:
        userId - the user identifier.
        loginSuccess - true if the login attempt was successful, false otherwise.
        Throws:
        PortalException
        Since:
        12.0.0
      • addAlternativeLogin

        void addAlternativeLogin​(java.lang.String userId,
                                 java.lang.String newLogin,
                                 ITransaction transaction)
                          throws PortalException
        Adds an alternative login to a user.
        Parameters:
        userId - the user id.
        newLogin - the alternative login to be added.
        transaction - the transaction for persistence access.
        Throws:
        PortalException
        Since:
        4.0.8
      • getAlternativeLogins

        java.util.Collection<java.lang.String> getAlternativeLogins​(java.lang.String userId,
                                                                    ITransaction transaction)
                                                             throws PortalException
        Returns the alternative logins of an user.
        Parameters:
        userId - the user id.
        transaction - the transaction for persistence access.
        Returns:
        a collection with the alternative logins of the user.
        Throws:
        PortalException
        Since:
        4.0.8
      • deleteAlternativeLogin

        void deleteAlternativeLogin​(java.lang.String loginToDelete,
                                    ITransaction transaction)
                             throws PortalException
        Deletes an alternative login.
        Parameters:
        loginToDelete - the alternative login to be deleted.
        transaction - the transaction for persistence access.
        Throws:
        PortalException
        Since:
        4.0.8
      • getByOrigin

        java.util.Collection<java.lang.String> getByOrigin​(java.lang.String origin,
                                                           ITransaction transaction)
                                                    throws DaoException,
                                                           PortalException
        Return the user ids, searching by the user's origin.
        Parameters:
        origin - the origin.
        transaction - the transaction for persistence access.
        Returns:
        the user ids, or an empty collection if none was found.
        Throws:
        DaoException
        PortalException
        Since:
        4.0.8
      • getAllUserIds

        java.util.Collection<java.lang.String> getAllUserIds​(ITransaction transaction)
                                                      throws PortalException
        Returns all user ids.
        Parameters:
        transaction - the transaction for persistence access.
        Returns:
        the user ids, or an empty collection if none was found.
        Throws:
        PortalException
        Since:
        4.0.11
      • findUsers

        java.util.List<UserConfig> findUsers​(java.lang.String query,
                                             boolean includeFrameworkUsers,
                                             int maxResults)
                                      throws PortalException
        Find users by user login or user name, given a search query.
        Parameters:
        query - query used to search users
        includeFrameworkUsers - indicates if framework users must also be returned
        maxResults - amount of users to return
        Returns:
        List of users which matches the search query with the given parameters, ordered by user name.
        Throws:
        PortalException
        Since:
        10.1.0
      • getUsersByLogins

        java.util.Collection<UserConfig> getUsersByLogins​(java.util.Set<java.lang.String> logins)
                                                   throws PortalException
        Get users with the given logins.
        Parameters:
        logins - logins for getting users
        Returns:
        List of users with the given logins, ordered by user name.
        Throws:
        PortalException
        Since:
        10.1.0