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

Revision 1566, 22.6 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.MoonshotRadiusAuthenticationEvent</value>
66                    </property>
67                    <property name="concrete" value="true" />
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.AuthenticationEvent</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.Event</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.AggregatedEvent</value>
84                    </property>
85                    <property name="concrete" value="false" />
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.JuspAggregatedEvent</value>
90                    </property>
91                    <property name="concrete" value="true" />
92                </bean>
93                <bean class="uk.ac.cardiff.raptor.registry.RegisteredEventType">
94                    <property name="eventType">
95                        <value type="java.lang.Class">uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
96                    </property>
97                    <property name="concrete" value="true" />
98                </bean>
99            </list>
100        </property>
101    </bean>
102   
103    <bean id="statisticTypeRegistry" class="uk.ac.cardiff.raptormua.engine.statistics.XmlConfiguredStatisticTypeRegistry">
104        <property name="statisticTypes">
105            <list>
106                <bean class="uk.ac.cardiff.model.wsmodel.StatisticFunctionType">
107                    <property name="friendlyName" value="CountryEntry" />
108                    <property name="description" value="Counts the entries" />
109                    <property name="statisticClass" value="uk.ac.cardiff.raptormua.engine.statistics.functions.CountEntry" />
110                    <property name="appliesToEventTypes">
111                        <list>
112                            <value>uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent</value>
113                            <value>uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent</value>
114                            <value>uk.ac.cardiff.model.event.EzproxyAuthenticationEvent</value>
115                            <value>uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
116                            <value>uk.ac.cardiff.model.event.MoonshotRadiusAuthenticationEvent</value>
117                            <value>uk.ac.cardiff.model.event.EduroamRadiusAuthenticationEvent</value>
118                        </list>
119                    </property>
120                </bean>
121                <bean class="uk.ac.cardiff.model.wsmodel.StatisticFunctionType">
122                    <property name="friendlyName" value="Group By Field" />
123                    <property name="description" value="Groups results by the particular field over the given time interval" />
124                    <property name="statisticClass" value="uk.ac.cardiff.raptormua.engine.statistics.functions.GroupByFrequency" />
125                    <property name="appliesToEventTypes">
126                        <list>
127                            <value>uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent</value>
128                            <value>uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent</value>
129                            <value>uk.ac.cardiff.model.event.EzproxyAuthenticationEvent</value>
130                            <value>uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
131                            <value>uk.ac.cardiff.model.event.MoonshotRadiusAuthenticationEvent</value>
132                            <value>uk.ac.cardiff.model.event.EduroamRadiusAuthenticationEvent</value>
133                        </list>
134                    </property>
135                </bean>
136                <bean class="uk.ac.cardiff.model.wsmodel.StatisticFunctionType">
137                    <property name="friendlyName" value="Group Jusp Aggregate Resources" />
138                    <property name="description" value="Groups Jusp Resources together based on Jr1, Jr1a downloads" />
139                    <property name="statisticClass"
140                    value="uk.ac.cardiff.raptormua.engine.statistics.functions.JuspStatisticalFunction" />
141                    <property name="appliesToEventTypes">
142                        <list>
143                            <value>uk.ac.cardiff.model.event.JuspAggregatedEvent</value>
144                        </list>
145                    </property>
146                </bean>
147            </list>
148        </property>
149    </bean>
150
151    <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype" />
152    <bean id="jaxws-and-aegis-service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
153        <property name="dataBinding" ref="aegisBean" />
154        <property name="properties">
155            <map>
156                <entry key="writeXsiType">
157                    <value type="java.lang.Boolean">true</value>
158                </entry>
159                <entry key="overrideTypesList">
160                    <list>
161                        <!-- THIS LIST IS IMPORTANT, it exposes these classes to the aegis XSD creator so we can output the
162                            generic Entry class in lists in the Collector Service Endpoint Class but actually output any of its subclasses. Hence, this
163                            is a way of dealing with inheritence in CXF and aegis -->
164                        <value>uk.ac.cardiff.model.event.AuthenticationEvent</value>
165                        <value>uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent</value>
166                        <value>uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent</value>
167                        <value>uk.ac.cardiff.model.event.EzproxyAuthenticationEvent</value>
168                        <value>uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
169                        <value>uk.ac.cardiff.model.event.EduroamRadiusAuthenticationEvent</value>
170                        <value>uk.ac.cardiff.model.event.MoonshotRadiusAuthenticationEvent</value>
171                        <value>uk.ac.cardiff.model.event.AggregatedEvent</value>
172                        <value>uk.ac.cardiff.model.event.JuspAggregatedEvent</value>
173                        <value>uk.ac.cardiff.model.event.WugenEvent</value>
174                        <value>uk.ac.cardiff.model.event.OpenathenslaAuthenticationEvent</value>
175                    </list>
176                </entry>
177            </map>
178        </property>
179    </bean>
180
181    <!-- DONE -->
182
183    <bean id="MUAProcess" class="uk.ac.cardiff.raptormua.service.impl.MUAProcessImpl">
184        <property name="engine">
185            <ref bean="MUAEngine"></ref>
186        </property>
187        <property name="fileUploadEngine">
188            <ref bean="fileUploadFromDirectory" />
189        </property>
190    </bean>
191
192    <bean id="fileUploadFromDirectory" class="uk.ac.cardiff.raptormua.upload.FileUploadEngine">
193        <property name="enabled" value="true" />
194        <property name="uploadDirectories">
195            <list>
196                <bean id="shibUploadDirectory" 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/shib2/" />
204                    <property name="eventType">
205                        <value>SHIBBOLETH2</value>
206                    </property>
207                </bean>
208                <bean id="shib13UploadDirectory" 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/shib13/" />
216                    <property name="eventType">
217                        <value>SHIBBOLETH13</value>
218                    </property>
219                </bean>
220                <bean id="shibSp24BelowUploadDirectory" 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/shibsp_upto24/" />
228                    <property name="eventType">
229                        <value>SHIBBOLETHSP24</value>
230                    </property>
231                </bean>
232                <bean id="ezproxyUploadDirectory" 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/ezproxy/" />
240                    <property name="eventType">
241                        <value>EZPROXY</value>
242                    </property>
243                </bean>
244                <bean id="openAthensLa" class="uk.ac.cardiff.raptormua.upload.UploadDirectory">
245                    <property name="allowedFileExtensions">
246                        <list>
247                            <value>txt</value>
248                            <value>log</value>
249                        </list>
250                    </property>
251                    <property name="uploadDirectory" value="/opt/raptor/mua/batchimport/openathensla/" />
252                    <property name="eventType">
253                        <value>OPENATHENSLA</value>
254                    </property>
255                </bean>
256                <bean id="moonshotRadius" class="uk.ac.cardiff.raptormua.upload.UploadDirectory">
257                    <property name="allowedFileExtensions">
258                        <list>
259                            <value>txt</value>
260                            <value>log</value>
261                        </list>
262                    </property>
263                    <property name="uploadDirectory" value="/opt/raptor/mua/batchimport/radius-moonshot-idp/" />
264                    <property name="eventType">
265                        <value>MOONSHOTRADIUS</value>
266                    </property>
267                </bean>
268                <bean id="eduroamRadius" class="uk.ac.cardiff.raptormua.upload.UploadDirectory">
269                    <property name="allowedFileExtensions">
270                        <list>
271                            <value>txt</value>
272                            <value>log</value>
273                        </list>
274                    </property>
275                    <property name="uploadDirectory" value="/opt/raptor/mua/batchimport/radius-eduroam-idp/" />
276                    <property name="eventType">
277                        <value>EDUROAMRADIUS</value>
278                    </property>
279                </bean>
280
281            </list>
282        </property>
283    </bean>
284
285    <!-- this bean config kicks of the singleton engine instance which is then used by all services of the MUA -->
286    <bean id="MUAEngine" class="uk.ac.cardiff.raptormua.engine.MUAEngine">
287        <property name="eventReleaseClient">
288            <ref bean="eventReleaseClient" />
289        </property>
290        <property name="eventTypeRegistry">
291            <ref bean="registeredConcreteEventTypes" />
292        </property>
293        <property name="statisticsHandler">
294            <ref bean="statisticalUnits" />
295        </property>
296        <property name="storageEngine">
297            <ref bean="storageEngine"></ref>
298        </property>
299        <property name="resourceStorageEngine">
300            <ref bean="resourceStorageEngine"></ref>
301        </property>
302        <property name="muaMetadata">
303            <ref bean="MUAMetadata"></ref>
304        </property>
305        <property name="capabilitiesConstructor">
306            <ref bean="capabilitiesConstructor" />
307        </property>
308        <property name="dataAccessRegister">
309            <ref bean="dataAccessRegister"></ref>
310        </property>
311        <property name="maxReleaseEventSize">
312            <value>5000</value>
313        </property> <!-- Max Size is 10000 -->
314    </bean>
315
316    <bean id="capabilitiesConstructor" class="uk.ac.cardiff.raptormua.engine.CapabilitiesConstructor">
317        <property name="statisticsHandler">
318            <ref bean="statisticalUnits" />
319        </property>
320        <property name="storageEngine">
321            <ref bean="storageEngine"></ref>
322        </property>
323        <property name="metadata">
324            <ref bean="MUAMetadata"></ref>
325        </property>
326        <property name="cacheTimeoutMs">
327            <value>1800000</value>
328        </property>
329        <property name="excludeFieldNames">
330            <set>
331                <value>principalName</value>
332                <value>responseId</value>
333                <value>requestId</value>
334                <value>sessionId</value>
335                <value>requesterIp</value>
336                <value>nameIdentifier</value>
337                <value>persistantId</value>
338                <value>eventTime</value>
339                <value>eventId</value>
340                <value>assertionId</value>
341            </set>
342        </property>
343    </bean>
344
345    <bean id="statisticalUnits" class="uk.ac.cardiff.raptormua.engine.statistics.StatisticsHandler">
346        <property name="statisticRegistry">
347            <ref bean="statisticRegistry" />
348        </property>
349        <property name="statisticTypeRegistry">
350            <ref bean="statisticTypeRegistry" />
351        </property>
352   
353    </bean>
354
355    <!-- Handles all statistical units defined -->
356    <bean id="statisticRegistry" class="uk.ac.cardiff.raptormua.engine.statistics.ContextAwareStatisticRegistry">
357        <property name="automaticallyFindStatsiticsToLoad" value="true" />
358        <property name="processorRegistry">
359            <ref bean="processorRegistry" />
360        </property>
361    </bean>
362
363
364
365    <bean id="eventReleaseEngine" class="uk.ac.cardiff.raptor.remoting.client.EventReleaseEngine">
366        <property name="attributeFilterEngine">
367            <ref bean="attributeFilterEngine" />
368        </property>
369        <property name="serviceEndpointInterface">
370            <ref bean="serviceEndpointInterface" />
371        </property>
372    </bean>
373
374    <bean id="attributeFilterEngine" class="uk.ac.cardiff.raptor.attribute.filtering.AttrributeFilterEngine" />
375
376
377    <!-- release trigger setup -->
378    <bean id="muaReleaseQuickTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
379        <property name="jobDetail">
380            <ref bean="muaReleaseJobDetail" />
381        </property>
382        <property name="startDelay" value="60000" />
383        <property name="repeatInterval" value="60000" />
384    </bean>
385
386    <bean id="muaReleaseJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
387        <property name="targetObject">
388            <ref bean="MUAProcess" />
389        </property>
390        <property name="targetMethod">
391            <value>release</value>
392        </property>
393        <property name="concurrent">
394            <value>false</value>
395        </property>
396    </bean>
397
398    <!-- large file upload trigger -->
399    <bean id="muaFileUploadQuickTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
400        <property name="jobDetail">
401            <ref bean="muaFileUplaodJobDetail" />
402        </property>
403        <property name="startDelay" value="10000" />
404        <property name="repeatInterval" value="60000" />
405    </bean>
406
407    <bean id="muaFileUplaodJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
408        <property name="targetObject">
409            <ref bean="MUAProcess" />
410        </property>
411        <property name="targetMethod">
412            <value>uploadFromDirectory</value>
413        </property>
414        <property name="concurrent">
415            <value>false</value>
416        </property>
417    </bean>
418
419    <!-- Trigger setup -->
420    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
421        <property name="triggers">
422            <list>
423                <ref bean="muaReleaseQuickTrigger" />
424                <ref bean="muaFileUploadQuickTrigger" />
425            </list>
426        </property>
427    </bean>
428    <!-- DONE -->
429
430    <!-- Create the storage engine and entry handler -->
431    <bean name="storageEngine" class="uk.ac.cardiff.raptor.store.DefaultEventStorageEngine">
432        <property name="eventHandler">
433            <ref bean="persistantEventHandler" />
434        </property>
435        <property name="attributeAssociationEngine">
436            <ref bean="attributeAssociationEngine"></ref>
437        </property>
438    </bean>
439
440    <bean name="resourceStorageEngine" class="uk.ac.cardiff.raptor.store.DefaultResourceStorageEngine">
441        <property name="dataConnection">
442            <ref bean="dataConnectionImpl" />
443        </property>
444    </bean>
445
446
447
448    <bean name="persistantEventHandler" class="uk.ac.cardiff.raptor.store.impl.PersistantEventHandler">
449        <constructor-arg index="0">
450            <ref bean="dataConnectionImpl"></ref>
451        </constructor-arg>
452        <property name="optimiseCountQueries">
453            <value>true</value>
454        </property>
455        <property name="countClassNames">
456            <list>
457                <value>ShibbolethIdpAuthenticationEvent</value>
458                <value>EzproxyAuthenticationEvent</value>
459                <value>ShibbolethSpAuthenticationEvent</value>
460            </list>
461        </property>
462    </bean>
463
464    <bean name="dataConnectionImpl" class="uk.ac.cardiff.raptor.store.dao.DefaultDataConnection">
465        <property name="sessionFactory" ref="muaSessionFactory" />
466    </bean>
467
468    <!-- Load all other bean definitions -->
469
470    <import resource="database.xml" />
471    <import resource="metadata.xml" />
472    <import resource="statistical-units-custom.xml" />
473    <import resource="event-release.xml" />
474    <import resource="users.xml" />
475    <import resource="attribute-association.xml" />
476    <import resource="batch-event-parse.xml" />
477    <import resource="statistical-units-system.xml" />
478    <import resource="statistical-processors.xml" />
479
480</beans>
Note: See TracBrowser for help on using the repository browser.