<?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:flow="http://www.springframework.org/schema/webflow-config"
	xmlns:jee="http://www.springframework.org/schema/jee"
	xmlns:lang="http://www.springframework.org/schema/lang"
	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/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd
		http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
		http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">


	<!-- the application context definition for the SiteWebSpring DispatcherServlet -->

	<bean name="/main.htm" class="org.yacos.web.author.controller.MainController" />
	
	<bean name="/submissionArticleOK.htm" class="org.yacos.web.author.controller.SArticleControllerOK" />
	
	<bean name="/choosePreferenceOK.htm" class="org.yacos.web.PCmember.controller.ChoosePreferenceControllerOK" />
	
	<bean name="/listArticle.htm" class="org.yacos.web.PCmember.controller.ListArticleController">
		<property name="articleManager" ref="articleManager" />
	</bean>
	
	<bean name="/registerUser.htm" class="org.yacos.web.system.controller.SUserRegistrationController">
		<property name="sessionForm" value="true"/>
		<property name="commandName" value="registerUser"/>
		<property name="commandClass" value="org.yacos.web.system.form.FormUser"/>
		<property name="formView" value="registerUser"/>
		<property name="successView" value="listArticle.htm" />
		<property name="usersManager" ref="usersManager" />
	</bean>
	
	<bean name="/submissionArticle.htm" class="org.yacos.web.author.controller.SArticleController">
		<property name="sessionForm" value="true" />
		<property name="commandName" value="submissionArticle" />
		<property name="commandClass" value="org.yacos.web.author.form.FormSubmission" />
		<property name="formView" value="submissionArticle" />
		<property name="successView" value="listArticle.htm" />
		<property name="articleManager" ref="articleManager" />
	</bean>
	
	<bean name="/choosePreference.htm" class="org.yacos.web.PCmember.controller.ChoosePreferenceController">
		<property name="sessionForm" value="true" />
		<property name="commandName" value="choosePreference"/>
		<property name="commandClass" value="org.yacos.web.PCmember.form.FormPreference" />
		<property name="formView" value="choosePreference" />
		<property name="successView" value="choosePreference.htm" />
		<property name="articleManager" ref="articleManager" />
		<property name="usersManager" ref="usersManager" />
	</bean>
	
	<bean name="/dispatchArticle.htm" class="org.yacos.web.PCmember.controller.DispatchArticleController">
		<property name="sessionForm" value="true" />
		<property name="commandName" value="formDispatcher"/>
		<property name="commandClass" value="org.yacos.web.PCmember.form.FormDispatcher" />
		<property name="formView" value="dispatchArticle" />
		<property name="successView" value="dispatchArticle.htm" />
		<property name="articleManager" ref="articleManager" />
	</bean>
	
	<bean name="/addConference5.htm" class="org.yacos.web.chairman.controller.AddConferenceController" />
	<bean name="/addConference4.htm" class="org.yacos.web.chairman.controller.AddConferenceController" />
	<bean name="/addConference3.htm" class="org.yacos.web.chairman.controller.AddConferenceController" />
	<bean name="/addConference2.htm" class="org.yacos.web.chairman.controller.AddConferenceController" />
	<bean name="/addConference.htm" class="org.yacos.web.chairman.controller.AddConferenceController" />
	
	<!-- <bean name="/addConference2.htm" class="org.yacos.web.chairman.controller.AddConferenceController">
		<property name="sessionForm" value="true" />
		<property name="commandName" value="formConference" />
		<property name="commandClass" value="org.yacos.web.chairman.form.FormConference" />
		<property name="formView" value="addConference2" />
		<property name="successView" value="addConference3.htm" />
		<property name="conferenceManager" ref="conferenceManager" />
	</bean>
	
	<bean name="/addConference.htm" class="org.yacos.web.chairman.controller.AddConferenceController">
		<property name="sessionForm" value="true" />
		<property name="commandName" value="formConference" />
		<property name="commandClass" value="org.yacos.web.chairman.form.FormConference" />
		<property name="formView" value="addConference" />
		<property name="successView" value="addConference2.htm" />
		<property name="conferenceManager" ref="conferenceManager" />
	</bean> -->
	
	<!-- List all conference -->
	<bean name="/listConference.htm" class="org.yacos.web.system.controller.ListConferenceController">
		<property name="conferenceManager" ref="conferenceManager" />
	</bean>
	
	<!-- Get chosen conference in session context -->
	<bean name="/chooseConference.htm" class="org.yacos.web.system.controller.ChooseConferenceController">
	</bean>
	
	
	<!-- View Resolver -->
	<bean id="viewResolver"
		class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<property name="viewClass"
			value="org.springframework.web.servlet.view.JstlView">
		</property>
		<property name="prefix" value="/WEB-INF/jsp/"></property>
		<property name="suffix" value=".jsp"></property>
	</bean>
	
	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
		<property name="maxUploadSize" value="10000000" />
	</bean>


	<bean id="messageSource"
		class="org.springframework.context.support.ResourceBundleMessageSource">
		<property name="basename" value="messages" />
	</bean>

	<!-- EJB Services Linking -->
	<jee:jndi-lookup id="articleManager" jndi-name="ArticleManagerBean/remote" cache="true"/>
	<jee:jndi-lookup id="usersManager" jndi-name="UserManagerBean/remote" cache="true"/>
	<jee:jndi-lookup id="conferenceManager" jndi-name="ConferenceManagerBean/remote" cache="true"/>

</beans>