<?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"
	xmlns:condbean="http://dnetlib.eu/springbeans/condbean"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
											http://dnetlib.eu/springbeans/condbean http://dnetlib.eu/springbeans/condbean.xsd">
	<bean name="props"
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
		p:location="classpath:eu/dnetlib/springutils/condbean/ConditionalBeanTest.properties" />
		
	
	<!--  TODO: a real test -->
	<bean name="testAttr" class="eu.dnetlib.springutils.condbean.TestBean" p:value="1"
		condbean:ifdefined="some.existing.property">
		<qualifier value="attributeTest"/>
	</bean>
	
	<condbean:cond test="${some.existing.property}">
		<bean name="testOne" class="eu.dnetlib.springutils.condbean.TestBean"
			p:value="1">
			<qualifier value="elementTest" />
		</bean>
	</condbean:cond>
	
	<condbean:cond test="${some.unexisting.property}">
		<bean name="testOne" class="eu.dnetlib.springutils.condbean.TestBean"
			p:value="2">
			<qualifier value="elementTest" />
		</bean>
	</condbean:cond>
	
	<condbean:cond test="!${some.unexisting.property}">
		<bean name="testTwo" class="eu.dnetlib.springutils.condbean.TestBean"
			p:value="3">
			<qualifier value="elementTest2" />
		</bean>
	</condbean:cond>
	
	<condbean:cond test="!(!${some.existing.property} &amp;&amp; ${some.existing.property} == 3 || 11)" >
		<bean name="testTwo" class="eu.dnetlib.springutils.condbean.TestBean"
			p:value="4">
			<qualifier value="elementTest2" />
		</bean>
	</condbean:cond>
	
	<condbean:cond test="${some.existing.property} and ${some.existing.property} == 'pippo'" >
		<bean name="testThree" class="eu.dnetlib.springutils.condbean.TestBean"
			p:value="5">
			<qualifier value="elementTest3" />
		</bean>
	</condbean:cond>

	<condbean:cond test="${some.existing.property} &amp;&amp; ${some.existing.property} == 3" >
		<bean name="testThree" class="eu.dnetlib.springutils.condbean.TestBean"
			p:value="6">
			<qualifier value="elementTest3" />
		</bean>
	</condbean:cond>
	
	
	
</beans>