org.squashtest.tm.service.internal.user
Class UserAccountServiceImpl

java.lang.Object
  extended by org.squashtest.tm.service.internal.user.UserAccountServiceImpl
All Implemented Interfaces:
UserAccountService

@Service(value="squashtest.tm.service.UserAccountService")
@Transactional
public class UserAccountServiceImpl
extends Object
implements UserAccountService


Constructor Summary
UserAccountServiceImpl()
           
 
Method Summary
 void activateUser(long userId)
           
 void deactivateUser(long userId)
           
 void deleteUser(long userId)
           
 org.squashtest.tm.domain.users.User findCurrentUser()
          Fetches the User which matches the current authenticated username / principal.
 void modifyUserEmail(long userId, String newEmail)
           
 void modifyUserFirstName(long userId, String newName)
           
 void modifyUserLastName(long userId, String newName)
           
 void modifyUserLogin(long userId, String newLogin)
           
 void setCurrentUserEmail(String newEmail)
           
 void setCurrentUserPassword(String oldPass, String newPass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAccountServiceImpl

public UserAccountServiceImpl()
Method Detail

modifyUserFirstName

public void modifyUserFirstName(long userId,
                                String newName)
Specified by:
modifyUserFirstName in interface UserAccountService

modifyUserLastName

public void modifyUserLastName(long userId,
                               String newName)
Specified by:
modifyUserLastName in interface UserAccountService

modifyUserLogin

public void modifyUserLogin(long userId,
                            String newLogin)
Specified by:
modifyUserLogin in interface UserAccountService

modifyUserEmail

public void modifyUserEmail(long userId,
                            String newEmail)
Specified by:
modifyUserEmail in interface UserAccountService

findCurrentUser

@Transactional(readOnly=true)
public org.squashtest.tm.domain.users.User findCurrentUser()
Description copied from interface: UserAccountService
Fetches the User which matches the current authenticated username / principal. If one is authenticated (through a third party authentication provider) but no User is defined, this method returns null.

Specified by:
findCurrentUser in interface UserAccountService
Returns:
the current User or null

setCurrentUserEmail

public void setCurrentUserEmail(String newEmail)
Specified by:
setCurrentUserEmail in interface UserAccountService

setCurrentUserPassword

public void setCurrentUserPassword(String oldPass,
                                   String newPass)
Specified by:
setCurrentUserPassword in interface UserAccountService

deactivateUser

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
public void deactivateUser(long userId)
Specified by:
deactivateUser in interface UserAccountService

activateUser

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
public void activateUser(long userId)
Specified by:
activateUser in interface UserAccountService

deleteUser

public void deleteUser(long userId)
Specified by:
deleteUser in interface UserAccountService


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.