source: raptor-distribution/MSIs/raptor-web/trunk/source/web/conf/web-core.xml @ 1747

Revision 1747, 8.5 KB checked in by rhyssmith, 5 years ago (diff)

Adding raptor-web v1.2.1 MSI sources

  • Property svn:executable set to *
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<beans xmlns="http://www.springframework.org/schema/beans"
3       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4       xsi:schemaLocation="
5           http://www.springframework.org/schema/beans
6           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
7
8        <bean id="webEngine" class="uk.ac.cardiff.raptorweb.engine.RaptorWebEngine" init-method="initialise">
9                <property name="registry"><ref bean="muaRegistry"></ref></property>
10                <property name="reportHandler"><ref bean="reportHandler"></ref></property>
11                <property name="webMetadata"><ref bean="webMetadata"></ref></property>
12        <constructor-arg index="0"><ref bean="serviceEndpointClient"/></constructor-arg>
13        </bean>
14
15    <!-- View Validators -->
16    <bean id="savedGraphWizardModelValidator" class="uk.ac.cardiff.raptorweb.validators.SavedGraphWizardModelValidator"/>
17
18
19        <bean id="setupService" class="uk.ac.cardiff.raptorweb.service.impl.SetupServiceImpl">
20                <property name="webEngine"><ref bean="webEngine"/></property>
21        </bean>
22
23        <bean id="preferenceService" class="uk.ac.cardiff.raptorweb.service.impl.PreferenceServiceImpl">
24
25        </bean>
26   
27    <bean id="juspService" class="uk.ac.cardiff.raptorweb.service.impl.JuspServiceImpl">
28       
29    </bean>
30   
31    <bean id="savedWizardReportsService" class="uk.ac.cardiff.raptorweb.service.impl.SavedWizardReportsServiceImpl">
32        <property name="marshaller" ref="castorMarshaller" />
33        <property name="unmarshaller" ref="castorMarshaller" />
34        <property name="baseDirectory">
35            <value>/</value>
36        </property>
37        <property name="saveDirectory">
38            <value>/reports/</value>
39        </property>
40    </bean>
41   
42    <bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller">
43        <property name="mappingLocation" value="classpath:graph-wizard-mapping.xml" />
44        <property name="whitespacePreserve" value="true"/>
45    </bean>
46   
47    <bean id="
48        graphWizardService " class="uk.ac.cardiff.raptorweb.service.impl.GraphWizardServiceImpl">
49        <property name="webEngine">
50            <ref bean="webEngine" />
51        </property>
52        <property name="chartProcessor">
53            <ref bean="chartProcessor" />
54        </property>
55    </bean>
56   
57    <bean id="eventTypeService" class="uk.ac.cardiff.raptorweb.service.impl.EventTypeServiceImpl">
58        <property name="webEngine"><ref bean="webEngine"/></property>
59        <property name="eventTypeToDisplayMapper" ref="eventTypesToDisplayMapper"/>
60    </bean>
61
62        <bean id="startService" class="uk.ac.cardiff.raptorweb.service.impl.StartServiceImpl">
63                <property name="webEngine"><ref bean="webEngine"/></property>
64        <property name="dashboardStatisticSets" ref="dashboardStatisticsList"/>       
65        </bean>
66
67        <bean id="graphService" class="uk.ac.cardiff.raptorweb.service.impl.GraphServiceImpl">
68                <property name="webEngine"><ref bean="webEngine"/></property>
69                <property name="chartProcessor"><ref bean="chartProcessor"/></property>
70        </bean>
71
72        <!--  SET UP the report generators -->
73        <bean name="reportHandler" class="uk.ac.cardiff.raptorweb.engine.reports.ReportHandler">
74                <property name ="reportConstructors">
75                        <list>
76                                <bean name="excelreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.ExcelReportGenerator">
77                                        <property name="saveDirectory"><value>/downloads/</value></property>
78                                        <property name="baseDirectory"><value>/</value></property> <!-- the above is the absolute path, this is the same but as a relative path-->
79                                </bean>
80                                <bean name="csvreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.CSVReportGenerator">
81                                        <property name="saveDirectory"><value>/downloads/</value></property>
82                                        <property name="baseDirectory"><value>/</value></property> <!-- the above is the absolute path, this is the same but as a relative path-->
83                                </bean>
84                                <bean name="pdfreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.GraphAndChartPDFReportGenerator">
85                                        <property name="saveDirectory"><value>/downloads/</value></property>
86                                        <property name="baseDirectory"><value>/</value></property> <!-- the above is the absolute path, this is the same but as a relative path-->
87                                        <property name="reportBean"><ref bean="genericReportBean"/></property>
88                                        <property name="reportXMLFile"><value>generic-report.xml</value></property>
89                    <property name="eventTypeMapper"><ref bean="eventTypesToDisplayMapper"/></property>
90                                </bean>
91                        </list>
92                </property>
93        </bean>
94
95        <bean name="genericReportBean" class="uk.ac.cardiff.raptorweb.engine.reports.beans.GenericReportBean"/>
96
97    <!-- Set up the chart processor -->
98    <bean name="chartProcessor" class="uk.ac.cardiff.raptorweb.engine.ChartProcessor">
99            <property name="saveDirectory"><value>/graphs/</value></property>
100            <property name="baseDirectory"><value>/</value></property> <!-- the above is the absolute path, this is the same but as a relative path-->
101    </bean>
102   
103     <!-- Set up a background task that removes old graphs used for display only (not saved reports e.g. PDFs) -->
104    <bean id="garbageCollectionService" class="uk.ac.cardiff.raptorweb.service.impl.GarbageCollectionServiceImpl">
105        <property name="graphDirectoryCleaner" ref="graphCleaner"/>
106    </bean>
107   
108    <bean id="graphCleaner" class="uk.ac.cardiff.raptorweb.engine.garbage.GraphDirectoryCleaner">
109        <property name="graphsDirectoryToClean" value="/graphs/"/>
110        <property name="daysBehindToRemoveFrom" value="7"/>
111    </bean>
112   
113    <bean id="garbageCollectionScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
114        <property name="triggers">
115            <list>
116               <ref local="cleanOldGraphsQuickTrigger"/>
117            </list>
118        </property>
119    </bean>
120
121    <bean id="cleanOldGraphsQuickTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
122        <property name="jobDetail">
123            <ref local="cleanOldGraphsJobDetail" />
124        </property>
125        <property name="startDelay" value="10000"/>
126        <property name="repeatInterval" value="18000000"/>
127    </bean>
128
129    <bean id="cleanOldGraphsJobDetail"
130        class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
131        <property name="targetObject">
132            <ref bean="garbageCollectionService" />
133        </property>
134        <property name="targetMethod">
135            <value>cleanOldGraphsDirectory</value>
136        </property>
137        <property name="concurrent">
138            <value>false</value>
139        </property>
140    </bean>
141
142
143        <!-- Set up the start page background stats generator -->
144        <bean id="statsSchedular" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
145                <property name="triggers">
146                        <list>
147                           <ref local="SystemStatsQuickTrigger"/>
148                        </list>
149                </property>
150        </bean>
151
152        <bean id="SystemStatsQuickTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
153                <property name="jobDetail">
154                        <ref local="SystemStatsJobDetail" />
155                </property>
156                <property name="startDelay" value="5000"/>
157                <property name="repeatInterval" value="3600000"/>
158        </bean>
159
160        <bean id="SystemStatsJobDetail"
161                class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
162                <property name="targetObject">
163                        <ref bean="startService" />
164                </property>
165                <property name="targetMethod">
166                        <value>generateStatisticsBackground</value>
167                </property>
168                <property name="concurrent">
169                        <value>false</value>
170                </property>
171        </bean>
172   
173    <!--  handles mapping between event types (Class names) and friendly names to display -->
174    <bean id="eventTypesToDisplayMapper" class="uk.ac.cardiff.raptorweb.model.EventTypeDisplayMapper">
175        <property name="eventTypeFriendlyNameMap">
176            <map>
177                <entry value="OpenAthens LA IdP" key="uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent" />
178                <entry value="Shibboleth IdP" key="uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent"/>
179                <entry value="EZproxy" key="uk.ac.cardiff.model.event.EzproxyAuthenticationEvent"/>
180                <entry value="Shibboleth SP" key="uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent"/>
181                <entry value="Moonshot IdP" key="uk.ac.cardiff.model.event.MoonshotRadiusAuthenticationEvent" />
182                <entry value="Eduroam IdP" key="uk.ac.cardiff.model.event.EduroamRadiusAuthenticationEvent" />
183            </map>
184        </property>
185   
186    </bean>
187
188    <import resource="metadata.xml" />
189    <import resource="mua-endpoints.xml" />
190
191</beans>
Note: See TracBrowser for help on using the repository browser.