public class UserManager extends Object implements IUserManagerSPI
Constructor and Description |
---|
UserManager() |
Modifier and Type | Method and Description |
---|---|
String |
add(SessionConfig sessionConfig,
UserConfig userConfig,
ITransaction transaction)
Adds a user to the portal and returns the identifier of the user added.
|
void |
addAlternativeLogin(SessionConfig sessionConfig,
String userId,
String newLogin,
ITransaction transaction)
Adds an alternative login for an user.
|
void |
addOrUpdate(SessionConfig sessionConfig,
UserConfig userConfig,
ITransaction transaction) |
void |
delete(SessionConfig sessionConfig,
String userId,
ITransaction transaction)
Delete an user.
|
void |
deleteAlternativeLogin(SessionConfig sessionConfig,
String loginToDelete,
ITransaction transaction)
Deletes an alternative login.
|
void |
deleteConfig(DeserializationContext deserializationContext,
String configId) |
List<UserConfig> |
findUsers(String query,
boolean includeFrameworkUsers,
int maxResults)
Find users by user login or user name, given a search query.
|
UserConfig |
get(SessionConfig sessionConfig,
String userId,
ITransaction transaction)
Get user configuration from userId.
|
Collection<String> |
getAlternativeLogins(SessionConfig sessionConfig,
String userId,
ITransaction transaction)
Returns the alternative logins for an user.
|
Collection<UserConfig> |
getByChannelId(SessionConfig sessionConfig,
String channelId,
ITransaction transaction)
Returns the local users of the specified channel
|
Collection<UserConfig> |
getByOrigin(SessionConfig sessionConfig,
String origin,
ITransaction transaction)
Return the users, searching by the user's origin.
|
String |
getUserId(SessionConfig sessionConfig,
String userLogin,
ITransaction transaction)
Deprecated.
|
String |
getUserIdByLogin(SessionConfig sessionConfig,
String userLogin,
ITransaction transaction)
Get the id for a user with the given login.
|
IFile |
getUserProfileImageContentTypeFile(String userId)
Returns the user's profile image content type file.
|
IFile |
getUserProfileImageFile(String userId)
Returns the user's profile image file.
|
String |
getUserProfileImageHref(String userId)
Get user profile image href by user identifier
|
Collection<UserConfig> |
getUsersByLogins(Set<String> logins)
Get users with the given logins.
|
void |
setPassword(SessionConfig sessionConfig,
String userId,
String password,
ITransaction transaction)
Set a new password for the user
|
void |
update(SessionConfig sessionConfig,
UserConfig userConfig,
ITransaction transaction)
Update the user configuration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findUsers
public void addOrUpdate(SessionConfig sessionConfig, UserConfig userConfig, ITransaction transaction) throws ManagerException, PortalException
addOrUpdate
in interface IUserManager
ManagerException
PortalException
public String add(SessionConfig sessionConfig, UserConfig userConfig, ITransaction transaction) throws ManagerException, PortalException
IUserManager
add
in interface IUserManager
ManagerException
PortalException
public void update(SessionConfig sessionConfig, UserConfig userConfig, ITransaction transaction) throws ManagerException, PortalException
IUserManager
update
in interface IUserManager
ManagerException
PortalException
public void setPassword(SessionConfig sessionConfig, String userId, String password, ITransaction transaction) throws ManagerException, PortalException
IUserManager
setPassword
in interface IUserManager
ManagerException
PortalException
public UserConfig get(SessionConfig sessionConfig, String userId, ITransaction transaction) throws ManagerException, PortalException
IUserManager
get
in interface IUserManager
ManagerException
PortalException
@Deprecated public String getUserId(SessionConfig sessionConfig, String userLogin, ITransaction transaction) throws ManagerException, PortalException
IUserManager
getUserId
in interface IUserManager
ManagerException
PortalException
public String getUserIdByLogin(SessionConfig sessionConfig, String userLogin, ITransaction transaction) throws ManagerException, PortalException
IUserManager
getUserIdByLogin
in interface IUserManager
sessionConfig
- the current user session information.userLogin
- the login.transaction
- the transaction for persistence access.ManagerException
PortalException
public void delete(SessionConfig sessionConfig, String userId, ITransaction transaction) throws ManagerException, PortalException
IUserManager
delete
in interface IUserManager
ManagerException
PortalException
public Collection<UserConfig> getByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IUserManager
getByChannelId
in interface IUserManager
ManagerException
PortalException
public Collection<UserConfig> getByOrigin(SessionConfig sessionConfig, String origin, ITransaction transaction) throws ManagerException, PortalException
IUserManager
getByOrigin
in interface IUserManager
sessionConfig
- the user session information.origin
- the origin.transaction
- the transaction for persistence access.DaoException
PortalException
ManagerException
public void deleteConfig(DeserializationContext deserializationContext, String configId) throws PortalException
deleteConfig
in interface IConfigDeleter
PortalException
public void addAlternativeLogin(SessionConfig sessionConfig, String userId, String newLogin, ITransaction transaction) throws PortalException
IUserManager
addAlternativeLogin
in interface IUserManager
sessionConfig
- the user session information.userId
- the user id.newLogin
- the new alternative login.transaction
- the transaction for persistence access.PortalException
public Collection<String> getAlternativeLogins(SessionConfig sessionConfig, String userId, ITransaction transaction) throws PortalException
IUserManager
getAlternativeLogins
in interface IUserManager
sessionConfig
- the user session information.userId
- the user id.transaction
- the transaction for persistence access.PortalException
public void deleteAlternativeLogin(SessionConfig sessionConfig, String loginToDelete, ITransaction transaction) throws PortalException
IUserManager
deleteAlternativeLogin
in interface IUserManager
sessionConfig
- the user session information.loginToDelete
- the login to be deleted.transaction
- the transaction for persistence access.PortalException
public IFile getUserProfileImageFile(String userId)
IUserManagerSPI
getUserProfileImageFile
in interface IUserManagerSPI
userId
- the user identifier.public IFile getUserProfileImageContentTypeFile(String userId)
IUserManagerSPI
getUserProfileImageContentTypeFile
in interface IUserManagerSPI
userId
- the user identifier.public String getUserProfileImageHref(String userId)
IUserManagerSPI
getUserProfileImageHref
in interface IUserManagerSPI
userId
- the user identifierpublic List<UserConfig> findUsers(String query, boolean includeFrameworkUsers, int maxResults) throws PortalException
IUserManagerSPI
findUsers
in interface IUserManagerSPI
query
- query used to search usersincludeFrameworkUsers
- indicates if framework users must also be returnedmaxResults
- amount of users to returnPortalException
IUserDao.findUsers(String, boolean, int)
public Collection<UserConfig> getUsersByLogins(Set<String> logins) throws PortalException
IUserManagerSPI
getUsersByLogins
in interface IUserManagerSPI
logins
- logins for getting usersPortalException
IUserDao.getUsersByLogins(Set)
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.