<?xml version="1.0" encoding="UTF-8"?>
<!--

    The contents of this file are subject to the license and copyright
    detailed in the LICENSE and NOTICE files at the root of the source
    tree and available online at

    http://www.dspace.org/license/

-->
<beans 
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">

    <!-- Acquires the DSpace Utility Class with initialized Service Manager -->
    <bean id="dspace" class="org.dspace.utils.DSpace"/>
    
    <!-- Acquires reference to EventService --> 
    <bean id="dspace.eventService" factory-bean="dspace" factory-method="getEventService"/>

    <!-- Inject the Default LoggerUsageEventListener into the EventService  -->
    <bean class="org.dspace.usage.LoggerUsageEventListener">
    	<property name="eventService" >
    		<ref bean="dspace.eventService"/>
    	</property>
    </bean>
       
    <!-- Inject the SolrLoggerUsageEventListener into the EventService  -->
    <bean class="org.dspace.statistics.SolrLoggerUsageEventListener">
        <property name="eventService" >
            <ref bean="dspace.eventService"/>
        </property>
    </bean>

    <!-- Google Analytics recording  -->
    <bean class="org.dspace.google.GoogleRecorderEventListener">
        <property name="eventService" >
            <ref bean="dspace.eventService"/>
        </property>
    </bean>

    <!-- TabFileUsageEventListener -->
    <!-- Uncomment to enable
    <bean class="org.dspace.usage.TabFileUsageEventListener">
    	<property name="eventService" >
    		<ref bean="dspace.eventService"/>
    	</property>
    </bean>
    -->

    <!-- 
    Uncomment to enable PassiveUsageEventListener
    <bean class="org.dspace.app.statistics.PassiveUsageEventListener">
    	<property name="eventService" >
    		<ref bean="dspace.eventService"/>
    	</property>
    </bean>
     -->
</beans>
