org.pentaho.platform.engine.security.userroledao.userdetailsservice
Class UserRoleDaoUserDetailsService

java.lang.Object
  extended by org.pentaho.platform.engine.security.userroledao.userdetailsservice.UserRoleDaoUserDetailsService

public class UserRoleDaoUserDetailsService
extends Object

A UserDetailsService that delegates to an IUserRoleDao to load users by username.

Author:
mlowery

Constructor Summary
UserRoleDaoUserDetailsService()
           
 
Method Summary
 String getRolePrefix()
           
 UserDetails loadUserByUsername(String username)
           
 void setRolePrefix(String rolePrefix)
          Allows a default role prefix to be specified.
 void setUserRoleDao(IUserRoleDao userRoleDao)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserRoleDaoUserDetailsService

public UserRoleDaoUserDetailsService()
Method Detail

loadUserByUsername

public UserDetails loadUserByUsername(String username)
                               throws UsernameNotFoundException,
                                      DataAccessException
Throws:
UsernameNotFoundException
DataAccessException

setRolePrefix

public void setRolePrefix(String rolePrefix)
Allows a default role prefix to be specified. If this is set to a non-empty value, then it is automatically prepended to any roles read in from the db. This may for example be used to add the ROLE_ prefix expected to exist in role names (by default) by some other Acegi Security framework classes, in the case that the prefix is not already present in the db.

Parameters:
rolePrefix - the new prefix

getRolePrefix

public String getRolePrefix()

setUserRoleDao

public void setUserRoleDao(IUserRoleDao userRoleDao)