<?xml version="1.0" encoding="UTF-8"?>
<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.app.sherpa.submit.SHERPASubmitConfigurationService"
		id="org.dspace.app.sherpa.submit.SHERPASubmitConfigurationService">
		<property name="issnItemExtractors">
			<list>
				<bean class="org.dspace.app.sherpa.submit.MetadataValueISSNExtractor">
					<property name="metadataList">
						<list>
							<value>dc.identifier.issn</value>
						</list>
					</property>
				</bean>
				<!-- Uncomment this bean if you have SHERPARoMEOJournalTitle enabled
				<bean class="org.dspace.app.sherpa.submit.MetadataAuthorityISSNExtractor">
					<property name="metadataList">
						<list>
							<value>dc.title.alternative</value>
						</list>
					</property>
				</bean>  -->
			</list>
		</property>	
	</bean>

    <!-- during test we need the mock sherpa service everywhere -->
    <alias name="org.dspace.app.sherpa.SHERPAService" alias="org.dspace.app.sherpa.MockSHERPAService"/>
    <bean class="org.dspace.app.sherpa.MockSHERPAService" id="org.dspace.app.sherpa.SHERPAService">
        <property name="maxNumberOfTries" value="3"/>
        <property name="sleepBetweenTimeouts" value="2000"/>
        <property name="timeout" value="5000"/>
    </bean>

    <bean class="org.dspace.app.sherpa.submit.SHERPASubmitService"
          id="org.dspace.app.sherpa.submit.SHERPASubmitService">
        <property name="sherpaService" ref="org.dspace.app.sherpa.MockSHERPAService"/>
        <property name="configuration" ref="org.dspace.app.sherpa.submit.SHERPASubmitConfigurationService"/>
    </bean>

</beans>
