source: main/adopters/nm/trunk/src/main/webapps/nmibis-view/WEB-INF/config/spring/SiteSpecific.xml @ 21261

Last change on this file since 21261 was 21261, checked in by GarthBraithwaite_STG, 2 months ago

nm view - ss.xml for apply criteria and main ss.xslt video.

File size: 16.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<beans default-lazy-init="false" default-autowire="no"
4        xmlns="http://www.springframework.org/schema/beans"
5        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
7>
8        <!--
9                This file has 3 functions:
10                1) Specify/load the application's spring bean definition files.
11                2) Provide the dispatcher servlet URL to controller mappings.
12                3) Override any spring bean definitions as per adopter's specific needs.
13                   Note that the properties file should be configured in this file IF
14                   they are needed/used.
15        -->
16
17        <!--
18                SPRING APPLICATION CONTENT DEFINITION FILES / SPRING BEAN IMPORTS
19                Specifies the Spring application context definition files which are
20                responsible for creating the application's objects.  To keep these
21                definitions more maintainable the bean definitions are stored in their
22                own file (beans are grouped by functionality).  There are two available
23                mechanisms to load these files:
24                1) web.xml - can specify a list of bean files to load.  Note that this
25                   mechanism is the same - the difference is that it only specifies
26                   this file.
27                2) This file can be used with the spring bean "import" mechanism.  This
28                   mechanism works the same way the XSLT import works with the last
29                   import taking precedence (which for imports is typically not a problem
30                   as they should be independent).  However, the 2nd part of this file
31                   allows for an adopter to override any bean definition OR the adopter
32                   can put all their overrides in a separate file and import that file
33                   last etc.
34
35                IMPORTANT IMPORT NOTES:
36                Some beans have dependencies on other beans so inclusion of 1 file
37                may result in the need for additional file(s).  The request dispatcher
38                URL to controller mappings require that all controller objects be
39                defined.  In either case if a bean references another bean and that
40                bean/object is not defined the application will not start (you will
41                see an error in the output log about bean definition missing/not found).
42               
43                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44                !!! IMPORTANT - SECURITY CONFIGURATION !!!
45                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46                When making security config changes consult ALL the notes and comments
47                within the security files and the admin webapp's security_notes.txt
48                file.  At some point someone will document this but for now these
49                comments should provide enough help for a java web developer to be
50                able to connect the dots.
51
52                If doing secure URLs at least two security definitions need to be
53                specified: the general (security.xml) and the specific security
54                configuration (security-xxx.xml) which supplements.
55        -->
56        <import resource="common.xml"/>
57        <import resource="filter.xml"/>
58
59        <import resource="security.xml"/>
60        <import resource="security-db_authentication.xml"/>
61        <import resource="security-xml_authentication.xml"/>
62        <import resource="https.xml"/>
63
64        <import resource="topic.xml"/>
65        <import resource="community.xml"/>
66        <import resource="indicator.xml"/>
67        <import resource="query.xml"/>
68        <import resource="query-definition.xml"/>
69        <import resource="report.xml"/>
70        <import resource="secure.xml"/>
71        <import resource="user.xml"/>
72
73        <import resource="view.xml"/>
74
75        <import resource="SiteSpecific-security.xml"/>
76
77
78        <bean id="siteSpecificDispatcherServletURLMap" class="java.util.HashMap">
79                <description>
80                        Defines the mapping of URL patterns to the appropriate IBIS-PH
81                        Controller.  The definitions are defined here and referenced in the
82                        dispacther_servlet.xml file because the ds.xml load occurs after
83                        this bean file is processed which would require an adopter to have
84                        to maintain and track the d_s.xml file.  Keeping them in this file
85                        also is the right place as this file contains the bean imports.
86                       
87                        IMPORTANT IMPORT NOTE:
88                        The request URLs to controller mapping MUST match the specified
89                        controller.  Otherwise the application will not start and the log
90                        will show an undefined bean error in the log.  Make sure that the
91                        imports match the needed controller.
92
93                        For example if secure query is wanted then the secure.xml spring bean
94                        controller definition file would need to imported.  The "secure" type
95                        requests would then need to be mapped to the respective controller.
96
97                        Note the first part of the controller name corresponds with the
98                        Spring bean definition file that includes that controller's
99                        definition (this is the case with all IBIS-PH Spring bean defs -
100                        they all have a prefix that is associated with the bean XML file.
101
102                        ORDERING: The best practice is to be order most specific to least.
103                </description>
104                <constructor-arg>
105                        <map>
106                                <!-- D E F A U L T   H T M L   C O N T E N T -->
107                                <entry key="/**/*.html" value-ref="viewHTMLContentConventionController"/>
108
109                                <!-- Note these will only get hit for defined web.xml blanket
110                                        mappings so requests like indicator/ or query/
111                                        but NOT about/ or topic/ as these have no web.xml mapping.
112                                -->
113                                <entry key="/*/"                value-ref="viewHTMLContentConventionController"/>
114
115                                <!-- T O P I C -->
116                                <entry key="/topic/**"                                          value-ref="topicHTMLContentConventionController"/>
117
118                                <!-- C O M M U N I T Y -->
119                                <entry key="/community/indicators/**"                   value-ref="communityIndicatorsReportController"/>
120                                <entry key="/community/indicator/**"                    value-ref="communityIndicatorReportController"/>
121                                <entry key="/community/facts/**"                                value-ref="communityFactsController"/>
122
123                                <!-- I N D I C A T O R  -->
124                                <entry key="/indicator/index/Alphabetical.html" value-ref="indicatorAlphabeticalIndexController"/>
125                                <entry key="/indicator/index/DataSource.html"   value-ref="indicatorDataSourceIndexController"/>
126                                <entry key="/indicator/index/Organization.html" value-ref="indicatorOrgUnitIndexController"/>
127                                <entry key="/indicator/index/Set.html"                  value-ref="indicatorIndicatorSetIndexController"/>
128                                <entry key="/indicator/index/Table.html"                value-ref="indicatorTableIndexController"/>
129                                <entry key="/indicator/index/Categorized.html"  value-ref="indicatorCategorizedIndexController"/>
130<!--
131                                <entry key="/indicator/default/*.html"     value-ref="indicatorDefaultViewController"/>
132-->
133                                <entry key="/indicator/summary/*.html"                  value-ref="indicatorSummaryViewController"/>
134                                <entry key="/indicator/view/*.html"                             value-ref="indicatorViewController"/>
135                                <entry key="/indicator/facts/*.html"                    value-ref="indicatorImportantFactsController"/>
136                                <entry key="/indicator/services/*.html"                 value-ref="indicatorServicesController"/>
137                                <entry key="/indicator/related/*/*.html"                value-ref="indicatorRelatedIndicatorsController"/>
138                                <entry key="/indicator/resources/*.html"                value-ref="indicatorResourcesController"/>
139                                <entry key="/indicator/complete_profile/*.html" value-ref="indicatorCompleteViewController"/>
140
141                                <entry key="/indicator/view/*.json"                             value-ref="indicatorViewJSONController"/>
142                                <entry key="/indicator/*.json"                                  value-ref="indicatorJSONController"/>
143
144                                <entry key="/indicator/contentblocks/*.html"    value-ref="indicatorContentBlocksController"/>
145
146                                <entry key="/indicator/preview/*.html"                  value-ref="indicatorPreviewController"/>
147                                <entry key="/indicator/view/preview/*.html"             value-ref="indicatorViewPreviewController"/>
148
149                                <!-- Q U E R Y  -->
150                                <entry key="/query/selection/**"                                value-ref="querySelectionController"/>
151                                <entry key="/query/configuration/**"                    value-ref="queryConfigurationController"/>
152                                <entry key="/query/builder/**"                                  value-ref="queryBuilderController"/>
153                                <entry key="/query/submit/**/*.html"                    value-ref="querySubmitController"/>
154                                <entry key="/query/result/**/*.html"                    value-ref="queryResultController"/>
155                                <entry key="/query/result/**/*.xls"                             value-ref="queryResultController"/>     <!-- put here so can plug in Excel specifici controller in the future. -->
156                                <entry key="/query/result/**/*.xml"                             value-ref="queryIBISQResultController"/>       
157                                <entry key="/query/contentblocks/**"                    value-ref="queryResultContentBlocksController"/>
158
159                                <!-- Q U E R Y   D E F I N I T I O N -->
160                                <entry key="/query/definition/list/*"                   value-ref="queryDefinitionListController"/>
161                                <entry key="/query/definition/index/*"                  value-ref="queryDefinitionIndexController"/>
162                                <entry key="/query/definition/detail/*/*"               value-ref="queryDefinitionDetailController"/>
163
164                                <entry key="/query/definition/result/*/*"               value-ref="queryDefinitionResultController"/>
165                                <entry key="/query/definition/builder/*/*"              value-ref="queryDefinitionBuilderController"/>
166                                <entry key="/query/definition/contentblocks/**" value-ref="queryDefinitionResultContentBlocksController"/>
167
168                                <entry key="/query/definition/save"                             value-ref="queryDefinitionSaveController"/>
169                                <entry key="/query/definition/delete/*"                 value-ref="queryDefinitionDeleteController"/>
170                                <entry key="/query/definition/set_apply"                value-ref="queryModuleToApplyQueryDefinitionController"/>
171
172                                <!-- S E C U R E  -->
173                                <entry key="/secure"                                                    value-ref="secureSelectionController"/>
174                                <entry key="/secure/test.jsp"                                   value-ref="secureTestController"/>
175                                <entry key="/secure/selection/*.html"                   value-ref="secureSelectionController"/>
176                                <entry key="/secure/query/selection/**"                 value-ref="secureQuerySelectionController"/>
177                                <entry key="/secure/query/builder/**"                   value-ref="secureQueryBuilderController"/>
178                                <entry key="/secure/query/submit/**/*.html"             value-ref="secureQuerySubmitController"/>
179                                <entry key="/secure/query/result/**/*.html"             value-ref="secureQueryResultController"/>
180                                <entry key="/secure/query/result/**/*.xls"              value-ref="secureQueryResultController"/>
181                                <entry key="/secure/query/result/**/*.xml"              value-ref="secureQueryIBISQResultController"/> 
182                                <entry key="/secure/query/configuration/**"             value-ref="queryConfigurationController"/>
183
184                                <entry key="/secure/query/definition/detail/*/*"        value-ref="secureQueryDefinitionDetailController"/>
185                                <entry key="/secure/query/definition/result/*/*"        value-ref="secureQueryDefinitionResultController"/>
186                                <entry key="/secure/query/definition/builder/*/*"       value-ref="secureQueryDefinitionBuilderController"/>
187
188
189                                <!-- R E P O R T -->
190                                <entry key="/report/*/*/*.html"                                 value-ref="reportIndicatorViewController"/>
191                                <entry key="/report/*/*.html"                                   value-ref="reportHTMLContentController"/>
192
193
194                                <!-- U S E R   P R O F I L E -->
195                                <entry key="/user/Login.html"                                   value-ref="userLoginController"/>
196                                <entry key="/user/Selections.html"                              value-ref="userSelectionsController"/>
197
198                                <entry key="/user/Registration.html"                    value-ref="userEditRegistrationController"/>
199                                <entry key="/user/registration/save"                    value-ref="userSaveRegistrationController"/>
200                                <entry key="/user/registration/verify/**"               value-ref="userVerifyRegistrationController"/>
201
202                                <entry key="/user/Access.html"                                  value-ref="userAccessController"/>
203                                <entry key="/user/status"                                               value-ref="userStatusController"/>
204                                <entry key="/user/access/email"                                 value-ref="userEmailAccessController"/>
205
206
207                                <!-- G E N E R I C   T R A S F O R M A T I O N -->
208                                <!--
209                                        This controller is needed for adhoc system reports to work. 
210                                        At one point it was thought to not enable this controller as
211                                        it could be a potential security risk because it would bypass
212                                        the spring security mechanism.  However, this is NOT the case
213                                        as the controller only can access xml files within its
214                                        configuration limitation or via the xmlURL request parameter. 
215                                        In either case if there were sensitive data in these files
216                                        they should NEVER be placed in a non secured, public facing
217                                        webapp/directory. 
218
219                                        To be safe, it is probably still best to remove this request
220                                        from production deployements.  It should only be enabled for
221                                        local query module development and testing environment where
222                                        the QM developer wants to test their XML files.
223                                -->
224                                <entry key="/view.html"                 value-ref="viewHTTPXMLXSLTRequestParameterController"/>
225
226                                <!-- F I L E   C O N T E N T   S T R E A M E R -->
227                                <entry key="/view/WEB-INF/**"   value-ref="viewAccessDeniedController"/>
228                                <entry key="/view/**"                   value-ref="viewGetFileController"/>
229
230                        </map>
231                </constructor-arg>
232        </bean>
233
234
235        <!--
236                ADOPTER BEAN DEFINITION OVERRIDES AND PROPERTY OVERRIDES
237                This section provides the adopter a mechanism to override bean definitions
238                and property values.  Theses bean definitions should be listed AFTER ALL
239                imported bean files. 
240        -->
241
242        <bean id="siteSpecificPropertyOverrides" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
243                <description>
244                        Defines optional special property file(s) that contain property
245                        overrides.  These differ in that the beanID:propertyName is on the
246                        left side with the right containing the value to be injected into
247                        the bean.  Property files are only able to provide string and numeric
248                        type data values/value overrides.  These property files are optional
249                        and might not want to be/need to be used by an adopter to keep their
250                        configuration files more concise and simpler - the property values
251                        can simply be placed in this file.  Where property files are of
252                        value is when being deployed to different servers where each server
253                        has it's own file path, IBISQ url, JNDI name, etc.
254
255                        The locations define where these override files could be located.
256                        If one exists in all directories then the last definition is the
257                        value that eventually is used.  If the file does not exist the
258                        ignore setting specifies to move on.  If false and a file is not
259                        found then the app will not start. 
260
261                        For local development in MS-Windows put a ibisph-view.properties
262                        property override file in your c:\users\your_username directory.
263                        Only include those values needed to override/supplement your
264                        current settings already specified.
265
266                        IMPORTANT NOTES: If you have the files located outside of the webapp
267                        container you need to make sure that the file privs are setup
268                        correctly.  The ${user.home} is a special environment value that
269                        should work for Windows and Linux - again make sure of file privs.
270
271                        Property files can inject string/numeric property values into an
272                        existing object/defined bean.  Beans files define objects and that
273                        object's properties/dependent objects.
274                </description>
275                <property name="ignoreResourceNotFound" value="true"/>
276                <property name="locations">
277                        <list>
278                                <value>WEB-INF/config/SiteSpecific.properties</value>
279                                <value>file:../nmibis-view.properties</value>
280                                <value>file:${user.home}/nmibis-view.properties</value>
281                        </list>
282                </property>
283        </bean>
284
285
286        <!-- For development use the standard, non caching XSLT transformer.  Default
287                common is the caching version: org.ibisph.xslt.CachedSaxonTransformerFactory.
288        -->
289        <bean id="commonXSLTTransformerFactory" class="net.sf.saxon.TransformerFactoryImpl"/>
290
291
292        <!-- smtp mail mods --> 
293        <bean id="userEmailVerificationService" class="org.ibisph.user.service.EmailAccountAccess">
294                <property name="javaMailSender"  ref="userMailSender"/>
295                <property name="mailMessageFrom" value="NM.Ibis@state.nm.us"/>
296                <property name="mailSubject"     value="NM-IBIS Verification"/>
297                <property name="mailMessageSearchReplaceSignature" value="[VerificationURLSearchSignature]"/>
298                <property name="mailMessageHTML" value="#{userVerificationEmailMessage.string}"/>
299        </bean>
300
301        <bean id="userEmailPasswordService" class="org.ibisph.user.service.EmailAccountAccess">
302                <property name="javaMailSender"  ref="userMailSender"/>
303                <property name="mailMessageFrom" value="NM.Ibis@state.nm.us"/>
304                <property name="mailSubject"     value="NM-IBIS Reset"/>
305                <property name="mailMessageSearchReplaceSignature" value="[Password_SearchReplaceSignature]"/>
306                <property name="mailMessageHTML" value="#{userSendPasswordEmailMessage.string}"/>
307        </bean>
308
309</beans>
310
Note: See TracBrowser for help on using the repository browser.