source: raptor-mua/trunk/src/main/conf-default/mua-core.xml @ 1549

Revision 1549, 20.5 KB checked in by philsmart, 6 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk> Licensed under the Apache License, Version 2.0 (the "License");
3    you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
5    IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
6    governing permissions and limitations under the License. -->
7<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8    xmlns:jaxws="http://cxf.apache.org/jaxws"
9    xsi:schemaLocation="
10        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
11        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
12
13
14    <import resource="classpath:META-INF/cxf/cxf.xml" />
15    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
16    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
17
18
19    <!-- WEB SERVICE ENDPOINT INTERFACE (SEI) SETUP -->
20    <jaxws:endpoint id="muaEndpoint" implementor="#muaEndpointInterface" address="/MultiUnitAggregator">
21        <jaxws:serviceFactory>
22            <ref bean='jaxws-and-aegis-service-factory' />
23        </jaxws:serviceFactory>
24
25
26    </jaxws:endpoint>
27
28    <bean id="muaEndpointInterface" class="uk.ac.cardiff.raptormua.wsinterface.impl.MultiUnitAggregatorImpl">
29        <property name="processService">
30            <ref bean="MUAProcess"></ref>
31        </property>
32    </bean>
33
34    <!-- Types of events supported in this system, removing need for reflection (as this becomes to difficult to manage) -->
35    <bean id="registeredConcreteEventTypes" class="uk.ac.cardiff.raptor.registry.EventTypeRegistry">
36        <property name="registeredEventTypes">
37            <list>
38                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
39                    <property name="eventType">
40                        <value type="java.lang.Class">uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent</value>
41                    </property>
42                    <property name="concrete" value="true" />
43                </bean>
44                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
45                    <property name="eventType">
46                        <value type="java.lang.Class">uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent
47                        </value>
48                    </property>
49                    <property name="concrete" value="true" />
50                </bean>
51                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
52                    <property name="eventType">
53                        <value type="java.lang.Class">uk.ac.cardiff.model.event.EzproxyAuthenticationEvent</value>
54                    </property>
55                    <property name="concrete" value="true" />
56                </bean>
57                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
58                    <property name="eventType">
59                        <value type="java.lang.Class">uk.ac.cardiff.model.event.EduroamRadiusAuthenticationEvent</value>
60                    </property>
61                    <property name="concrete" value="true" />
62                </bean>
63                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
64                    <property name="eventType">
65                        <value type="java.lang.Class">uk.ac.cardiff.model.event.AuthenticationEvent</value>
66                    </property>
67                    <property name="concrete" value="false" />
68                </bean>
69                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
70                    <property name="eventType">
71                        <value type="java.lang.Class">uk.ac.cardiff.model.event.Event</value>
72                    </property>
73                    <property name="concrete" value="false" />
74                </bean>
75                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
76                    <property name="eventType">
77                        <value type="java.lang.Class">uk.ac.cardiff.model.event.AggregatedEvent</value>
78                    </property>
79                    <property name="concrete" value="false" />
80                </bean>
81                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
82                    <property name="eventType">
83                        <value type="java.lang.Class">uk.ac.cardiff.model.event.JuspAggregatedEvent</value>
84                    </property>
85                    <property name="concrete" value="true" />
86                </bean>
87                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
88                    <property name="eventType">
89                        <value type="java.lang.Class">uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
90                    </property>
91                    <property name="concrete" value="true" />
92                </bean>
93            </list>
94        </property>
95    </bean>
96   
97    <bean id="statisticTypeRegistry" class="uk.ac.cardiff.raptormua.engine.statistics.XmlConfiguredStatisticTypeRegistry">
98        <property name="statisticTypes">
99            <list>
100                <bean class="uk.ac.cardiff.model.wsmodel.StatisticFunctionType">
101                    <property name="friendlyName" value="CountryEntry" />
102                    <property name="description" value="Counts the entries" />
103                    <property name="statisticClass" value="uk.ac.cardiff.raptormua.engine.statistics.functions.CountEntry" />
104                    <property name="appliesToEventTypes">
105                        <list>
106                            <value>uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent</value>
107                            <value>uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent</value>
108                            <value>uk.ac.cardiff.model.event.EzproxyAuthenticationEvent</value>
109                            <value>uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
110                        </list>
111                    </property>
112                </bean>
113                <bean class="uk.ac.cardiff.model.wsmodel.StatisticFunctionType">
114                    <property name="friendlyName" value="Group By Field" />
115                    <property name="description" value="Groups results by the particular field over the given time interval" />
116                    <property name="statisticClass" value="uk.ac.cardiff.raptormua.engine.statistics.functions.GroupByFrequency" />
117                    <property name="appliesToEventTypes">
118                        <list>
119                            <value>uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent</value>
120                            <value>uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent</value>
121                            <value>uk.ac.cardiff.model.event.EzproxyAuthenticationEvent</value>
122                            <value>uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
123                        </list>
124                    </property>
125                </bean>
126                <bean class="uk.ac.cardiff.model.wsmodel.StatisticFunctionType">
127                    <property name="friendlyName" value="Group Jusp Aggregate Resources" />
128                    <property name="description" value="Groups Jusp Resources together based on Jr1, Jr1a downloads" />
129                    <property name="statisticClass"
130                    value="uk.ac.cardiff.raptormua.engine.statistics.functions.JuspStatisticalFunction" />
131                    <property name="appliesToEventTypes">
132                        <list>
133                            <value>uk.ac.cardiff.model.event.JuspAggregatedEvent</value>
134                        </list>
135                    </property>
136                </bean>
137            </list>
138        </property>
139    </bean>
140
141    <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype" />
142    <bean id="jaxws-and-aegis-service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
143        <property name="dataBinding" ref="aegisBean" />
144        <property name="properties">
145            <map>
146                <entry key="writeXsiType">
147                    <value type="java.lang.Boolean">true</value>
148                </entry>
149                <entry key="overrideTypesList">
150                    <list>
151                        <!-- THIS LIST IS IMPORTANT, it exposes these classes to the aegis XSD creator so we can output the
152                            generic Entry class in lists in the Collector Service Endpoint Class but actually output any of its subclasses. Hence, this
153                            is a way of dealing with inheritence in CXF and aegis -->
154                        <value>uk.ac.cardiff.model.event.AuthenticationEvent</value>
155                        <value>uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent</value>
156                        <value>uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent</value>
157                        <value>uk.ac.cardiff.model.event.EzproxyAuthenticationEvent</value>
158                        <value>uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
159                         <value>uk.ac.cardiff.model.event.AggregatedEvent</value>
160                        <value>uk.ac.cardiff.model.event.JuspAggregatedEvent</value>
161                        <value>uk.ac.cardiff.model.event.EduroamRadiusAuthenticationEvent</value>
162                         <value>uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
163                    </list>
164                </entry>
165            </map>
166        </property>
167    </bean>
168
169    <!-- DONE -->
170
171    <bean id="MUAProcess" class="uk.ac.cardiff.raptormua.service.impl.MUAProcessImpl">
172        <property name="engine">
173            <ref bean="MUAEngine"></ref>
174        </property>
175        <property name="fileUploadEngine">
176            <ref bean="fileUploadFromDirectory" />
177        </property>
178    </bean>
179
180    <bean id="fileUploadFromDirectory" class="uk.ac.cardiff.raptormua.upload.FileUploadEngine">
181        <property name="enabled" value="true" />
182        <property name="uploadDirectories">
183            <list>
184                <bean id="shibUploadDirectory" class="uk.ac.cardiff.raptormua.upload.UploadDirectory">
185                    <property name="allowedFileExtensions">
186                        <list>
187                            <value>txt</value>
188                            <value>log</value>
189                        </list>
190                    </property>
191                    <property name="uploadDirectory" value="/opt/raptor/mua/batchimport/shib2/" />
192                    <property name="eventType">
193                        <value>SHIBBOLETH2</value>
194                    </property>
195                </bean>
196                <bean id="shib13UploadDirectory" class="uk.ac.cardiff.raptormua.upload.UploadDirectory">
197                    <property name="allowedFileExtensions">
198                        <list>
199                            <value>txt</value>
200                            <value>log</value>
201                        </list>
202                    </property>
203                    <property name="uploadDirectory" value="/opt/raptor/mua/batchimport/shib13/" />
204                    <property name="eventType">
205                        <value>SHIBBOLETH13</value>
206                    </property>
207                </bean>
208                <bean id="shibSp24BelowUploadDirectory" class="uk.ac.cardiff.raptormua.upload.UploadDirectory">
209                    <property name="allowedFileExtensions">
210                        <list>
211                            <value>txt</value>
212                            <value>log</value>
213                        </list>
214                    </property>
215                    <property name="uploadDirectory" value="/opt/raptor/mua/batchimport/shibsp_upto24/" />
216                    <property name="eventType">
217                        <value>SHIBBOLETHSP24</value>
218                    </property>
219                </bean>
220                <bean id="ezproxyUploadDirectory" class="uk.ac.cardiff.raptormua.upload.UploadDirectory">
221                    <property name="allowedFileExtensions">
222                        <list>
223                            <value>txt</value>
224                            <value>log</value>
225                        </list>
226                    </property>
227                    <property name="uploadDirectory" value="/opt/raptor/mua/batchimport/ezproxy/" />
228                    <property name="eventType">
229                        <value>EZPROXY</value>
230                    </property>
231                </bean>
232                <bean id="openAthensLa" class="uk.ac.cardiff.raptormua.upload.UploadDirectory">
233                    <property name="allowedFileExtensions">
234                        <list>
235                            <value>txt</value>
236                            <value>log</value>
237                        </list>
238                    </property>
239                    <property name="uploadDirectory" value="/opt/raptor/mua/batchimport/openathensla/" />
240                    <property name="eventType">
241                        <value>OPENATHENSLA</value>
242                    </property>
243                </bean>
244            </list>
245        </property>
246    </bean>
247
248    <!-- this bean config kicks of the singleton engine instance which is then used by all services of the MUA -->
249    <bean id="MUAEngine" class="uk.ac.cardiff.raptormua.engine.MUAEngine">
250        <property name="eventReleaseClient">
251            <ref bean="eventReleaseClient" />
252        </property>
253        <property name="eventTypeRegistry">
254            <ref bean="registeredConcreteEventTypes" />
255        </property>
256        <property name="statisticsHandler">
257            <ref bean="statisticalUnits" />
258        </property>
259        <property name="storageEngine">
260            <ref bean="storageEngine"></ref>
261        </property>
262        <property name="resourceStorageEngine">
263            <ref bean="resourceStorageEngine"></ref>
264        </property>
265        <property name="muaMetadata">
266            <ref bean="MUAMetadata"></ref>
267        </property>
268        <property name="capabilitiesConstructor">
269            <ref bean="capabilitiesConstructor" />
270        </property>
271        <property name="dataAccessRegister">
272            <ref bean="dataAccessRegister"></ref>
273        </property>
274        <property name="maxReleaseEventSize">
275            <value>5000</value>
276        </property> <!-- Max Size is 10000 -->
277    </bean>
278
279    <bean id="capabilitiesConstructor" class="uk.ac.cardiff.raptormua.engine.CapabilitiesConstructor">
280        <property name="statisticsHandler">
281            <ref bean="statisticalUnits" />
282        </property>
283        <property name="storageEngine">
284            <ref bean="storageEngine"></ref>
285        </property>
286        <property name="metadata">
287            <ref bean="MUAMetadata"></ref>
288        </property>
289        <property name="cacheTimeoutMs">
290            <value>1800000</value>
291        </property>
292        <property name="excludeFieldNames">
293            <set>
294                <value>principalName</value>
295                <value>responseId</value>
296                <value>requestId</value>
297                <value>sessionId</value>
298                <value>requesterIp</value>
299                <value>nameIdentifier</value>
300                <value>persistantId</value>
301                <value>eventTime</value>
302                <value>eventId</value>
303                <value>assertionId</value>
304            </set>
305        </property>
306    </bean>
307
308    <bean id="statisticalUnits" class="uk.ac.cardiff.raptormua.engine.statistics.StatisticsHandler">
309        <property name="statisticRegistry">
310            <ref bean="statisticRegistry" />
311        </property>
312        <property name="statisticTypeRegistry">
313            <ref bean="statisticTypeRegistry" />
314        </property>
315   
316    </bean>
317
318    <!-- Handles all statistical units defined -->
319    <bean id="statisticRegistry" class="uk.ac.cardiff.raptormua.engine.statistics.ContextAwareStatisticRegistry">
320        <property name="automaticallyFindStatsiticsToLoad" value="true" />
321        <property name="processorRegistry">
322            <ref bean="processorRegistry" />
323        </property>
324    </bean>
325
326
327
328    <bean id="eventReleaseEngine" class="uk.ac.cardiff.raptor.remoting.client.EventReleaseEngine">
329        <property name="attributeFilterEngine">
330            <ref bean="attributeFilterEngine" />
331        </property>
332        <property name="serviceEndpointInterface">
333            <ref bean="serviceEndpointInterface" />
334        </property>
335    </bean>
336
337    <bean id="attributeFilterEngine" class="uk.ac.cardiff.raptor.attribute.filtering.AttrributeFilterEngine" />
338
339
340    <!-- release trigger setup -->
341    <bean id="muaReleaseQuickTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
342        <property name="jobDetail">
343            <ref bean="muaReleaseJobDetail" />
344        </property>
345        <property name="startDelay" value="60000" />
346        <property name="repeatInterval" value="60000" />
347    </bean>
348
349    <bean id="muaReleaseJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
350        <property name="targetObject">
351            <ref bean="MUAProcess" />
352        </property>
353        <property name="targetMethod">
354            <value>release</value>
355        </property>
356        <property name="concurrent">
357            <value>false</value>
358        </property>
359    </bean>
360
361    <!-- large file upload trigger -->
362    <bean id="muaFileUploadQuickTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
363        <property name="jobDetail">
364            <ref bean="muaFileUplaodJobDetail" />
365        </property>
366        <property name="startDelay" value="10000" />
367        <property name="repeatInterval" value="60000" />
368    </bean>
369
370    <bean id="muaFileUplaodJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
371        <property name="targetObject">
372            <ref bean="MUAProcess" />
373        </property>
374        <property name="targetMethod">
375            <value>uploadFromDirectory</value>
376        </property>
377        <property name="concurrent">
378            <value>false</value>
379        </property>
380    </bean>
381
382    <!-- Trigger setup -->
383    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
384        <property name="triggers">
385            <list>
386                <ref bean="muaReleaseQuickTrigger" />
387                <ref bean="muaFileUploadQuickTrigger" />
388            </list>
389        </property>
390    </bean>
391    <!-- DONE -->
392
393    <!-- Create the storage engine and entry handler -->
394    <bean name="storageEngine" class="uk.ac.cardiff.raptor.store.DefaultEventStorageEngine">
395        <property name="eventHandler">
396            <ref bean="persistantEventHandler" />
397        </property>
398        <property name="attributeAssociationEngine">
399            <ref bean="attributeAssociationEngine"></ref>
400        </property>
401    </bean>
402
403    <bean name="resourceStorageEngine" class="uk.ac.cardiff.raptor.store.DefaultResourceStorageEngine">
404        <property name="dataConnection">
405            <ref bean="dataConnectionImpl" />
406        </property>
407    </bean>
408
409
410
411    <bean name="persistantEventHandler" class="uk.ac.cardiff.raptor.store.impl.PersistantEventHandler">
412        <constructor-arg index="0">
413            <ref bean="dataConnectionImpl"></ref>
414        </constructor-arg>
415        <property name="optimiseCountQueries">
416            <value>true</value>
417        </property>
418        <property name="countClassNames">
419            <list>
420                <value>ShibbolethIdpAuthenticationEvent</value>
421                <value>EzproxyAuthenticationEvent</value>
422                <value>ShibbolethSpAuthenticationEvent</value>
423            </list>
424        </property>
425    </bean>
426
427    <bean name="dataConnectionImpl" class="uk.ac.cardiff.raptor.store.dao.DefaultDataConnection">
428        <property name="sessionFactory" ref="muaSessionFactory" />
429    </bean>
430
431    <!-- Load all other bean definitions -->
432
433    <import resource="database.xml" />
434    <import resource="metadata.xml" />
435    <import resource="statistical-units-custom.xml" />
436    <import resource="event-release.xml" />
437    <import resource="users.xml" />
438    <import resource="attribute-association.xml" />
439    <import resource="batch-event-parse.xml" />
440    <import resource="statistical-units-system.xml" />
441    <import resource="statistical-processors.xml" />
442
443</beans>
Note: See TracBrowser for help on using the repository browser.