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

Last change on this file since 17716 was 17716, checked in by GarthBraithwaite_STG, 9 months ago

db, admin, view, java - Added INITIATIVE GOAL and BASELINE values to the db and beans. Added ability to publish the raw INITs. Added updated kendo code to deal with some charts not expanding to 100% when contained within a hidden block. Also added window event to resize the chart. Fixed chart title adding mult \n when grid sort clicked. Added inputOnChangeAttribute to the ContentContainer?.xslt to allow js event handling on expand/collapse. Updated IP and QM result script generations to be similar.

File size: 15.2 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="publishInitiativesFilePathAndName" class="org.ibisph.model.StringHolder">     
58                <constructor-arg value="initiatives.xml"/>
59        </bean>
60        <bean id="publishMapsFilePathAndName" class="org.ibisph.model.StringHolder">   
61                <constructor-arg value="maps.xml"/>
62        </bean>
63        <bean id="publishMeasuresFilePathAndName" class="org.ibisph.model.StringHolder">       
64                <constructor-arg value="measures.xml"/>
65        </bean>
66        <bean id="publishOrgUnitsFilePathAndName" class="org.ibisph.model.StringHolder">       
67                <constructor-arg value="org_units.xml"/>
68        </bean>
69        <bean id="publishTopicsFilePathAndName" class="org.ibisph.model.StringHolder"> 
70                <constructor-arg value="topics.xml"/>
71        </bean>
72        <bean id="publishValueAttributesFilePathAndName" class="org.ibisph.model.StringHolder"> 
73                <constructor-arg value="value_attributes.xml"/>
74        </bean>
75        <bean id="publishValueTypesFilePathAndName" class="org.ibisph.model.StringHolder">     
76                <constructor-arg value="value_types.xml"/>
77        </bean>
78
79        <bean id="publishPublishedIndicatorsFilePathAndName" class="org.ibisph.model.StringHolder">
80                <description>used by indicator indexes</description>
81                <constructor-arg value="indicator/published_indicators.xml"/>
82        </bean>
83        <bean id="publishIndicatorProfileFilePath" class="org.ibisph.model.StringHolder">
84                <constructor-arg value="xml/indicator/profile"/>
85        </bean>
86
87        <bean id="publishIndicatorProfileXMLBasePathURL" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
88                <property name="targetObject" ref="commonContextAndPathService"/>
89                <property name="targetMethod" value="getPathURL"/>
90                <property name="arguments"><list><value>#{commonContentBasePath.string}/#{publishIndicatorProfileFilePath}</value></list></property>
91        </bean>
92
93
94        <!--  S E R V I C E S  -->
95        <bean id="publishDocumentDAOService" class="org.ibisph.xml.service.FileStoredDocumentDAO">
96                <description>
97                        Main file service used to persist non wiki content xml files.
98
99                        XML Text Escaping.  This property controls if the system will escape
100                        known XML reserved characters prior to saving/creating the XML
101                        content.  The default value is true (escape) and is highly
102                        recommended that it be enabled.  Setting this value to false while
103                        using a dumbed down XSLT text block handling template allows HTML
104                        to be embedded within text fields.  It should be noted that any
105                        invalid HTML will break the XML from being able to be generated/
106                        published to the view system.  Also, the [CR] to [BR/] element will
107                        NOT be auto replaced so this will have to be encoded manually
108                        within the text.
109                </description>
110                <property name="basePath">
111                        <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
112                                <property name="targetObject" ref="commonContextAndPathService"/>
113                                <property name="targetMethod" value="getPathURL"/>
114                                <property name="arguments"><list><value>#{commonContentBasePath.string}/xml</value></list></property>
115                        </bean>
116                </property>
117                <property name="outputFormat">
118                        <bean class="org.dom4j.io.OutputFormat" parent="commonWikiXMLOutputFormat">
119                                <description>
120                                        Output format used for publishing.  Defined here because several
121                                        types of publishing beans use this so defined in one spot.
122
123                                        HTML/XML encoding scheme used when creating an XML file and Request
124                                        character encoding.  Both of these should work: "UTF-8", "ISO-8859-1",
125                                        however, UTF-8 had some problems with some data.  ISO-8859-1 is an 8
126                                        bit subset of the 16 bit unicode UTF-8 character set and is used for
127                                        western english characters.
128                                </description>
129                                <property name="trimText" value="true"/>  <!-- cleans up dom4j extra line feeds and white space -->
130                        </bean>
131                </property>
132                <property name="dateFormat"           ref="commonDateFormat"/>
133                <property name="escapeTextWhenSaving" value="true"/>
134        </bean>
135
136        <bean id="publishPublishedIndicatorsXMLService" class="org.ibisph.indicatorprofile.service.PublishedIndicatorsXML">
137                <property name="publishedIndicatorsFilePathAndName" value="#{publishPublishedIndicatorsFilePathAndName.string}"/>
138                <property name="documentDAOService"                 ref="publishDocumentDAOService"/>
139        </bean>
140
141
142        <!-- This method invoke call verifies the existance of the published
143                indicators XML file.  If it does not exist then creates it based on the
144                existing IP XML files.  This is useful for new deployments or if the XML
145                is corrupt etc.  Typically used when the adopter wants to rebuild the
146                XML (1. delete the published IPs XML file, 2. restart the app).  The
147                admin app is responsible to maintain the published IPs XML file via an
148                IP publish request so this call should not be needed.  It is provided as
149                a safety feature that some direct content adopters may want to include.
150        -->
151        <bean id="publishVerifyPublishedIndicatorsXMLFileService" 
152                class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"
153        >
154                <property name="targetObject" ref="publishPublishedIndicatorsXMLService"/>
155                <property name="targetMethod" value="verifyPublishedIndicatorsXMLFile"/>
156        </bean>
157
158
159
160        <!--  C O N T R O L L E R S  -->
161        <bean id="publishDataBeanCollectionToXMLFileProperties" abstract="true">
162                <property name="dataBeanDAOService"   ref="commonDataBeanDAOService"/>
163                <property name="dataBeanToXMLService" ref="commonDataBeanToXMLService"/>
164                <property name="documentDAOService"   ref="publishDocumentDAOService"/>
165        </bean>
166
167        <bean id="publishAncillaryValuesController" 
168                parent="publishDataBeanCollectionToXMLFileProperties" 
169                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
170        >
171                <property name="filePathAndName"         value="#{publishAncillaryValuesFilePathAndName.string}"/>
172                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.AncillaryValue"/>
173                <property name="containerXMLElementName" value="ANCILLARY_VALUES"/>
174        </bean>
175
176        <bean id="publishDataSourcesController" 
177                parent="publishDataBeanCollectionToXMLFileProperties" 
178                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
179        >
180                <property name="filePathAndName"         value="#{publishDataSourcesFilePathAndName.string}"/>
181                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.DataSource"/>
182                <property name="containerXMLElementName" value="DATA_SOURCES"/>
183        </bean>
184
185        <bean id="publishDimensionsController" 
186                parent="publishDataBeanCollectionToXMLFileProperties" 
187                class="org.ibisph.indicatorprofile.springmvc.databean.PublishDimensionsToXMLFileController"
188        >
189                <property name="filePathAndName"         value="#{publishDimensionsFilePathAndName.string}"/>
190        </bean>
191
192        <bean id="publishChartsController" 
193                parent="publishDataBeanCollectionToXMLFileProperties" 
194                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
195        >
196                <property name="filePathAndName"         value="#{publishChartsFilePathAndName.string}"/>
197                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.Chart"/>
198                <property name="containerXMLElementName" value="CHARTS"/>
199        </bean>
200
201        <bean id="publishInitiativesController" class="org.ibisph.indicatorprofile.springmvc.databean.PublishInitiativesToXMLFileController">
202                <property name="initiativeDataBeanToXMLService" ref="initiativeDataBeanToXMLService"/>
203                <property name="filePathAndName"    value="#{publishInitiativesFilePathAndName.string}"/>
204                <property name="documentDAOService" ref="publishDocumentDAOService"/>
205        </bean>
206
207        <bean id="publishMapsController" 
208                parent="publishDataBeanCollectionToXMLFileProperties" 
209                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
210        >
211                <property name="filePathAndName"         value="#{publishMapsFilePathAndName.string}"/>
212                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.Map"/>
213                <property name="containerXMLElementName" value="MAPS"/>
214        </bean>
215
216        <bean id="publishMeasuresController" 
217                parent="publishDataBeanCollectionToXMLFileProperties" 
218                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
219        >
220                <property name="filePathAndName"         value="#{publishMeasuresFilePathAndName.string}"/>
221                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.Measure"/>
222                <property name="containerXMLElementName" value="MEASURES"/>
223        </bean>
224
225        <bean id="publishOrgUnitsController" 
226                parent="publishDataBeanCollectionToXMLFileProperties" 
227                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
228        >
229                <property name="filePathAndName"         value="#{publishOrgUnitsFilePathAndName.string}"/>
230                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.OrgUnit"/>
231                <property name="containerXMLElementName" value="ORG_UNITS"/>
232        </bean>
233
234        <bean id="publishValueAttributesController" 
235                parent="publishDataBeanCollectionToXMLFileProperties" 
236                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
237        >
238                <property name="filePathAndName"         value="#{publishValueAttributesFilePathAndName.string}"/>
239                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.ValueAttribute"/>
240                <property name="containerXMLElementName" value="VALUE_ATTRIBUTES"/>
241        </bean>
242
243        <bean id="publishValueTypesController" 
244                parent="publishDataBeanCollectionToXMLFileProperties" 
245                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
246        >
247                <property name="filePathAndName"         value="#{publishValueTypesFilePathAndName.string}"/>
248                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.ValueType"/>
249                <property name="containerXMLElementName" value="VALUE_TYPES"/>
250        </bean>
251
252        <bean id="publishTopicsController" 
253                parent="publishDataBeanCollectionToXMLFileProperties" 
254                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
255        >
256                <property name="filePathAndName"         value="#{publishTopicsFilePathAndName.string}"/>
257                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.Topic"/>
258                <property name="containerXMLElementName" value="TOPICS"/>
259        </bean>
260
261        <bean id="publishIndicatorSetsController" 
262                parent="publishDataBeanCollectionToXMLFileProperties" 
263                class="org.ibisph.databean.springmvc.PublishCollectionToXMLFileController"
264        >
265                <property name="filePathAndName"         value="#{publishIndicatorSetsFilePathAndName.string}"/>
266                <property name="dataBeanClassName"       value="org.ibisph.indicatorprofile.databean.IndicatorSet"/>
267                <property name="containerXMLElementName" value="INDICATOR_SETS"/>
268                <property name="primrayKeyFieldName" value="NAME"/>
269
270                <property name="childDataBeanClassName"  value="org.ibisph.indicatorprofile.databean.IndicatorToIndicatorSet"/>
271                <property name="childParentKeyFieldName" value="INDICATOR_SET_NAME"/>
272                <property name="childDataBeanCollectionFieldName" value="INDICATOR_TO_INDICATOR_SETS"/>
273        </bean>
274
275
276        <bean id="publishIndicatorToXMLFileProperties" abstract="true">
277                <property name="dataBeanDAOService"            ref="commonDataBeanDAOService"/>
278                <property name="indicatorDataBeanToXMLService" ref="indicatorDataBeanToXMLService"/>
279                <property name="indicatorViewDataBeanToXMLService" ref="indicatorViewDataBeanToXMLService"/>
280                <property name="publishedIndicatorsXMLService" ref="publishPublishedIndicatorsXMLService"/>
281                <property name="documentDAOService">
282                        <bean class="org.ibisph.xml.service.FileStoredDocumentDAO">
283                                <description>
284                                        Main file service used to persist IP xml files.  This differs
285                                        from the standard XML output simply in pretty printing and
286                                        escaping.
287                                </description>
288                                <property name="basePath"     ref="publishIndicatorProfileXMLBasePathURL"/>
289                                <property name="outputFormat" ref="commonWikiXMLOutputFormat"/>
290                                <property name="dateFormat"   ref="commonDateFormat"/>
291                                <property name="escapeTextWhenSaving" value="true"/>
292                        </bean>
293                </property>
294        </bean>
295        <bean id="publishIndicatorController"
296                class="org.ibisph.indicatorprofile.springmvc.databean.PublishIndicatorToXMLFileController"
297                parent="publishIndicatorToXMLFileProperties" 
298        />
299        <bean id="publishIndicatorAllApprovedController" 
300                class="org.ibisph.indicatorprofile.springmvc.databean.PublishAllApprovedIndicatorsToXMLFileController"
301                parent="publishIndicatorToXMLFileProperties" 
302        />
303
304</beans>
305
Note: See TracBrowser for help on using the repository browser.