public class JdbcUserRoleListService
extends org.springframework.jdbc.core.support.JdbcDaoSupport
implements org.pentaho.platform.api.engine.IUserRoleListService
Modifier and Type | Class and Description |
---|---|
protected class |
JdbcUserRoleListService.AllAuthoritiesMapping
Query object to look up all authorities.
|
protected class |
JdbcUserRoleListService.AllUserNamesInRoleMapping
Query object to look up users in a role.
|
protected class |
JdbcUserRoleListService.AllUserNamesMapping
Query object to look up all users.
|
Modifier and Type | Field and Description |
---|---|
protected org.springframework.jdbc.object.MappingSqlQuery |
allAuthoritiesMapping |
protected org.springframework.jdbc.object.MappingSqlQuery |
allUsernamesInRoleMapping |
protected org.springframework.jdbc.object.MappingSqlQuery |
allUsernamesMapping |
static String |
DEF_ALL_AUTHORITIES_QUERY |
static String |
DEF_ALL_USERNAMES_IN_ROLE_QUERY |
static String |
DEF_ALL_USERNAMES_QUERY |
Constructor and Description |
---|
JdbcUserRoleListService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService,
List<String> systemRoles) |
Modifier and Type | Method and Description |
---|---|
String |
getAllAuthoritiesQuery() |
List<String> |
getAllRoles() |
List<String> |
getAllRoles(org.pentaho.platform.api.mt.ITenant tenant) |
String |
getAllUsernamesInRoleQuery() |
String |
getAllUsernamesQuery() |
List<String> |
getAllUsers() |
List<String> |
getAllUsers(org.pentaho.platform.api.mt.ITenant tenant) |
List<String> |
getRolesForUser(org.pentaho.platform.api.mt.ITenant tenant,
String username) |
List<String> |
getRolesForUser(String username) |
List<String> |
getSystemRoles() |
List<String> |
getUsersInRole(org.pentaho.platform.api.mt.ITenant tenant,
String role) |
List<String> |
getUsersInRole(String role) |
protected void |
initDao() |
protected void |
initMappingSqlQueries()
Extension point to allow other MappingSqlQuery objects to be substituted in a subclass
|
void |
setAllAuthoritiesQuery(String queryString)
Allows the default query string used to retrieve all authorities to be overriden, if default table or column names
need to be changed.
|
void |
setAllUsernamesInRoleQuery(String queryString)
Allows the default query string used to retrieve all user names in a role to be overriden, if default table or
column names need to be changed.
|
void |
setAllUsernamesQuery(String queryString)
Allows the default query string used to retrieve all user names to be overriden, if default table or column names
need to be changed.
|
void |
setRoleMapper(org.pentaho.platform.api.engine.security.IAuthenticationRoleMapper roleMapper) |
void |
setRolePrefix(String rolePrefix) |
void |
setUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService) |
public static final String DEF_ALL_AUTHORITIES_QUERY
public static final String DEF_ALL_USERNAMES_QUERY
public static final String DEF_ALL_USERNAMES_IN_ROLE_QUERY
protected org.springframework.jdbc.object.MappingSqlQuery allAuthoritiesMapping
protected org.springframework.jdbc.object.MappingSqlQuery allUsernamesMapping
protected org.springframework.jdbc.object.MappingSqlQuery allUsernamesInRoleMapping
public void setAllAuthoritiesQuery(String queryString)
DEF_ALL_AUTHORITIES_QUERY
; when modifying this query, ensure that
all returned columns are mapped back to the same column names as in the default query.queryString
- The query string to setpublic String getAllAuthoritiesQuery()
public void setAllUsernamesInRoleQuery(String queryString)
DEF_ALL_USERNAMES_QUERY
; when modifying this query,
ensure that all returned columns are mapped back to the same column names as in the default query.queryString
- The query string to setpublic String getAllUsernamesInRoleQuery()
public void setAllUsernamesQuery(String queryString)
DEF_ALL_USERNAMES_IN_ROLE_QUERY
; when modifying this query,
ensure that all returned columns are mapped back to the same column names as in the default query.queryString
- The query string to setpublic String getAllUsernamesQuery()
public List<String> getAllRoles() throws org.springframework.dao.DataAccessException
getAllRoles
in interface org.pentaho.platform.api.engine.IUserRoleListService
org.springframework.dao.DataAccessException
public List<String> getAllUsers() throws org.springframework.dao.DataAccessException
getAllUsers
in interface org.pentaho.platform.api.engine.IUserRoleListService
org.springframework.dao.DataAccessException
protected void initDao() throws org.springframework.context.ApplicationContextException
initDao
in class org.springframework.dao.support.DaoSupport
org.springframework.context.ApplicationContextException
protected void initMappingSqlQueries()
public List<String> getRolesForUser(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
org.springframework.security.core.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException
public void setRolePrefix(String rolePrefix)
public void setUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
public List<String> getAllRoles(org.pentaho.platform.api.mt.ITenant tenant)
getAllRoles
in interface org.pentaho.platform.api.engine.IUserRoleListService
public List<String> getAllUsers(org.pentaho.platform.api.mt.ITenant tenant)
getAllUsers
in interface org.pentaho.platform.api.engine.IUserRoleListService
public List<String> getUsersInRole(org.pentaho.platform.api.mt.ITenant tenant, String role)
getUsersInRole
in interface org.pentaho.platform.api.engine.IUserRoleListService
public List<String> getRolesForUser(org.pentaho.platform.api.mt.ITenant tenant, String username)
getRolesForUser
in interface org.pentaho.platform.api.engine.IUserRoleListService
public List<String> getSystemRoles()
getSystemRoles
in interface org.pentaho.platform.api.engine.IUserRoleListService
public void setRoleMapper(org.pentaho.platform.api.engine.security.IAuthenticationRoleMapper roleMapper)
Copyright © 2018 Hitachi Vantara. All rights reserved.