<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
	<import resource="commonBeans.xml"/>
	<bean id="securityDatabaseLoaderBean" class="com.hcl.cdp.security.dbcache.DatabaseLoader">
		<constructor-arg index="0" value="/disk1/config/security-dbcache/maps/paramSecurity.map"></constructor-arg>
		<constructor-arg index="1" value="/disk1/config/security-dbcache/maps/cookieSecurity.map"></constructor-arg>
		<constructor-arg index="2" ref="readerBean"></constructor-arg>
		<constructor-arg index="3" ref="mapGenerator"></constructor-arg>
		<constructor-arg index="4">
			<list>
				<value>/disk1/config/security-dbcache/properties/blacklistChars.properties</value>
				<value>/disk1/config/security-dbcache/properties/blacklistWords.properties</value>
				<value>/disk1/config/security-dbcache/properties/paramValueAction.properties</value>
			</list>
		</constructor-arg>
	</bean>
	<bean id="dbCacheLoadSecurityBeanOnce"
		  class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
		<property name="targetObject" ref="securityDatabaseLoaderBean" />
		<property name="targetMethod" value="loadMaps" />
	</bean>
	<bean id="dbCacheSecurityRefreshJob"
		  class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
		<property name="targetObject" ref="securityDatabaseLoaderBean" />
		<property name="targetMethod" value="loadMaps" />
	</bean>
	<bean id="dbCacheSecurityCronTrigger"
		  class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
		<property name="jobDetail" ref="dbCacheSecurityRefreshJob" />
		<property name="cronExpression" value="0 0/5 * * * ?" />
		<property name="startDelay" value="1800000" />
	</bean>

	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="jobDetails">
			<list>
				<ref bean="dbCacheSecurityRefreshJob" />
			</list>
		</property>
		<property name="triggers">
			<list>
				<ref bean="dbCacheSecurityCronTrigger" />
			</list>
		</property>
	</bean>
</beans>