lumis.portal.user
Class UserManager

Package class diagram package UserManager
java.lang.Object
  extended by lumis.portal.user.UserManager
All Implemented Interfaces:
IConfigDeleter, IUserManager

public class UserManager
extends Object
implements IUserManager

Class responsible for managing operations on the portal users.

Since:
4.0.0

Constructor Summary
UserManager()
           
 
Method Summary
 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)
           
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManager

public UserManager()
Method Detail

addOrUpdate

public void addOrUpdate(SessionConfig sessionConfig,
                        UserConfig userConfig,
                        ITransaction transaction)
                 throws ManagerException,
                        PortalException
Specified by:
addOrUpdate in interface IUserManager
Throws:
ManagerException
PortalException

add

public String add(SessionConfig sessionConfig,
                  UserConfig userConfig,
                  ITransaction transaction)
           throws ManagerException,
                  PortalException
Description copied from interface: IUserManager
Adds a user to the portal and returns the identifier of the user added. If the userId is not provided, a new userId is created.

Specified by:
add in interface IUserManager
Returns:
a String Identifier of the user added
Throws:
ManagerException
PortalException

update

public void update(SessionConfig sessionConfig,
                   UserConfig userConfig,
                   ITransaction transaction)
            throws ManagerException,
                   PortalException
Description copied from interface: IUserManager
Update the user configuration.

Specified by:
update in interface IUserManager
Throws:
ManagerException
PortalException

setPassword

public void setPassword(SessionConfig sessionConfig,
                        String userId,
                        String password,
                        ITransaction transaction)
                 throws ManagerException,
                        PortalException
Description copied from interface: IUserManager
Set a new password for the user

Specified by:
setPassword in interface IUserManager
Throws:
ManagerException
PortalException

get

public UserConfig get(SessionConfig sessionConfig,
                      String userId,
                      ITransaction transaction)
               throws ManagerException,
                      PortalException
Description copied from interface: IUserManager
Get user configuration from userId.

Specified by:
get in interface IUserManager
Returns:
an UserConfig.
Throws:
ManagerException
PortalException

getUserId

@Deprecated
public String getUserId(SessionConfig sessionConfig,
                                   String userLogin,
                                   ITransaction transaction)
                 throws ManagerException,
                        PortalException
Deprecated. 

Description copied from interface: IUserManager
Get the userId from the userLogin

Specified by:
getUserId in interface IUserManager
Returns:
an UserConfig.
Throws:
ManagerException
PortalException

getUserIdByLogin

public String getUserIdByLogin(SessionConfig sessionConfig,
                               String userLogin,
                               ITransaction transaction)
                        throws ManagerException,
                               PortalException
Description copied from interface: IUserManager
Get the id for a user with the given login.

Specified by:
getUserIdByLogin in interface IUserManager
Parameters:
sessionConfig - the current user session information.
userLogin - the login.
transaction - the transaction for persistence access.
Returns:
the userId.
Throws:
ManagerException
PortalException

delete

public void delete(SessionConfig sessionConfig,
                   String userId,
                   ITransaction transaction)
            throws ManagerException,
                   PortalException
Description copied from interface: IUserManager
Delete an user.

Specified by:
delete in interface IUserManager
Throws:
ManagerException
PortalException

getByChannelId

public Collection<UserConfig> getByChannelId(SessionConfig sessionConfig,
                                             String channelId,
                                             ITransaction transaction)
                                      throws ManagerException,
                                             PortalException
Description copied from interface: IUserManager
Returns the local users of the specified channel

Specified by:
getByChannelId in interface IUserManager
Returns:
an aray of UserConfig.
Throws:
ManagerException
PortalException

getByOrigin

public Collection<UserConfig> getByOrigin(SessionConfig sessionConfig,
                                          String origin,
                                          ITransaction transaction)
                                   throws ManagerException,
                                          PortalException
Description copied from interface: IUserManager
Return the users, searching by the user's origin.

Specified by:
getByOrigin in interface IUserManager
Parameters:
sessionConfig - the user session information.
origin - the origin.
transaction - the transaction for persistence access.
Returns:
the UserConfig instances, or an empty collection if none was found.
Throws:
DaoException
PortalException
ManagerException

deleteConfig

public void deleteConfig(DeserializationContext deserializationContext,
                         String configId)
                  throws PortalException
Specified by:
deleteConfig in interface IConfigDeleter
Throws:
PortalException

addAlternativeLogin

public void addAlternativeLogin(SessionConfig sessionConfig,
                                String userId,
                                String newLogin,
                                ITransaction transaction)
                         throws PortalException
Description copied from interface: IUserManager
Adds an alternative login for an user.

Specified by:
addAlternativeLogin in interface IUserManager
Parameters:
sessionConfig - the user session information.
userId - the user id.
newLogin - the new alternative login.
transaction - the transaction for persistence access.
Throws:
PortalException

getAlternativeLogins

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

Specified by:
getAlternativeLogins in interface IUserManager
Parameters:
sessionConfig - the user session information.
userId - the user id.
transaction - the transaction for persistence access.
Throws:
PortalException

deleteAlternativeLogin

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

Specified by:
deleteAlternativeLogin in interface IUserManager
Parameters:
sessionConfig - the user session information.
loginToDelete - the login to be deleted.
transaction - the transaction for persistence access.
Throws:
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.