public class UserRoleListEnhancedUserMapFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean
UserMap
. When Spring instantiates this bean, it outputs a
UserRoleListEnhancedUserMap
.
This class allows a string that defines a UserMap
to be defined once in Spring beans XML, then used by
multiple client beans that need access to user to role mappings.
This class is necessary since UserMap
does not define a constructor or setter necessary to populate a
UserMap
bean, nor does it provide any way to extract its mappings once created.
Example usage:
<bean id="userMap" class="java.lang.String"> <constructor-arg type="java.lang.String"> <value> <![CDATA[ admin=password,Admin,ceo,Authenticated ... ]]> </value> </constructor-arg> </bean> <bean id="userRoleListEnhancedUserMapFactoryBean" class="org.pentaho.security.UserRoleListEnhancedUserMapFactoryBean"> <property name="userMap" ref="userMap" /> </bean> <bean id="inMemoryUserRoleListService" class="org.pentaho.security.InMemoryDaoUserDetailsRoleListImpl"> <property name="userRoleListEnhancedUserMap" ref="userRoleListEnhancedUserMapFactoryBean" /> <property name="allAuthorities"> <list> <bean class="org.springframework.security.GrantedAuthorityImpl"> <constructor-arg value="Authenticated" /> ... </bean> </list> </property> </bean>
UserMapFactoryBean
Constructor and Description |
---|
UserRoleListEnhancedUserMapFactoryBean() |
Modifier and Type | Method and Description |
---|---|
Object |
getObject() |
Class |
getObjectType() |
boolean |
isSingleton() |
void |
setUserMap(Properties userMap) |
public UserRoleListEnhancedUserMapFactoryBean()
public Object getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean
Exception
public Class getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean
public void setUserMap(Properties userMap)
Copyright © 2019 Hitachi Vantara. All rights reserved.