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

	<bean id="templateViewResolverForModularUI"
		class="eu.dnetlib.springutils.stringtemplate.StringTemplateViewResolver"
		p:cache="false" p:contentType="text/html;charset=UTF-8">
		<property name="templateGroup">
			<bean
				class="eu.dnetlib.springutils.stringtemplate.ClassPathStringTemplateGroup"
				p:refreshInterval="0" p:package="eu.dnetlib.functionality.modular.ui.views">
				<constructor-arg type="java.lang.String" value="modularUI" />
			</bean>
		</property>
	</bean>
	
	<bean id="entryPointsAggregator"
		class="eu.dnetlib.functionality.modular.ui.EntryPointsAggregator" />
				
	<bean name="/ui/index.do"
		class="eu.dnetlib.functionality.modular.ui.MainController"
		p:menu="Homepage" p:title="Homepage"
		p:description="Homepage" p:group="Home"
		p:order="1"
		p:groupOrder="1">
		<property name="permissionLevels">
			<set>
				<value>USER</value>
			</set>
		</property>
	</bean>
	
	<bean name="/ui/userDetails.do"
		class="eu.dnetlib.functionality.modular.ui.UserDetailsController"
		p:menu="Homepage" p:title="User Details"
		p:description="User Details" p:group="User Details"
		p:validMenuEntry="false">
		<property name="permissionLevels">
			<set>
				<value>USER</value>
			</set>
		</property>
	</bean>
	
	<bean name="/ui/users.do"
		class="eu.dnetlib.functionality.modular.ui.UsersController"
		p:menu="User authorizations" p:title="User authorizations"
		p:description="User authorizations" p:group="Configuration"
		p:order="10"
		p:groupOrder="99">
		<property name="permissionLevels">
			<set>
				<value>SUPER_ADMIN</value>
			</set>
		</property>
	</bean>
	
	<bean name="/ui/info.do"
		class="eu.dnetlib.functionality.modular.ui.InfoController"
		p:menu="Container configuration details" p:title="Container configuration details"
		p:description="Container configuration details" p:group="Configuration"
		p:order="1"
		p:groupOrder="99"
		p:hostname="${container.hostname}"
		p:port="${container.port}"
		p:context="${container.context}">
		<property name="permissionLevels">
			<set>
				<value>SUPER_ADMIN</value>
			</set>
		</property>
	</bean>
	
	<bean name="/ui/dnetLog.do"
		class="eu.dnetlib.functionality.modular.ui.DnetLogController"
		p:menu="Application logs" p:title="Application logs"
		p:description="Application logs" p:group="Logs"
		p:order="99"
		p:groupOrder="100" >
		<property name="permissionLevels">
			<set>
				<value>SUPER_ADMIN</value>
			</set>
		</property>
	</bean>
	
	<bean name="/ui/properties.do"
		class="eu.dnetlib.functionality.modular.ui.ContainerPropertiesController"
		p:menu="Container properties" p:title="Container properties"
		p:description="Container properties" p:group="Configuration"
		p:order="1"
		p:groupOrder="99" >
		<property name="permissionLevels">
			<set>
				<value>SUPER_ADMIN</value>
			</set>
		</property>
	</bean>
	
	<bean name="/ui/prepareShutdown.do"
		class="eu.dnetlib.functionality.modular.ui.PrepareShutdownController"
		p:menu="Prepare for shutdown" p:title="Prepare for shutdown"
		p:description="Prepare for shutdown" p:group="Configuration"
		p:order="20"
		p:groupOrder="99">
		<property name="permissionLevels">
			<set>
				<value>SUPER_ADMIN</value>
			</set>
		</property>
	</bean>

</beans>
