1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | |
---|
3 | <!-- |
---|
4 | IBIS-PH View System's "user" related Spring properties. These |
---|
5 | properties are all specific to the "user" type requests and include |
---|
6 | user specific resources, controllers, and views. |
---|
7 | --> |
---|
8 | |
---|
9 | <beans default-lazy-init="false" default-autowire="no" |
---|
10 | xmlns="http://www.springframework.org/schema/beans" |
---|
11 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
---|
12 | xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd" |
---|
13 | > |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | <!-- M O D E L S / C O N T R O L L E R R E S O R U C E S --> |
---|
18 | <bean id="User.HTMLContent.XML.Path" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> |
---|
19 | <property name="targetObject" ref="Common.Context.Servlet"/> |
---|
20 | <property name="targetMethod" value="getRealPath"/> |
---|
21 | <property name="arguments"><list><value>xml/user/html_content</value></list></property> |
---|
22 | </bean> |
---|
23 | |
---|
24 | <bean id="User.XML.Path" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> |
---|
25 | <property name="targetObject" ref="Common.Context.Servlet"/> |
---|
26 | <property name="targetMethod" value="getRealPath"/> |
---|
27 | <property name="arguments"><list><value>xml/user</value></list></property> |
---|
28 | </bean> |
---|
29 | |
---|
30 | <bean id="User.RegistrationValidationSerialNumber.DateFormat" class="java.text.SimpleDateFormat"> |
---|
31 | <constructor-arg value="yyyy-MM-dd-HH-mm-ss-SS"/> |
---|
32 | <constructor-arg type="java.util.Locale" ref="Common.Locale"/> |
---|
33 | </bean> |
---|
34 | |
---|
35 | <!-- |
---|
36 | <bean id="User.MailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> |
---|
37 | <description> |
---|
38 | Mail sender config that works when the app server is setup for JNDI. |
---|
39 | If the app server is NOT setup for JNDI then this code and the refs |
---|
40 | within the web.xml (and any enterprise app server config file refs) |
---|
41 | should be commented out as it will cause the app to not load/start. |
---|
42 | Note that for this to function properly the app server must be setup |
---|
43 | with the approp entries and jar file(s) (mail 1.4+, and the activation |
---|
44 | .jar if using jdk 1.5). The app's context must also be configed to |
---|
45 | expose the resource. The name must match the name in the web.xml |
---|
46 | resource-ref element which must match the jndiName property below. |
---|
47 | Also note that the complete JNDI name is not needed if the app is |
---|
48 | configed with the "resourceRef" set to true. |
---|
49 | |
---|
50 | PASSWORD NOTE: In some instances when the app server does NOT provide |
---|
51 | a password entry and does not accept a mail.protocol.password or |
---|
52 | mail.password property value you will need to supply: |
---|
53 | [property name="password" value="xxxxxxx"] which defeats the purpose |
---|
54 | of a externally defined mail resource. |
---|
55 | </description> |
---|
56 | <property name="session"> |
---|
57 | <bean class="org.springframework.jndi.JndiObjectFactoryBean"> |
---|
58 | <property name="jndiName" value="mail/doh_ibisph"/> |
---|
59 | <property name="resourceRef" value="true"/> |
---|
60 | </bean> |
---|
61 | </property> |
---|
62 | </bean> |
---|
63 | --> |
---|
64 | |
---|
65 | <!-- MAIL NOTES: |
---|
66 | http://wheelersoftware.com/articles/spring-javamail-2.html |
---|
67 | http://static.springsource.org/spring/docs/3.1.x/reference/html/mail.html |
---|
68 | http://forum.springsource.org/showthread.php?33167-How-to-use-Spring-Mail-to-send-mails-via-Gmail-s-SMTP-server |
---|
69 | http://www.javacodegeeks.com/2010/07/java-mail-spring-gmail-smtp.html |
---|
70 | |
---|
71 | if you're using JDK 1.5 or earlier, include the "activation.jar" file |
---|
72 | that you obtained from downloading the JavaBeans Activation Framework, |
---|
73 | in your CLASSPATH. |
---|
74 | |
---|
75 | Sun SMTP properties: |
---|
76 | http://javamail.kenai.com/nonav/javadocs/com/sun/mail/smtp/package-summary.html |
---|
77 | |
---|
78 | GMAIL NOTES: |
---|
79 | SSL (smtpS) |
---|
80 | <property name="protocol" value="smtps"/> |
---|
81 | <property name="port" value="465"/> or port 25 |
---|
82 | |
---|
83 | TLS: |
---|
84 | <property name="protocol" value="smtp"/> |
---|
85 | <property name="port" value="587"/> |
---|
86 | <prop key="mail.smtp.starttls.enable">true</prop> |
---|
87 | |
---|
88 | doesn't appear to matter: |
---|
89 | <prop key="mail.smtp.auth">true</prop> |
---|
90 | <prop key="mail.user">garth.braithwaite@stgutah.com</prop> |
---|
91 | |
---|
92 | velocity template example: |
---|
93 | http://www.javabeat.net/articles/83-email-integration-in-spring-framework-1.html |
---|
94 | --> |
---|
95 | |
---|
96 | <bean id="User.MailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> |
---|
97 | <description> |
---|
98 | Local, internal webapp mail sender config that can be used for |
---|
99 | testing without having to have the app server setup with a JNDI |
---|
100 | mail session configuration. If the app server is NOT setup for |
---|
101 | JNDI then this code and the refs within the web.xml (and any |
---|
102 | enterprise app server config file refs) should be commented out as |
---|
103 | leaving in will cause the app to not load/start. Note also that if |
---|
104 | using this configuration the mail.jar and possibly the activation.jar |
---|
105 | will need to be put into the app's lib folder. If/when the JNDI |
---|
106 | is used it is important to remove those jars from the webapp's lib. |
---|
107 | </description> |
---|
108 | |
---|
109 | <property name="protocol" value="smtps"/> |
---|
110 | <property name="host" value="smtp.gmail.com"/> |
---|
111 | <property name="port" value="465"/> |
---|
112 | <property name="username" value="garth.braithwaite@stgutah.com"/> |
---|
113 | <property name="password" value="karlyn.0"/> |
---|
114 | <property name="javaMailProperties"> |
---|
115 | <props> |
---|
116 | <prop key="mail.smtp.connectiontimeout">200000</prop> |
---|
117 | <prop key="mail.smtp.timeout">10000</prop> |
---|
118 | <prop key="mail.debug">true</prop> |
---|
119 | </props> |
---|
120 | </property> |
---|
121 | </bean> |
---|
122 | |
---|
123 | <bean id="User.MailMessage" class="org.springframework.mail.SimpleMailMessage"> |
---|
124 | <property name="from"> |
---|
125 | <value><![CDATA[Simple Application Monitor <noreply@somehost.com>]]></value> |
---|
126 | </property> |
---|
127 | <property name="to"> |
---|
128 | <value><![CDATA[System Administrator <sysadmin@somehost.com>]]></value> |
---|
129 | </property> |
---|
130 | <property name="subject" value="SAM Alert"/> |
---|
131 | </bean> |
---|
132 | |
---|
133 | |
---|
134 | <!-- S E R V I C E S --> |
---|
135 | <bean id="User.XML.Service" class="org.ibisph.user.service.UserProfileXML"> |
---|
136 | <property name="XMLPath" ref="User.XML.Path"/> |
---|
137 | <property name="documentDAO" ref="Common.XML.DAO"/> |
---|
138 | </bean> |
---|
139 | |
---|
140 | |
---|
141 | <!-- X M L M O D E L S --> |
---|
142 | <bean id="User.DefaultHTMLContent.ModelMap" class="org.ibisph.modelmap.DefaultModelIfNullModel" parent="Common.XMLModelMap.CommonProperties"> |
---|
143 | </bean> |
---|
144 | <bean id="User.HTMLContent.ModelMap" class="org.ibisph.systemid.modelmap.SystemIDFromHTTPRequestEndOfPathInfo" parent="Common.XMLModelMap.CommonProperties"> |
---|
145 | <property name="XMLPath" ref="User.HTMLContent.XML.Path"/> |
---|
146 | </bean> |
---|
147 | |
---|
148 | |
---|
149 | <bean id="User.UserProfileFromHTTPRequestParameters.Service" class="org.ibisph.web.HTTPRequestParametersToContainerElementService"> |
---|
150 | <description>HTTP REQUEST PARAMS to USER - POSTED - SAVE USER PROFILE</description> |
---|
151 | <property name="containerElementName" value="USER"/> |
---|
152 | <property name="HTTPRequestParameterNameToXMLElementNameList"> |
---|
153 | <list> |
---|
154 | <bean class="org.ibisph.web.HTTPRequestParameterNameToXMLElementName"><constructor-arg value="fullName"/> <constructor-arg value="FULL_NAME"/></bean> |
---|
155 | <bean class="org.ibisph.web.HTTPRequestParameterNameToXMLElementName"><constructor-arg value="emailAddress"/> <constructor-arg value="ID"/></bean> |
---|
156 | <bean class="org.ibisph.web.HTTPRequestParameterNameToXMLElementName"><constructor-arg value="emailAddress"/> <constructor-arg value="EMAIL_ADDRESS"/></bean> |
---|
157 | <bean class="org.ibisph.web.HTTPRequestParameterNameToXMLElementName"><constructor-arg value="password"/> <constructor-arg value="PASSWORD"/></bean> |
---|
158 | <bean class="org.ibisph.web.HTTPRequestParameterNameToXMLElementName"><constructor-arg value="telephoneNumber"/> <constructor-arg value="TELEPHONE_NUMBER"/></bean> |
---|
159 | <bean class="org.ibisph.web.HTTPRequestParameterNameToXMLElementName"><constructor-arg value="organization"/> <constructor-arg value="ORGANIZATION"/></bean> |
---|
160 | <bean class="org.ibisph.web.HTTPRequestParameterNameToXMLElementName"><constructor-arg value="securityQuestion"/><constructor-arg value="SECURITY_QUESTION"/></bean> |
---|
161 | <bean class="org.ibisph.web.HTTPRequestParameterNameToXMLElementName"><constructor-arg value="securityAnswer"/> <constructor-arg value="SECURITY_ANSWER"/></bean> |
---|
162 | </list> |
---|
163 | </property> |
---|
164 | </bean> |
---|
165 | |
---|
166 | <bean id="User.SaveUserProfile.ModelMap" class="org.ibisph.user.service.SaveUserProfile"> |
---|
167 | <property name="userProfileService" ref="User.XML.Service"/> |
---|
168 | <property name="javaMailSender" ref="User.MailSender"/> |
---|
169 | </bean> |
---|
170 | |
---|
171 | |
---|
172 | |
---|
173 | <!-- C O N T R O L L E R S --> |
---|
174 | <bean id="User.Controller.CommonProperties" abstract="true"> |
---|
175 | <property name="additionalModelMapList"> |
---|
176 | <list> |
---|
177 | <ref bean="Common.WebAppURLContextPrefixFromHTTPRequest.ModelMap"/> |
---|
178 | <ref bean="Common.HTTPRequestParameters.ModelMap"/> |
---|
179 | </list> |
---|
180 | </property> |
---|
181 | <property name="noCacheHTTPHeader" value="true"/> |
---|
182 | </bean> |
---|
183 | |
---|
184 | <bean id="User.HTMLContent.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> |
---|
185 | <property name="additionalModelMapList"> |
---|
186 | <list> |
---|
187 | <ref bean="User.HTMLContent.ModelMap"/> |
---|
188 | <ref bean="User.DefaultHTMLContent.ModelMap"/> |
---|
189 | </list> |
---|
190 | </property> |
---|
191 | <property name="view" ref="Home.HTMLContent.View"/> |
---|
192 | </bean> |
---|
193 | |
---|
194 | <bean id="User.EmailPassword.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> |
---|
195 | </bean> |
---|
196 | |
---|
197 | <bean id="User.NewRegistration.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> |
---|
198 | </bean> |
---|
199 | |
---|
200 | <bean id="User.SaveRegistration.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="User.Controller.CommonProperties"> |
---|
201 | <description> |
---|
202 | /query/definition/save* -OR- /query/critera/save* |
---|
203 | Get the POSTED HTTP request params and create a new USER |
---|
204 | </description> |
---|
205 | <property name="additionalModelMapList"> |
---|
206 | <list> |
---|
207 | <!-- |
---|
208 | <ref bean="User.UserProfileFromHTTPRequestParameters.Service"/> |
---|
209 | --> |
---|
210 | <ref bean="User.SaveUserProfile.ModelMap"/> |
---|
211 | </list> |
---|
212 | </property> |
---|
213 | <property name="view" ref="User.PendingRegistration.View"/> |
---|
214 | </bean> |
---|
215 | |
---|
216 | <bean id="User.VerifyRegistration.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> |
---|
217 | </bean> |
---|
218 | |
---|
219 | <bean id="User.EditProfile.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> |
---|
220 | </bean> |
---|
221 | |
---|
222 | <bean id="User.SaveProfile.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> |
---|
223 | </bean> |
---|
224 | |
---|
225 | |
---|
226 | |
---|
227 | |
---|
228 | |
---|
229 | |
---|
230 | |
---|
231 | |
---|
232 | <bean id="User.QuerySelectionList.XSLT.SystemID" class="org.ibisph.systemid.FileSystemID"> |
---|
233 | <constructor-arg ref="Common.Context.Servlet.RootPath"/> |
---|
234 | <constructor-arg value="xslt/html/user/queryselections/SelectionPage.xslt"/> |
---|
235 | </bean> |
---|
236 | |
---|
237 | |
---|
238 | <bean id="User.QueryDefinitionsXML.ParameterMap" class="org.ibisph.querydefinition.modelmap.QueryDefinitionsFromHTTPRequest"> |
---|
239 | <property name="queryDefinitionsService" ref="QueryDefinition.XML.Service"/> |
---|
240 | </bean> |
---|
241 | <bean id="User.UserAuthoritiesXML.ParameterMap" class="org.ibisph.user.springsecurity.UserAuthoritiesXMLModelMap"/> |
---|
242 | |
---|
243 | <bean id="User.QuerySelectionList.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="QueryDefinition.Controller.CommonProperties"> |
---|
244 | <description> </description> |
---|
245 | <property name="additionalModelMapList"> |
---|
246 | <list> |
---|
247 | <ref bean="Secure.DefaultSelection.ModelMap"/> |
---|
248 | <ref bean="User.QueryDefinitionsXML.ParameterMap"/> |
---|
249 | <ref bean="User.UserAuthoritiesXML.ParameterMap"/> |
---|
250 | </list> |
---|
251 | </property> |
---|
252 | <property name="view" ref="User.QuerySelectionList.View"/> |
---|
253 | </bean> |
---|
254 | |
---|
255 | <bean id="User.QuerySelectionList.View" class="org.ibisph.xml.springmvc.XSLTXMLTransformationView"> |
---|
256 | <constructor-arg ref="User.QuerySelectionList.XSLT.SystemID"/> |
---|
257 | <constructor-arg ref="Common.XSLT.Transformation"/> |
---|
258 | </bean> |
---|
259 | |
---|
260 | |
---|
261 | <!-- V I E W R E S O U R C E S --> |
---|
262 | <bean id="User.HTMLContent.XSLT.SystemID" class="org.ibisph.systemid.FileSystemID"> |
---|
263 | <constructor-arg ref="Common.Context.Servlet.RootPath"/> |
---|
264 | <constructor-arg value="xslt/html/user/HTMLContentPage.xslt"/> |
---|
265 | </bean> |
---|
266 | |
---|
267 | <bean id="User.PendingRegistration.XSLT.SystemID" class="org.ibisph.systemid.FileSystemID"> |
---|
268 | <constructor-arg ref="Common.Context.Servlet.RootPath"/> |
---|
269 | <constructor-arg value="xslt/html/user/pending/PendingRegistrationPage.xslt"/> |
---|
270 | </bean> |
---|
271 | |
---|
272 | |
---|
273 | |
---|
274 | <!-- V I E W S --> |
---|
275 | <bean id="User.HTMLContent.View" class="org.ibisph.xml.springmvc.XSLTXMLTransformationView"> |
---|
276 | <constructor-arg ref="User.HTMLContent.XSLT.SystemID"/> |
---|
277 | <constructor-arg ref="Common.XSLT.Transformation"/> |
---|
278 | </bean> |
---|
279 | |
---|
280 | <bean id="User.PendingRegistration.View" class="org.ibisph.xml.springmvc.XSLTXMLTransformationView"> |
---|
281 | <constructor-arg ref="User.PendingRegistration.XSLT.SystemID"/> |
---|
282 | <constructor-arg ref="Common.XSLT.Transformation"/> |
---|
283 | </bean> |
---|
284 | </beans> |
---|
285 | |
---|