Constructor and Description |
---|
UserDaoJdbc() |
Modifier and Type | Method and Description |
---|---|
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.
|
List<UserConfig> |
findUsers(String query,
boolean includeFrameworkUsers,
int maxResults)
Find users by user login or user name, given a search query.
|
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.
|
Collection<UserConfig> |
getUsersByLogins(Set<String> logins)
Get users with the given logins.
|
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 |
updateLoginHistory(String userId,
boolean loginSuccess)
Updates persistence information about a user login history.
|
public UserConfig get(String userId, ITransaction transaction) throws DaoException, PortalException
IUserDao
get
in interface IUserDao
DaoException
PortalException
public String getUserIdByLogin(String login, ITransaction transaction) throws DaoException, PortalException
IUserDao
getUserIdByLogin
in interface IUserDao
DaoException
PortalException
public void add(UserConfig userConfig, ITransaction transaction) throws DaoException, PortalException
IUserDao
add
in interface IUserDao
DaoException
PortalException
public void update(UserConfig userConfig, ITransaction transaction) throws DaoException, PortalException
IUserDao
update
in interface IUserDao
DaoException
PortalException
public void setPassword(String userId, String password, ITransaction transaction) throws DaoException, PortalException
IUserDao
setPassword
in interface IUserDao
DaoException
PortalException
public void updateLoginHistory(String userId, boolean loginSuccess) throws PortalException
IUserDao
Note: This method uses its own transaction.
updateLoginHistory
in interface IUserDao
userId
- the user identifier.loginSuccess
- true
if the login attempt was successful, false
otherwise.PortalException
public void delete(String userId, ITransaction transaction) throws DaoException, PortalException
IUserDao
delete
in interface IUserDao
DaoException
PortalException
public Collection<String> getByChannelId(String channelId, ITransaction transaction) throws DaoException, PortalException
IUserDao
getByChannelId
in interface IUserDao
DaoException
PortalException
public void addAlternativeLogin(String userId, String newLogin, ITransaction transaction) throws PortalException
IUserDao
addAlternativeLogin
in interface IUserDao
userId
- the user id.newLogin
- the alternative login to be added.transaction
- the transaction for persistence access.PortalException
public Collection<String> getAlternativeLogins(String userId, ITransaction transaction) throws PortalException
IUserDao
getAlternativeLogins
in interface IUserDao
userId
- the user id.transaction
- the transaction for persistence access.PortalException
public void deleteAlternativeLogin(String loginToDelete, ITransaction transaction) throws PortalException
IUserDao
deleteAlternativeLogin
in interface IUserDao
loginToDelete
- the alternative login to be deleted.transaction
- the transaction for persistence access.PortalException
public Collection<String> getByOrigin(String origin, ITransaction transaction) throws DaoException, PortalException
IUserDao
getByOrigin
in interface IUserDao
origin
- the origin.transaction
- the transaction for persistence access.DaoException
PortalException
public Collection<String> getAllUserIds(ITransaction transaction) throws PortalException
IUserDao
getAllUserIds
in interface IUserDao
transaction
- the transaction for persistence access.PortalException
public List<UserConfig> findUsers(String query, boolean includeFrameworkUsers, int maxResults) throws PortalException
IUserDao
findUsers
in interface IUserDao
query
- query used to search usersincludeFrameworkUsers
- indicates if framework users must also be returnedmaxResults
- amount of users to returnPortalException
public Collection<UserConfig> getUsersByLogins(Set<String> logins) throws PortalException
IUserDao
getUsersByLogins
in interface IUserDao
logins
- logins for getting usersPortalException
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.