<?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:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
	http://www.springframework.org/schema/context
	http://www.springframework.org/schema/context/spring-context-3.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>

    <!-- Elastic Search -->
    <!--<bean class="org.dspace.statistics.ElasticSearchLoggerEventListener">
        <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>
