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 | <entry key="/query/definition/List.html" value-ref="QueryDefinition.DefinitionList.Controller"/> |
---|
105 | |
---|
106 | <entry key="/query/definition/result/**" value-ref="QueryDefinition.DefinitionResult.Controller"/> |
---|
107 | <entry key="/query/definition/builder/**" value-ref="QueryDefinition.DefinitionBuilder.Controller"/> |
---|
108 | <entry key="/query/criteria/builder/**" value-ref="QueryDefinition.CriteriaBuilder.Controller"/> |
---|
109 | |
---|
110 | <entry key="/query/definition/edit/**" value-ref="QueryDefinition.EditDetail.Controller"/> |
---|
111 | <entry key="/query/definition/save/**" value-ref="QueryDefinition.SaveDetail.Controller"/> |
---|
112 | <entry key="/query/definition/delete" value-ref="QueryDefinition.DeleteDefinition.Controller"/> |
---|
113 | |
---|
114 | <!-- run directly with name being specified as a get... |
---|
115 | <entry key="/query/definition/result/**/*.html" value-ref="QueryDefinition.DefinitionResult.Controller"/> |
---|
116 | <entry key="/query/definition/system/result/**/*.html" value-ref="QueryDefinition.SystemResult.Controller"/> |
---|
117 | --> |
---|
118 | |
---|
119 | <!-- S E C U R E --> |
---|
120 | <entry key="/secure/selection/*.html" value-ref="Secure.Selection.Controller"/> |
---|
121 | <entry key="/secure/query/selection/**" value-ref="Secure.Query.Selection.Controller"/> |
---|
122 | <entry key="/secure/query/builder/**" value-ref="Secure.Query.Builder.Controller"/> |
---|
123 | <entry key="/secure/query/submit/**" value-ref="Secure.Query.Submit.Controller"/> |
---|
124 | <entry key="/secure/query/result/**/*.html" value-ref="Secure.Query.Result.Controller"/> |
---|
125 | <entry key="/secure/query/result/**/*.xls" value-ref="Query.Result.Controller"/> <!-- put here so can plug in Excel specifici controller in the future. --> |
---|
126 | <entry key="/secure/query/result/**/*.xml" value-ref="Query.IBISQResult.Controller"/> |
---|
127 | <entry key="/secure/query/configuration/**" value-ref="Query.Configuration.Controller"/> |
---|
128 | |
---|
129 | <entry key="/secure/MyQueries.html" value-ref="User.QuerySelectionList.Controller"/> |
---|
130 | <entry key="/secure" value-ref="Secure.Selection.Controller"/> |
---|
131 | |
---|
132 | |
---|
133 | <!-- C O M M U N I T Y --> |
---|
134 | <entry key="/community/snapshot/Builder.html" value-ref="Community.Snapshot.Builder.Controller"/> |
---|
135 | <!-- |
---|
136 | <entry key="/community/snapshot/Report.html" value-ref="Community.Snapshot.Report.Controller"/> |
---|
137 | --> |
---|
138 | <!-- path: graphic/indicator view name/community name/community value.svg --> |
---|
139 | <entry key="/community/highlight/graphic/*/*/*.*" value-ref="Community.Highlight.ChartGraphic.Controller"/> |
---|
140 | |
---|
141 | <entry key="/community/highlight/index/*/*.html" value-ref="Community.Highlight.Index.Controller"/> |
---|
142 | <entry key="/community/highlight/introduction/*/*.html" value-ref="Community.Highlight.Introduction.Controller"/> |
---|
143 | <entry key="/community/highlight/report/*/*.html" value-ref="Community.Highlight.Report.Controller"/> |
---|
144 | <entry key="/community/highlight/*/*/*.html" value-ref="Community.Highlight.Profile.Controller"/> |
---|
145 | <entry key="/community/highlight/**" value-ref="Community.Highlight.Selection.Controller"/> |
---|
146 | |
---|
147 | <entry key="/community/**" value-ref="Community.HTMLContent.Controller"/> |
---|
148 | |
---|
149 | |
---|
150 | <!-- P H O M R E P O R T P A G E S --> |
---|
151 | <entry key="/phom/expanded_view/*.html" value-ref="PHOM.ExpandedView.Controller"/> |
---|
152 | <entry key="/phom/view/*.html" value-ref="PHOM.CondensedView.Controller"/> |
---|
153 | <entry key="/phom/**" value-ref="PHOM.HTMLContent.Controller"/> |
---|
154 | |
---|
155 | |
---|
156 | <!-- P U B L I S H --> |
---|
157 | <!-- default publishing URL mapping that even if direct publishing is |
---|
158 | configured in the admin app does no harm as these URLs are never hit. |
---|
159 | --> |
---|
160 | <entry key="/publish/categorized_index.xml" value-ref="Publish.CategorizedIndex.Controller"/> |
---|
161 | <entry key="/publish/indicator/*.xml" value-ref="Publish.Indicator.Controller"/> |
---|
162 | <entry key="/publish/org_units.xml" value-ref="Publish.OrgUnits.Controller"/> |
---|
163 | |
---|
164 | |
---|
165 | <!-- U S E R P R O F I L E --> |
---|
166 | <entry key="/user/Login.html" value-ref="User.HTMLContent.Controller"/> |
---|
167 | <entry key="/user/password/send" value-ref="User.EmailPassword.Controller"/> |
---|
168 | <entry key="/user/NewRegistration.html" value-ref="User.HTMLContent.Controller"/> |
---|
169 | <entry key="/user/registration/save" value-ref="User.SaveRegistration.Controller"/> |
---|
170 | <entry key="/user/registration/verify" value-ref="User.VerifyRegistration.Controller"/> |
---|
171 | <entry key="/user/EditProfile.html" value-ref="User.EditProfile.Controller"/> |
---|
172 | <entry key="/user/profile/save" value-ref="User.SaveProfile.Controller"/> |
---|
173 | |
---|
174 | <entry key="/user/MyQueries.html" value-ref="User.QuerySelectionList.Controller"/> |
---|
175 | |
---|
176 | <!-- external URL blocker mapping --> |
---|
177 | <entry key="/xml/users/**/*.xml" value-ref="Common.BannedXMLAccess.Controller"/> |
---|
178 | |
---|
179 | |
---|
180 | <!-- 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 --> |
---|
181 | <entry key="/view" value-ref="View.Controller"/> |
---|
182 | |
---|
183 | |
---|
184 | <!-- W E L C O M E / I N D E X H A N D L E R --> |
---|
185 | <!-- This mechanism along with the servlet and welcome-file-list |
---|
186 | definitions in the web.xml and servlet spec 2.4 allow for |
---|
187 | a servlet to directly handle an application root request |
---|
188 | (what was a redirect within the index.html file). |
---|
189 | --> |
---|
190 | <entry key="/Welcome" value-ref="Home.HTMLContent.Controller"/> |
---|
191 | <entry key="/" value-ref="Home.HTMLContent.Controller"/> |
---|
192 | |
---|
193 | </map> |
---|
194 | </property> |
---|
195 | </bean> |
---|
196 | |
---|
197 | |
---|
198 | <!-- V I E W R E S O L V E R --> |
---|
199 | <!-- |
---|
200 | For XSLTs, view resolver is NOT needed since the views are beans that |
---|
201 | are passed into the controller. For JSPs, it is needed to properly |
---|
202 | locate the jsp. View resolver messes with the graph request so DO NOT |
---|
203 | implement unless graph views are handled differently. |
---|
204 | <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> |
---|
205 | <property name="prefix" value="/WEB-INF/jsp/"/> |
---|
206 | <property name="suffix" value=".jsp"/> |
---|
207 | </bean> |
---|
208 | --> |
---|
209 | <bean id="RequestDispatcher.BeanName.ViewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver"/> |
---|
210 | |
---|
211 | </beans> |
---|
212 | |
---|