org.pentaho.platform.plugin.services.security.userrole.memory
Class UserRoleListEnhancedUserMapFactoryBean
java.lang.Object
org.pentaho.platform.plugin.services.security.userrole.memory.UserRoleListEnhancedUserMapFactoryBean
public class UserRoleListEnhancedUserMapFactoryBean
- extends Object
Takes as input the string that defines a 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[
joe=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.acegisecurity.GrantedAuthorityImpl">
<constructor-arg value="Authenticated" />
...
</bean>
</list>
</property>
</bean>
- Author:
- mlowery
- See Also:
UserMapFactoryBean
UserRoleListEnhancedUserMapFactoryBean
public UserRoleListEnhancedUserMapFactoryBean()
getObject
public Object getObject()
throws Exception
- Throws:
Exception
getObjectType
public Class getObjectType()
isSingleton
public boolean isSingleton()
setUserMap
public void setUserMap(String userMap)