99698c2b7af54ba53b4509a45176d4d39130f340
[utils] / security / src / main / resources / spring / test.org.wamblee.security.usermgt-repositories.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
3  
4  <beans> 
5     
6      <bean id="cacheConfig" class="org.wamblee.io.ClassPathResource">
7          <constructor-arg><value>properties/test.org.wamblee.security.ehcache.xml</value></constructor-arg>
8      </bean>
9      
10      <bean id="userCache" class="org.wamblee.cache.EhCache">
11          <constructor-arg><ref local="cacheConfig"/></constructor-arg>
12          <constructor-arg><value>users</value></constructor-arg>
13      </bean> 
14      
15     
16     <bean id="passwordValidator" 
17          class="org.wamblee.usermgt.RegexpNameValidator">
18              <constructor-arg><value>.{5,}</value></constructor-arg>
19              <constructor-arg><value>INVALID_PASSWORD</value></constructor-arg>
20              <constructor-arg><value>Password must have at least 5 characters</value></constructor-arg>
21     </bean>
22     
23      <bean id="passwordDigester"
24          class="org.wamblee.security.encryption.Md5HexMessageDigester">
25      </bean>
26     
27     <bean id="org.wamblee.usermgt.UserSet"
28         class="org.wamblee.usermgt.hibernate.HibernateUserSet">
29         <constructor-arg><ref local="userCache"/></constructor-arg>
30         <constructor-arg><ref local="passwordValidator"/></constructor-arg>
31         <constructor-arg><ref local="passwordDigester"/></constructor-arg>
32         
33         <property name="sessionFactory"><ref bean="sessionFactory"/></property>
34         
35     </bean>
36     
37     <bean id="org.wamblee.usermgt.GroupSet"
38         class="org.wamblee.usermgt.hibernate.HibernateGroupSet">
39         
40         <property name="sessionFactory"><ref bean="sessionFactory"/></property>
41     </bean> 
42      
43  </beans>