1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | |
---|
3 | <!-- |
---|
4 | Spring MVC Dispatcher Servlet URL patterns to Controllers mappings. This |
---|
5 | is a special bean file that is specified for the Dispatcher Servlet via |
---|
6 | a web.xml init param. The servlet processes the beans specified by the |
---|
7 | interface they implement. So the beans can be named anything. |
---|
8 | |
---|
9 | Controller Naming Phiolsophy: Controllers are named generically in hopes of |
---|
10 | limiting the changes that are needed to this file by an adopter. For |
---|
11 | example, to use a different publishing mechanism, an adopter would modify |
---|
12 | the web.xml and load the approp publish*.xml spring application context |
---|
13 | file. The different publish app context spring bean config files would |
---|
14 | have their publishing controllers named the same (what they are named in |
---|
15 | this file) but would use different IBIS classes with different property |
---|
16 | definitions. So different bean configuration files need to have the assoc |
---|
17 | controller samed the same so that this file does not have to be edited |
---|
18 | when an adopter changes publishing mechanisms etc. |
---|
19 | |
---|
20 | This file should be changed/needs to be changed when the URL patterns or |
---|
21 | controllers are different or when an adopter wishes to turn off certain |
---|
22 | features and/or turn on others. In these cases then the mappings need |
---|
23 | to be changed and the adopter should place the file under their config |
---|
24 | management. |
---|
25 | --> |
---|
26 | |
---|
27 | <beans default-lazy-init="false" default-autowire="no" |
---|
28 | xmlns="http://www.springframework.org/schema/beans" |
---|
29 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
---|
30 | xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd" |
---|
31 | > |
---|
32 | |
---|
33 | <!-- see 12.4 Handler mappings for some property options --> |
---|
34 | <bean id="RequestDispatcher.URLToBean.Mapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> |
---|
35 | |
---|
36 | <!-- |
---|
37 | The "alwaysUseFullPath" controls how the servlet matches the URL |
---|
38 | mapping. From the docs: if true use the full path within the current |
---|
39 | servlet context. Else, the path within the current servlet mapping. |
---|
40 | Put another way if true use getRequestURI sans the servlet context |
---|
41 | path prefix to match, else use getPathInfo. |
---|
42 | |
---|
43 | For IBIS-PH the value is set to "true" so that the mapping is a more |
---|
44 | complete explicit URL which can provide a 100% sure and safe mapping |
---|
45 | to the approriate controller. Also, using the full path is easier |
---|
46 | to maintain and understand as the web.xml servlet mappings do not |
---|
47 | impact the URL mapping key. The property value has NO effect on the |
---|
48 | HTTP Request's getPathInfo() or getRequestURI value. However, the |
---|
49 | getPathInfo's value is impacted by the web.xml's SERVLET MAPPINGS. |
---|
50 | --> |
---|
51 | <property name="alwaysUseFullPath" value="true"/> |
---|
52 | <property name="pathMatcher"><bean class="org.springframework.util.AntPathMatcher"/></property> |
---|
53 | |
---|
54 | <!-- |
---|
55 | ORDERING: The best practice is to be order most specific to least. |
---|
56 | --> |
---|
57 | <property name="urlMap"> |
---|
58 | <map> |
---|
59 | <!-- H O M E --> |
---|
60 | <entry key="/home/**" value-ref="Home.HTMLContent.Controller"/> |
---|
61 | |
---|
62 | |
---|
63 | <!-- P U B L I C A T I O N S --> |
---|
64 | <entry key="/publications/index/Chronological.html" value-ref="Publications.ChronologicalIndex.Controller"/> |
---|
65 | <entry key="/publications/index/Topical.html" value-ref="Publications.TopicalIndex.Controller"/> |
---|
66 | <entry key="/publications/**" value-ref="Publications.HTMLContent.Controller"/> |
---|
67 | |
---|
68 | |
---|
69 | <!-- I N D I C A T O R --> |
---|
70 | <entry key="/indicator/index/Alphabetical.html" value-ref="Indicator.AlphabeticalIndex.Controller"/> |
---|
71 | <entry key="/indicator/index/Categorized.html" value-ref="Indicator.CategorizedIndex.Controller"/> |
---|
72 | |
---|
73 | <entry key="/indicator/view/*.html" value-ref="Indicator.View.Controller"/> |
---|
74 | <entry key="/indicator/important_facts/*.html" value-ref="Indicator.ImportantFacts.Controller"/> |
---|
75 | <entry key="/indicator/available_services/*.html" value-ref="Indicator.AvailableServices.Controller"/> |
---|
76 | <entry key="/indicator/related/*/*.html" value-ref="Indicator.RelatedIndicators.Controller"/> |
---|
77 | <entry key="/indicator/other_resources/*.html" value-ref="Indicator.OtherResources.Controller"/> |
---|
78 | <entry key="/indicator/complete_profile/*.html" value-ref="Indicator.CompleteProfile.Controller"/> |
---|
79 | <entry key="/indicator/view_numbers/*.html" value-ref="Indicator.ViewNumbers.Controller"/> |
---|
80 | |
---|
81 | <entry key="/indicator/graphic/**" value-ref="Indicator.ChartGraphic.Controller"/> |
---|
82 | |
---|
83 | <entry key="/indicator/**/*.html" value-ref="Indicator.HTMLContent.Controller"/> |
---|
84 | <entry key="/indicator" value-ref="Indicator.HTMLContent.Controller"/> |
---|
85 | |
---|
86 | |
---|
87 | <!-- Q U E R Y --> |
---|
88 | <entry key="/query/selection/**" value-ref="Query.Selection.Controller"/> |
---|
89 | <entry key="/query/configuration/**" value-ref="Query.Configuration.Controller"/> |
---|
90 | <entry key="/query/builder/**" value-ref="Query.Builder.Controller"/> |
---|
91 | <entry key="/query/submit/**" value-ref="Query.Submit.Controller"/> |
---|
92 | <entry key="/query/result/graphic/Map/**" value-ref="Query.MapGraphic.Controller"/> |
---|
93 | <entry key="/query/result/graphic/**" value-ref="Query.ChartGraphic.Controller"/> |
---|
94 | <entry key="/query/result/**/*.html" value-ref="Query.Result.Controller"/> |
---|
95 | <entry key="/query/result/**/*.xls" value-ref="Query.Result.Controller"/> <!-- put here so can plug in Excel specifici controller in the future. --> |
---|
96 | <entry key="/query/result/**/*.xml" value-ref="Query.IBISQResult.Controller"/> |
---|
97 | |
---|
98 | <entry key="/query/proxy*" value-ref="Query.QueryApplicationProxy.Controller"/> |
---|
99 | |
---|
100 | <entry key="/query/**/*.html" value-ref="Query.HTMLContent.Controller"/> |
---|
101 | <entry key="/query" value-ref="Query.HTMLContent.Controller"/> |
---|
102 | |
---|
103 | |
---|
104 | <!-- Q U E R Y D E F I N I T I O N --> |
---|
105 | <entry key="/query/criteria/List.html" value-ref="QueryDefinition.CriteriaList.Controller"/> |
---|
106 | <entry key="/query/definition/List.html" value-ref="QueryDefinition.DefinitionList.Controller"/> |
---|
107 | <!-- |
---|
108 | IF STICKY then PUT THE CURRENT QUERY DEF INTO THE SESSION ANYTIME ONE IS SELECTED |
---|
109 | |
---|
110 | MAYBE BY DEFINITION YOU SAY SELECTIONS ARE STICKY GOING FORWARD - APPLY ALL GOING |
---|
111 | FORWARD??? NO BECAUSE WHEN POST QM YOU'D HAVE TO CONVERT/UPDATE ETC. |
---|
112 | --> |
---|
113 | |
---|
114 | <entry key="/run/query/definition/**" value-ref="QueryDefinition.RunDefinition.Controller"/> |
---|
115 | <entry key="/edit/query/definition/**" value-ref="QueryDefinition.EditDefinition.Controller"/> |
---|
116 | <entry key="/apply/query/definition/**" value-ref="QueryDefinition.ApplyDefinition.Controller"/> |
---|
117 | <entry key="/delete/query/definition/**" value-ref="QueryDefinition.DeleteDefinition.Controller"/> |
---|
118 | |
---|
119 | <entry key="/edit/query/builder/definition/**" value-ref="QueryDefinition.EditBuilderDefinition.Controller"/> |
---|
120 | <entry key="/edit/query/result/definition/**" value-ref="QueryDefinition.EditResultDefinition.Controller"/> |
---|
121 | <entry key="/save/query/definition/**" value-ref="QueryDefinition.SaveDefinition.Controller"/> |
---|
122 | |
---|
123 | |
---|
124 | |
---|
125 | <!-- run directly with name being specified as a get... |
---|
126 | <entry key="/query/definition/result/**/*.html" value-ref="QueryDefinition.DefinitionResult.Controller"/> |
---|
127 | <entry key="/query/definition/system/result/**/*.html" value-ref="QueryDefinition.SystemResult.Controller"/> |
---|
128 | --> |
---|
129 | |
---|
130 | <!-- S E C U R E --> |
---|
131 | <entry key="/secure/selection/*.html" value-ref="Secure.Selection.Controller"/> |
---|
132 | <entry key="/secure/query/selection/**" value-ref="Secure.Query.Selection.Controller"/> |
---|
133 | <entry key="/secure/query/builder/**" value-ref="Secure.Query.Builder.Controller"/> |
---|
134 | <entry key="/secure/query/submit/**" value-ref="Secure.Query.Submit.Controller"/> |
---|
135 | <entry key="/secure/query/result/**/*.html" value-ref="Secure.Query.Result.Controller"/> |
---|
136 | <entry key="/secure/query/result/**/*.xls" value-ref="Query.Result.Controller"/> <!-- put here so can plug in Excel specifici controller in the future. --> |
---|
137 | <entry key="/secure/query/result/**/*.xml" value-ref="Query.IBISQResult.Controller"/> |
---|
138 | <entry key="/secure/query/configuration/**" value-ref="Query.Configuration.Controller"/> |
---|
139 | <entry key="/secure/query/selections" value-ref="User.QuerySelectionList.Controller"/> |
---|
140 | |
---|
141 | <entry key="/secure" value-ref="Secure.Selection.Controller"/> |
---|
142 | |
---|
143 | |
---|
144 | <!-- C O M M U N I T Y --> |
---|
145 | <entry key="/community/snapshot/Builder.html" value-ref="Community.Snapshot.Builder.Controller"/> |
---|
146 | <!-- |
---|
147 | <entry key="/community/snapshot/Report.html" value-ref="Community.Snapshot.Report.Controller"/> |
---|
148 | --> |
---|
149 | <!-- path: graphic/indicator view name/community name/community value.svg --> |
---|
150 | <entry key="/community/highlight/graphic/*/*/*.*" value-ref="Community.Highlight.ChartGraphic.Controller"/> |
---|
151 | |
---|
152 | <entry key="/community/highlight/index/*/*.html" value-ref="Community.Highlight.Index.Controller"/> |
---|
153 | <entry key="/community/highlight/introduction/*/*.html" value-ref="Community.Highlight.Introduction.Controller"/> |
---|
154 | <entry key="/community/highlight/report/*/*.html" value-ref="Community.Highlight.Report.Controller"/> |
---|
155 | <entry key="/community/highlight/*/*/*.html" value-ref="Community.Highlight.Profile.Controller"/> |
---|
156 | <entry key="/community/highlight/**" value-ref="Community.Highlight.Selection.Controller"/> |
---|
157 | |
---|
158 | <entry key="/community/**" value-ref="Community.HTMLContent.Controller"/> |
---|
159 | |
---|
160 | |
---|
161 | <!-- P H O M R E P O R T P A G E S --> |
---|
162 | <entry key="/phom/expanded_view/*.html" value-ref="PHOM.ExpandedView.Controller"/> |
---|
163 | <entry key="/phom/view/*.html" value-ref="PHOM.CondensedView.Controller"/> |
---|
164 | <entry key="/phom/**" value-ref="PHOM.HTMLContent.Controller"/> |
---|
165 | |
---|
166 | |
---|
167 | <!-- P U B L I S H --> |
---|
168 | <!-- default publishing URL mapping that even if direct publishing is |
---|
169 | configured in the admin app does no harm as these URLs are never hit. |
---|
170 | --> |
---|
171 | <entry key="/publish/categorized_index.xml" value-ref="Publish.CategorizedIndex.Controller"/> |
---|
172 | <entry key="/publish/indicator/*.xml" value-ref="Publish.Indicator.Controller"/> |
---|
173 | <entry key="/publish/org_units.xml" value-ref="Publish.OrgUnits.Controller"/> |
---|
174 | |
---|
175 | |
---|
176 | <!-- U S E R P R O F I L E --> |
---|
177 | <entry key="/user/Login.html" value-ref="User.HTMLContent.Controller"/> |
---|
178 | <entry key="/user/AccountAccess.html" value-ref="User.HTMLContent.Controller"/> |
---|
179 | <entry key="/send/user/password" value-ref="User.EmailPassword.Controller"/> |
---|
180 | <entry key="/send/user/verification" value-ref="User.EmailPassword.Controller"/> |
---|
181 | <entry key="/user/Registration.html" value-ref="User.HTMLContent.Controller"/> |
---|
182 | <entry key="/save/user/registration" value-ref="User.SaveRegistration.Controller"/> |
---|
183 | <entry key="/verify/user/registration" value-ref="User.VerifyRegistration.Controller"/> |
---|
184 | <entry key="/edit/user/profile" value-ref="User.EditProfile.Controller"/> |
---|
185 | <entry key="/save/user/profile" value-ref="User.SaveProfile.Controller"/> |
---|
186 | |
---|
187 | <entry key="/user/selection/List.html" value-ref="User.QuerySelectionList.Controller"/> |
---|
188 | |
---|
189 | |
---|
190 | <!-- B L O C K E D R E S O U R C E S --> |
---|
191 | <!-- External URL blocker mapping |
---|
192 | Blocked direct file access URLs. Files that need to be |
---|
193 | blocked from public access can have a general mapping that |
---|
194 | goes to a simple controller that returns a missing resource |
---|
195 | page. This could also be mapped to a general controller |
---|
196 | that simply returns a 404 or 403 error. There are other |
---|
197 | ways to impelment like putting the files within a WEB-INF/* |
---|
198 | subdirectory. Can also be done via a filter (like the |
---|
199 | CheckAllowedRequesterIPAddressFilter) etc. |
---|
200 | --> |
---|
201 | <entry key="/xml/users/**" value-ref="Common.BannedXMLAccess.Controller"/> |
---|
202 | |
---|
203 | |
---|
204 | <!-- O T H E R - G E N E R I C T R A S F O R M A T I O N --> |
---|
205 | <entry key="/view" value-ref="View.Controller"/> |
---|
206 | |
---|
207 | |
---|
208 | <!-- W E L C O M E / I N D E X H A N D L E R --> |
---|
209 | <!-- This mechanism along with the servlet and welcome-file-list |
---|
210 | definitions in the web.xml and servlet spec 2.4 allow for |
---|
211 | a servlet to directly handle an application root request |
---|
212 | (what was a redirect within the index.html file). |
---|
213 | --> |
---|
214 | <entry key="/Welcome" value-ref="Home.HTMLContent.Controller"/> |
---|
215 | <entry key="/" value-ref="Home.HTMLContent.Controller"/> |
---|
216 | |
---|
217 | </map> |
---|
218 | </property> |
---|
219 | </bean> |
---|
220 | |
---|
221 | |
---|
222 | <!-- V I E W R E S O L V E R --> |
---|
223 | <!-- |
---|
224 | For XSLTs, view resolver is NOT needed since the views are beans that |
---|
225 | are passed into the controller. For JSPs, it is needed to properly |
---|
226 | locate the jsp. View resolver messes with the graph request so DO NOT |
---|
227 | implement unless graph views are handled differently. |
---|
228 | <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> |
---|
229 | <property name="prefix" value="/WEB-INF/jsp/"/> |
---|
230 | <property name="suffix" value=".jsp"/> |
---|
231 | </bean> |
---|
232 | --> |
---|
233 | <bean id="RequestDispatcher.BeanName.ViewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver"/> |
---|
234 | |
---|
235 | </beans> |
---|
236 | |
---|