lumis.portal.user
Class UserDaoJdbc

Package class diagram package UserDaoJdbc
java.lang.Object
  extended by lumis.portal.user.UserDaoJdbc
All Implemented Interfaces:
IUserDao

public class UserDaoJdbc
extends Object
implements IUserDao

Implementation of IUserDao based on JDBC.

Since:
4.0.0

Constructor Summary
UserDaoJdbc()
           
 
Method Summary
 void add(UserConfig userConfig, ITransaction transaction)
          Add the user.
 void addAlternativeLogin(String userId, String newLogin, ITransaction transaction)
          Adds an alternative login to a user.
 void delete(String userId, ITransaction transaction)
          Delete the user.
 void deleteAlternativeLogin(String loginToDelete, ITransaction transaction)
          Deletes an alternative login.
 UserConfig get(String userId, ITransaction transaction)
          get the user.
 Collection<String> getAllUserIds(ITransaction transaction)
          Returns all user ids.
 Collection<String> getAlternativeLogins(String userId, ITransaction transaction)
          Returns the alternative logins of an user.
 Collection<String> getByChannelId(String channelId, ITransaction transaction)
          Return the local users IDs of the specified channel
 Collection<String> getByOrigin(String origin, ITransaction transaction)
          Return the user ids, searching by the user's origin.
 String getUserIdByLogin(String login, ITransaction transaction)
          Get the id of the user.
 void setPassword(String userId, String password, ITransaction transaction)
          Sets a new password for the user
 void update(UserConfig userConfig, ITransaction transaction)
          Update the user.
 void updateLastLogin(String userId, Date lastLogin)
          Sets when the user last loged in
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDaoJdbc

public UserDaoJdbc()
Method Detail

get

public UserConfig get(String userId,
                      ITransaction transaction)
               throws DaoException,
                      PortalException
Description copied from interface: IUserDao
get the user.

Specified by:
get in interface IUserDao
Returns:
Throws:
DaoException
PortalException

getUserIdByLogin

public String getUserIdByLogin(String login,
                               ITransaction transaction)
                        throws DaoException,
                               PortalException
Description copied from interface: IUserDao
Get the id of the user.

Specified by:
getUserIdByLogin in interface IUserDao
Returns:
Throws:
DaoException
PortalException

add

public void add(UserConfig userConfig,
                ITransaction transaction)
         throws DaoException,
                PortalException
Description copied from interface: IUserDao
Add the user.

Specified by:
add in interface IUserDao
Throws:
DaoException
PortalException

update

public void update(UserConfig userConfig,
                   ITransaction transaction)
            throws DaoException,
                   PortalException
Description copied from interface: IUserDao
Update the user.

Specified by:
update in interface IUserDao
Throws:
DaoException
PortalException

setPassword

public void setPassword(String userId,
                        String password,
                        ITransaction transaction)
                 throws DaoException,
                        PortalException
Description copied from interface: IUserDao
Sets a new password for the user

Specified by:
setPassword in interface IUserDao
Throws:
DaoException
PortalException

updateLastLogin

public void updateLastLogin(String userId,
                            Date lastLogin)
                     throws DaoException,
                            PortalException
Description copied from interface: IUserDao
Sets when the user last loged in

Specified by:
updateLastLogin in interface IUserDao
Throws:
DaoException
PortalException

delete

public void delete(String userId,
                   ITransaction transaction)
            throws DaoException,
                   PortalException
Description copied from interface: IUserDao
Delete the user.

Specified by:
delete in interface IUserDao
Throws:
DaoException
PortalException

getByChannelId

public Collection<String> getByChannelId(String channelId,
                                         ITransaction transaction)
                                  throws DaoException,
                                         PortalException
Description copied from interface: IUserDao
Return the local users IDs of the specified channel

Specified by:
getByChannelId in interface IUserDao
Returns:
Throws:
DaoException
PortalException

addAlternativeLogin

public void addAlternativeLogin(String userId,
                                String newLogin,
                                ITransaction transaction)
                         throws PortalException
Description copied from interface: IUserDao
Adds an alternative login to a user.

Specified by:
addAlternativeLogin in interface IUserDao
Parameters:
userId - the user id.
newLogin - the alternative login to be added.
transaction - the transaction for persistence access.
Throws:
PortalException

getAlternativeLogins

public Collection<String> getAlternativeLogins(String userId,
                                               ITransaction transaction)
                                        throws PortalException
Description copied from interface: IUserDao
Returns the alternative logins of an user.

Specified by:
getAlternativeLogins in interface IUserDao
Parameters:
userId - the user id.
transaction - the transaction for persistence access.
Returns:
a collection with the alternative logins of the user.
Throws:
PortalException

deleteAlternativeLogin

public void deleteAlternativeLogin(String loginToDelete,
                                   ITransaction transaction)
                            throws PortalException
Description copied from interface: IUserDao
Deletes an alternative login.

Specified by:
deleteAlternativeLogin in interface IUserDao
Parameters:
loginToDelete - the alternative login to be deleted.
transaction - the transaction for persistence access.
Throws:
PortalException

getByOrigin

public Collection<String> getByOrigin(String origin,
                                      ITransaction transaction)
                               throws DaoException,
                                      PortalException
Description copied from interface: IUserDao
Return the user ids, searching by the user's origin.

Specified by:
getByOrigin in interface IUserDao
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

getAllUserIds

public Collection<String> getAllUserIds(ITransaction transaction)
                                 throws PortalException
Description copied from interface: IUserDao
Returns all user ids.

Specified by:
getAllUserIds in interface IUserDao
Parameters:
transaction - the transaction for persistence access.
Returns:
the user ids, or an empty collection if none was found.
Throws:
PortalException


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.