moved useradmininitialiser because it is not part of user management.
[utils] / security / src / test / resources / spring / test.org.wamblee.security.usermgt.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     <bean id="org.wamblee.usermgt.UserAdministration-target"
44         class="org.wamblee.usermgt.UserAdministrationImpl">
45         
46         <constructor-arg>
47            <ref local="org.wamblee.usermgt.UserSet"/>
48         </constructor-arg>
49         
50         <constructor-arg>
51             <ref local="org.wamblee.usermgt.GroupSet"/>
52         </constructor-arg>
53         
54         <constructor-arg>
55             <bean class="org.wamblee.usermgt.RegexpNameValidator">
56                 <constructor-arg><value>[a-zA-Z]+[a-zA-Z0-9]*</value></constructor-arg>
57                 <constructor-arg><value>INVALID_USERNAME</value></constructor-arg>
58                 <constructor-arg><value></value></constructor-arg>
59             </bean>
60         </constructor-arg>
61         
62         <constructor-arg>
63             <bean class="org.wamblee.usermgt.RegexpNameValidator">
64                 <constructor-arg><value>[a-zA-Z]+[a-zA-Z0-9]*</value></constructor-arg>
65                 <constructor-arg><value>INVALID_GROUPNAME</value></constructor-arg>
66                 <constructor-arg><value></value></constructor-arg>
67             </bean>
68         </constructor-arg>
69       
70     </bean>
71     
72     <bean id="usermanagement-lock" class="org.wamblee.concurrency.JvmLock"/>
73     
74      <bean id="usermanagement-lock-advice" class="org.wamblee.concurrency.spring.LockAdvice">
75          <constructor-arg><ref bean="usermanagement-lock"/></constructor-arg>
76      </bean>
77      
78      <bean id="org.wamblee.usermgt.UserAdministration" 
79          class="org.springframework.aop.framework.ProxyFactoryBean">
80          <property name="proxyInterfaces"><value>org.wamblee.usermgt.UserAdministration</value></property>
81          <property name="interceptorNames"><value>usermanagement-lock-advice</value></property>
82          <property name="target"><ref bean="org.wamblee.usermgt.UserAdministration-target"/></property>
83      </bean>
84      
85  </beans>