<?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-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd"
       default-autowire-candidates="*Service,*DAO,javax.sql.DataSource">

    <context:annotation-config/> <!-- allows us to use spring annotations in beans -->

    <bean class="org.dspace.discovery.SolrServiceImpl"
          id="org.dspace.discovery.SearchService"/>

    <alias name="org.dspace.discovery.SearchService"
           alias="org.dspace.discovery.IndexingService"/>

    <!-- These beans have been added so that we can mock our AuthoritySearchService in the tests-->
    <bean class="org.dspace.authority.MockAuthoritySolrServiceImpl"
          id="org.dspace.authority.AuthoritySearchService"/>
    <alias name="org.dspace.authority.AuthoritySearchService"
           alias="org.dspace.authority.indexer.AuthorityIndexingService"/>

    <bean id="org.dspace.discovery.MockSolrSearchCore"
          class="org.dspace.discovery.MockSolrSearchCore"
          autowire-candidate="true"/>

    <!--<bean class="org.dspace.discovery.SolrServiceIndexOutputPlugin"
          id="solrServiceIndexOutputPlugin"/>-->

    <bean id="solrLoggerService"
          class="org.dspace.statistics.MockSolrLoggerServiceImpl"
          lazy-init="true"/>

    <bean id="org.dspace.statistics.SolrStatisticsCore"
          class="org.dspace.statistics.MockSolrStatisticsCore"
          autowire-candidate="true"/>
    
    <!-- qa events -->
    <bean class="org.dspace.qaevent.MockQAEventService"
          id="org.dspace.qaevent.service.QAEventService" />
          
    <bean class="org.dspace.statistics.GeoIpService" autowire-candidate="true"/>
          
    <!-- suggestion service for solr providers -->
    <bean id="org.dspace.app.suggestion.SolrSuggestionStorageService" class="org.dspace.app.suggestion.MockSolrSuggestionStorageService" />

    <bean id='EmbeddedSolrClientFactory'
          class='org.dspace.statistics.EmbeddedSolrClientFactory'
          autowire-candidate='true'>
        <description>Connection to an embedded Solr instance.</description>
    </bean>

</beans>
