org.opennms.acl.service
Class UserServiceImpl

java.lang.Object
  extended by org.opennms.acl.service.UserServiceImpl
All Implemented Interfaces:
PagerService, UserService

@Service(value="userService")
public class UserServiceImpl
extends Object
implements UserService

Since:
jdk 1.5.0
Author:
Massimiliano Dessì (desmax74@yahoo.it)

Constructor Summary
UserServiceImpl()
           
 
Method Summary
 Boolean disableUser(String id)
          disable a user
 List<UserDTOLight> getDisabledUsers(Pager pager)
          Retrieve the disabled users
 List<UserDTOLight> getEnabledUsers(Pager pager)
           
 Object getIdUser(String username)
          Retrieve the id of user by username
 Integer getTotalItemsNumber()
           
 UserView getUser(String id)
          retrieve a user
 UserDTO getUserCredentials(String id)
          retrieve a user with credentials
 Integer getUsersNumber()
           
 UserAuthoritiesDTO getUserWithAuthorities(String username)
          retrieve a user with their authorities
 UserAuthoritiesDTO getUserWithAuthoritiesByID(Integer sid)
          retrieve a user with their id
 boolean save(UserAuthoritiesDTO user)
           
 boolean save(UserDTO user)
          Method only for admin, insert a user or change the user password
 void setUserRepository(UserRepository userRepository)
           
 boolean updatePassword(UserDTO user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserServiceImpl

public UserServiceImpl()
Method Detail

getUserCredentials

public UserDTO getUserCredentials(String id)
Description copied from interface: UserService
retrieve a user with credentials

Specified by:
getUserCredentials in interface UserService
Returns:
a UserView

save

public boolean save(UserDTO user)
Description copied from interface: UserService
Method only for admin, insert a user or change the user password

Specified by:
save in interface UserService
Returns:

save

public boolean save(UserAuthoritiesDTO user)
Specified by:
save in interface UserService

updatePassword

public boolean updatePassword(UserDTO user)

getUserWithAuthorities

public UserAuthoritiesDTO getUserWithAuthorities(String username)
Description copied from interface: UserService
retrieve a user with their authorities

Specified by:
getUserWithAuthorities in interface UserService
Returns:
UserAuthoritiesDTO with their roles

getUserWithAuthoritiesByID

public UserAuthoritiesDTO getUserWithAuthoritiesByID(Integer sid)
Description copied from interface: UserService
retrieve a user with their id

Specified by:
getUserWithAuthoritiesByID in interface UserService
Returns:
UserAuthoritiesDTO with their authorities

getUser

public UserView getUser(String id)
Description copied from interface: UserService
retrieve a user

Specified by:
getUser in interface UserService
Returns:
a UserView

disableUser

public Boolean disableUser(String id)
Description copied from interface: UserService
disable a user

Specified by:
disableUser in interface UserService
Returns:
the outcome of disable operation

getIdUser

public Object getIdUser(String username)
Description copied from interface: UserService
Retrieve the id of user by username

Specified by:
getIdUser in interface UserService
Returns:
the unique identifier

getUsersNumber

public Integer getUsersNumber()
Specified by:
getUsersNumber in interface UserService
Returns:
user's number

getTotalItemsNumber

public Integer getTotalItemsNumber()
Specified by:
getTotalItemsNumber in interface PagerService

getDisabledUsers

public List<UserDTOLight> getDisabledUsers(Pager pager)
Description copied from interface: UserService
Retrieve the disabled users

Specified by:
getDisabledUsers in interface UserService
Returns:

getEnabledUsers

public List<UserDTOLight> getEnabledUsers(Pager pager)
Specified by:
getEnabledUsers in interface UserService

setUserRepository

public void setUserRepository(UserRepository userRepository)


Copyright © 2009. All Rights Reserved.