source: main/trunk/ibisph-admin/src/main/webapp/WEB-INF/config/spring/publish.xml @ 17645

Last change on this file since 17645 was 17645, checked in by GarthBraithwaite_STG, 4 months ago

db, admin, view, java - db script to get proper IPV titles. More base path type name standardization/cleanup. Simplified IP preview to use paths and controllers and not to rely on the generic XSLT/XML view. Removed unused preview mappings and requests. Removed inherit font from the bold/italic/etc view general.css. Updated IP view and QM builder titles. Updating Java 9+ deprecated warnings.

File size: 14.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4        This file contains bean controller definitions for publishing content
5        directly to XML files.  This mechanism can be used when the admin and view
6        apps exist on the same server or if the admin app and view app have access
7        to a shared/common file server.  Direct file publishing offers several key
8        advantages when compared to the remote publishing mechanism:
9        1) Easiest to configure as no URL addresses are needed to be configured
10           (if remote need to configure both admin and view apps to talk).
11        2) Fast as the controller writes the file directly and does not use the 2
12           phase net request cycle.
13        3) Provides a solution that can be combined with a repository.   
14
15        If the applications are on separate app servers then the remote publishing
16        mechanism should be used.  Note that the dispatcher servlet URL to
17        controller mapping should not need to be touched.  For the admin app the
18        publish controllers are named the same so no changes are needed (nor are any
19        changes needed for the web.xml mappings).  For the view app, the publish
20        controllers are never invoked by the direct file admin publishing objects/
21        controllers so again no need to update those properties or bean definitions
22        (unless a sys admin does not want those objects loaded into memory).
23
24        Direct XML file Publishing Usage:
25        1) make sure that this Spring application context (this bean definition file)
26        is specified in the WEB-INF/web.xml file - in place of remote publishing (it
27        does NOT matter how the view app is configured as this writes directly). 
28        2) adjust XML paths as needed.  IF the admin and view applications are
29        deployed as peers to each other (same directory level) and the view app is
30        deployed as "ibisph-view" then you will not need to edit any of the below
31        paths.  Otherwise edit the path's and system ID's below to match the enviro
32        where you want your admin app to save the published XML files to.
33-->
34
35<beans default-lazy-init="false" default-autowire="no"
36        xmlns="http://www.springframework.org/schema/beans"
37        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
38        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
39>
40
41        <!--  R E S O U R C E S  -->
42        <bean id="publishAncillaryValuesFilePathAndName" class="org.ibisph.model.StringHolder"> 
43                <constructor-arg value="ancillary_values.xml"/>
44        </bean>
45        <bean id="publishChartsFilePathAndName" class="org.ibisph.model.StringHolder"> 
46                <constructor-arg value="charts.xml"/>
47        </bean>
48        <bean id="publishDataSourcesFilePathAndName" class="org.ibisph.model.StringHolder">     
49                <constructor-arg value="data_sources.xml"/>
50        </bean>
51        <bean id="publishDimensionsFilePathAndName" class="org.ibisph.model.StringHolder">     
52                <constructor-arg value="dimensions.xml"/>
53        </bean>
54        <bean id="publishIndicatorSetsFilePathAndName" class="org.ibisph.model.StringHolder">   
55                <constructor-arg value="indicator/indicator_sets.xml"/>
56        </bean>
57        <bean id="publishMapsFilePathAndName" class="org.ibisph.model.StringHolder">   
58                <constructor-arg value="maps.xml"/>
59        </bean>
60        <bean id="publishMeasuresFilePathAndName" class="org.ibisph.model.StringHolder">       
61                <constructor-arg value="measures.xml"/>
62        </bean>
63        <bean id="publishOrgUnitsFilePathAndName" class="org.ibisph.model.StringHolder">       
64                <constructor-arg value="org_units.xml"/>
65        </bean>
66        <bean id="publishTopicsFilePathAndName" class="org.ibisph.model.StringHolder"> 
67                <constructor-arg value="topics.xml"/>
68        </bean>
69        <bean id="publishValueAttributesFilePathAndName" class="org.ibisph.model.StringHolder"> 
70                <constructor-arg value="value_attributes.xml"/>
71        </bean>
72        <bean id="publishValueTypesFilePathAndName" class="org.ibisph.model.StringHolder">     
73                <constructor-arg value="value_types.xml"/>
74        </bean>
75
76        <bean id="publishPublishedIndicatorsFilePathAndName" class="org.ibisph.model.StringHolder">
77                <description>used by indicator indexes</description>
78                <constructor-arg value="indicator/published_indicators.xml"/>
79        </bean>
80        <bean id="publishIndicatorProfileFilePath" class="org.ibisph.model.StringHolder">
81                <constructor-arg value="xml/indicator/profile"/>
82        </bean>
83
84        <bean id="publishIndicatorProfileXMLBasePathURL" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
85                <property name="targetObject" ref="commonContextAndPathService"/>
86                <property name="targetMethod" value="getPathURL"/>
87                <property name="arguments"><list><value>#{commonContentBasePath.string}/#{publishIndicatorProfileFilePath}</value></list></property>
88        </bean>
89
90
91        <!--  S E R V I C E S  -->
92        <bean id="publishDocumentDAOService" class="org.ibisph.xml.service.FileStoredDocumentDAO">
93                <description>
94                        Main file service used to persist non wiki content xml files.
95
96                        XML Text Escaping.  This property controls if the system will escape
97                        known XML reserved characters prior to saving/creating the XML
98                        content.  The default value is true (escape) and is highly
99                        recommended that it be enabled.  Setting this value to false while
100                        using a dumbed down XSLT text block handling template allows HTML
101                        to be embedded within text fields.  It should be noted that any
102                        invalid HTML will break the XML from being able to be generated/
103                        published to the view system.  Also, the [CR] to [BR/] element will
104                        NOT be auto replaced so this will have to be encoded manually
105                        within the text.
106                </description>
107                <property name="basePath">
108                        <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
109                                <property name="targetObject" ref="commonContextAndPathService"/>
110                                <property name="targetMethod" value="getPathURL"/>
111                                <property name="arguments"><list><value>#{commonContentBasePath.string}/xml</value></list></property>
112                        </bean>
113                </property>
114                <property name="outputFormat">
115                        <bean class="org.dom4j.io.OutputFormat" parent="commonWikiXMLOutputFormat">
116                                <description>
117                                        Output format used for publishing.  Defined here because several
118                                        types of publishing beans use this so defined in one spot.
119
120                                        HTML/XML encoding scheme used when creating an XML file and Request
121                                        character encoding.  Both of these should work: "UTF-8", "ISO-8859-1",
122                                        however, UTF-8 had some problems with some data.  ISO-8859-1 is an 8
123                                        bit subset of the 16 bit unicode UTF-8 character set and is used for
124                                        western english characters.
125                                </description>
126                                <property name="trimText" value="true"/>  <!-- cleans up dom4j extra line feeds and white space -->
127                        </bean>
128                </property>
129                <property name="dateFormat"           ref="commonDateFormat"/>
130                <property name="escapeTextWhenSaving" value="true"/>
131        </bean>
132
133        <bean id="publishPublishedIndicatorsXMLService" class="org.ibisph.indicatorprofile.service.PublishedIndicatorsXML">
134                <property name="publishedIndicatorsFilePathAndName" value="#{publishPublishedIndicatorsFilePathAndName.string}"/>
135                <property name="documentDAOService"                 ref="publishDocumentDAOService"/>
136        </bean>
137
138
139        <!-- This method invoke call verifies the existance of the published
140                indicators XML file.  If it does not exist then creates it based on the
141                existing IP XML files.  This is useful for new deployments or if the XML
142                is corrupt etc.  Typically used when the adopter wants to rebuild the
143                XML (1. delete the published IPs XML file, 2. restart the app).  The
144                admin app is responsible to maintain the published IPs XML file via an
145                IP publish request so this call should not be needed.  It is provided as
146                a safety feature that some direct content adopters may want to include.
147        -->
148        <bean id="publishVerifyPublishedIndicatorsXMLFileService" 
149                class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"
150        >
151                <property name="targetObject" ref="publishPublishedIndicatorsXMLService"/>
152                <property name="targetMethod" value="verifyPublishedIndicatorsXMLFile"/>
153        </bean>
154
155
156
157        <!--  C O N T R O L L E R S  -->
158        <bean id="publishDataBeanCollectionToXMLFileProperties" abstract="true">
159                <property name="dataBeanDAOService"   ref="commonDataBeanDAOService"/>
160                <property name="dataBeanToXMLService" ref="commonDataBeanToXMLService"/>
161                <property name="documentDAOService"   ref="publishDocumentDAOService"/>
162        </bean>
163
164        <bean id="publishAncillaryValuesController" 
165                parent="publishDataBeanCollectionToXMLFileProperties" 
166                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
167        >
168                <property name="filePathAndName"         value="#{publishAncillaryValuesFilePathAndName.string}"/>
169                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.AncillaryValue"/>
170                <property name="containerXMLElementName" value="ANCILLARY_VALUES"/>
171        </bean>
172
173        <bean id="publishDataSourcesController" 
174                parent="publishDataBeanCollectionToXMLFileProperties" 
175                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
176        >
177                <property name="filePathAndName"         value="#{publishDataSourcesFilePathAndName.string}"/>
178                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.DataSource"/>
179                <property name="containerXMLElementName" value="DATA_SOURCES"/>
180        </bean>
181
182        <bean id="publishDimensionsController" 
183                parent="publishDataBeanCollectionToXMLFileProperties" 
184                class="org.ibisph.indicatorprofile.springmvc.databean.PublishDimensionsToXMLFileController"
185        >
186                <property name="filePathAndName"    value="#{publishDimensionsFilePathAndName.string}"/>
187        </bean>
188
189        <bean id="publishChartsController" 
190                parent="publishDataBeanCollectionToXMLFileProperties" 
191                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
192        >
193                <property name="filePathAndName"         value="#{publishChartsFilePathAndName.string}"/>
194                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.Chart"/>
195                <property name="containerXMLElementName" value="CHARTS"/>
196        </bean>
197
198        <bean id="publishMapsController" 
199                parent="publishDataBeanCollectionToXMLFileProperties" 
200                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
201        >
202                <property name="filePathAndName"         value="#{publishMapsFilePathAndName.string}"/>
203                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.Map"/>
204                <property name="containerXMLElementName" value="MAPS"/>
205        </bean>
206
207        <bean id="publishMeasuresController" 
208                parent="publishDataBeanCollectionToXMLFileProperties" 
209                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
210        >
211                <property name="filePathAndName"         value="#{publishMeasuresFilePathAndName.string}"/>
212                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.Measure"/>
213                <property name="containerXMLElementName" value="MEASURES"/>
214        </bean>
215
216        <bean id="publishOrgUnitsController" 
217                parent="publishDataBeanCollectionToXMLFileProperties" 
218                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
219        >
220                <property name="filePathAndName"         value="#{publishOrgUnitsFilePathAndName.string}"/>
221                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.OrgUnit"/>
222                <property name="containerXMLElementName" value="ORG_UNITS"/>
223        </bean>
224
225        <bean id="publishValueAttributesController" 
226                parent="publishDataBeanCollectionToXMLFileProperties" 
227                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
228        >
229                <property name="filePathAndName"         value="#{publishValueAttributesFilePathAndName.string}"/>
230                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.ValueAttribute"/>
231                <property name="containerXMLElementName" value="VALUE_ATTRIBUTES"/>
232        </bean>
233
234        <bean id="publishValueTypesController" 
235                parent="publishDataBeanCollectionToXMLFileProperties" 
236                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
237        >
238                <property name="filePathAndName"         value="#{publishValueTypesFilePathAndName.string}"/>
239                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.ValueType"/>
240                <property name="containerXMLElementName" value="VALUE_TYPES"/>
241        </bean>
242
243        <bean id="publishTopicsController" 
244                parent="publishDataBeanCollectionToXMLFileProperties" 
245                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
246        >
247                <property name="filePathAndName"         value="#{publishTopicsFilePathAndName.string}"/>
248                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.Topic"/>
249                <property name="containerXMLElementName" value="TOPICS"/>
250        </bean>
251
252        <bean id="publishIndicatorSetsController" 
253                parent="publishDataBeanCollectionToXMLFileProperties" 
254                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
255        >
256                <property name="filePathAndName"         value="#{publishIndicatorSetsFilePathAndName.string}"/>
257                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.IndicatorSet"/>
258                <property name="containerXMLElementName" value="INDICATOR_SETS"/>
259                <property name="primrayKeyFieldName" value="NAME"/>
260
261                <property name="childDataBeanClassName"  value="org.ibisph.indicatorprofile.databean.IndicatorToIndicatorSet"/>
262                <property name="childParentKeyFieldName" value="INDICATOR_SET_NAME"/>
263                <property name="childDataBeanCollectionFieldName" value="INDICATOR_TO_INDICATOR_SETS"/>
264        </bean>
265
266
267        <bean id="publishIndicatorToXMLFileProperties" abstract="true">
268                <property name="dataBeanDAOService"            ref="commonDataBeanDAOService"/>
269                <property name="indicatorDataBeanToXMLService" ref="indicatorDataBeanToXMLService"/>
270                <property name="indicatorViewDataBeanToXMLService" ref="indicatorViewDataBeanToXMLService"/>
271                <property name="publishedIndicatorsXMLService" ref="publishPublishedIndicatorsXMLService"/>
272                <property name="documentDAOService">
273                        <bean class="org.ibisph.xml.service.FileStoredDocumentDAO">
274                                <description>
275                                        Main file service used to persist IP xml files.  This differs
276                                        from the standard XML output simply in pretty printing and
277                                        escaping.
278                                </description>
279                                <property name="basePath"     ref="publishIndicatorProfileXMLBasePathURL"/>
280                                <property name="outputFormat" ref="commonWikiXMLOutputFormat"/>
281                                <property name="dateFormat"   ref="commonDateFormat"/>
282                                <property name="escapeTextWhenSaving" value="true"/>
283                        </bean>
284                </property>
285        </bean>
286        <bean id="publishIndicatorController"
287                class="org.ibisph.indicatorprofile.springmvc.databean.PublishIndicatorToXMLFileController"
288                parent="publishIndicatorToXMLFileProperties" 
289        />
290        <bean id="publishIndicatorAllApprovedController" 
291                class="org.ibisph.indicatorprofile.springmvc.databean.PublishAllApprovedIndicatorsToXMLFileController"
292                parent="publishIndicatorToXMLFileProperties" 
293        />
294
295</beans>
296
Note: See TracBrowser for help on using the repository browser.