1   package net.sf.msplice.model;
2   
3   public class TestConfigFactory {
4   
5   	public SpliceConfig createBasicSpliceConfig() throws Exception {
6   		
7   		/*
8           <property name="business" createNew="true">
9               <property name="someProperty" converter="com.ubs.CurrencyConverter">
10                  <default-condition><empty/><default-condition>
11                  <default-value>
12                      <class-field>com.ubs.Currency.DEFAULT_VALUE<class-field>
13                  <default-value>
14                  <view property="view.someProperty" converter="com.ubs.CurrencyConverter">
15                     <default-condition>
16                         <null/>
17                     <default-condition>
18                     <default-value>NOT-AVAILABLE</default-value>
19                  </view>
20              </property> 
21            </property>
22  		 */
23  		
24  		BusinessProperty business = new BusinessProperty();
25  		business.setCreateNew(true);
26  		
27  		BusinessProperty someProperty = new BusinessProperty();
28  		someProperty.setConverter(new CurrencyConverter());
29  		someProperty.setDefaultCondition(new EmptyCondition());
30  		someProperty.setDefaultValue(com.ubs.Currency.DEFAULT_VALUE);
31  		
32  		ViewProperty someViewProperty = new ViewProperty();
33  		someViewProperty.setName("view.someProperty");
34  		someViewProperty.setConverter(new CurrencyConverter());
35  		someViewProperty.setDefaultCondition(new NullCondition());
36  		someViewProperty.setDefaultValue("NOT-AVAILABLE");
37  		
38  		someProperty.setViewProperty(someViewProperty);
39  		
40  	}
41  	
42  }