Revision: 1135
Author:   lstreepy
Date:     2006-05-10 15:00:33 -0700 (Wed, 10 May 2006)
ViewCVS:  http://svn.sourceforge.net/spring-rich-c/?rev=1135&view=rev

Log Message:
-----------
Cleanup test failures after application services refactoring.

Modified Paths:
--------------
    
trunk/spring-richclient/support/src/test/java/org/springframework/binding/form/support/PropertyMetadataImplTests.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/binding/support/BeanPropertyAccessStrategyTests.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/binding/value/support/BufferedCollectionValueModelTest.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/binding/value/support/BufferedValueModelTests.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/command/support/ButtonEnablingTests.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/dialog/InputApplicationDialogTests.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/FormGuardTests.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/binding/swing/BindingAbstractTest.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/binding/swing/ListBinderAbstractTest.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/security/DefaultApplicationSecurityManagerTests.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/security/support/DefaultSecurityControllerManagerTests.java
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/test/SpringRichTestCase.java
    
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/dialog/support/generic-application-ctx.xml
    
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-autoconfig-ctx.xml
    
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-configurer-ctx.xml
    
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-ctx.xml
    
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/support/test-security-controller-ctx.xml
Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/form/support/PropertyMetadataImplTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/form/support/PropertyMetadataImplTests.java
       2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/form/support/PropertyMetadataImplTests.java
       2006-05-10 22:00:33 UTC (rev 1135)
@@ -15,28 +15,20 @@
  */
 package org.springframework.binding.form.support;
 
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.springframework.binding.form.PropertyMetadata;
 import org.springframework.binding.support.TestPropertyChangeListener;
 import org.springframework.binding.value.support.ValueHolder;
-import org.springframework.richclient.application.Application;
-import 
org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor;
+import org.springframework.richclient.test.SpringRichTestCase;
 
 /**
  * 
  * @author  Oliver Hutchison
  */
-public class PropertyMetadataImplTests extends TestCase {
+public class PropertyMetadataImplTests extends SpringRichTestCase {
 
-    public final void setUp() {
-        Application.load(null);
-        new Application(new DefaultApplicationLifecycleAdvisor());
-    }
-
     public void testDirtyChangeTrackingOnValueChange() {
         FormModelMediatingValueModel vm = new FormModelMediatingValueModel(new 
ValueHolder("v1"));
         DefaultFormModel fm = new DefaultFormModel(new Object());

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/support/BeanPropertyAccessStrategyTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/support/BeanPropertyAccessStrategyTests.java
      2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/support/BeanPropertyAccessStrategyTests.java
      2006-05-10 22:00:33 UTC (rev 1135)
@@ -21,8 +21,6 @@
 import java.util.List;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.springframework.beans.InvalidPropertyException;
 import org.springframework.beans.NotReadablePropertyException;
 import org.springframework.beans.NotWritablePropertyException;
@@ -32,15 +30,14 @@
 import org.springframework.binding.value.ValueModel;
 import org.springframework.core.closure.Closure;
 import org.springframework.core.closure.support.Block;
-import org.springframework.richclient.application.Application;
-import 
org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor;
+import org.springframework.richclient.test.SpringRichTestCase;
 
 /**
  * Tests class [EMAIL PROTECTED] BeanPropertyAccessStrategy}.
  * 
  * @author Oliver Hutchison
  */
-public class BeanPropertyAccessStrategyTests extends TestCase {
+public class BeanPropertyAccessStrategyTests extends SpringRichTestCase {
 
     private BeanPropertyAccessStrategy pas;
 
@@ -50,9 +47,7 @@
 
     private TestPropertyChangeListener pcl;
 
-    protected void setUp() throws Exception {
-        Application.load(null);
-        new Application(new DefaultApplicationLifecycleAdvisor());
+    protected void doSetUp() throws Exception {
         testBean = new TestBean();
         pas = new BeanPropertyAccessStrategy(testBean);
         pcl = new TestPropertyChangeListener(ValueModel.VALUE_PROPERTY);

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/value/support/BufferedCollectionValueModelTest.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/value/support/BufferedCollectionValueModelTest.java
       2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/value/support/BufferedCollectionValueModelTest.java
       2006-05-10 22:00:33 UTC (rev 1135)
@@ -27,31 +27,23 @@
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import junit.framework.TestCase;
-
 import org.springframework.beans.BeanUtils;
 import org.springframework.binding.support.TestPropertyChangeListener;
 import org.springframework.binding.value.CommitTrigger;
 import org.springframework.binding.value.ValueModel;
-import org.springframework.richclient.application.Application;
-import 
org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor;
+import org.springframework.richclient.test.SpringRichTestCase;
 
 /**
  * Test cases for [EMAIL PROTECTED] BufferedCollectionValueModel}
  *
  * @author oliverh
  */
-public class BufferedCollectionValueModelTest extends TestCase {
+public class BufferedCollectionValueModelTest extends SpringRichTestCase {
 
     private Class[] supportedIterfaces = new Class[] {Collection.class, 
List.class, Set.class, SortedSet.class,};
 
     private Class[] supportedClasses = new Class[] {ArrayList.class, 
HashSet.class, TreeSet.class,};
 
-    public void setUp() {
-        Application.load(null);
-        new Application(new DefaultApplicationLifecycleAdvisor());
-    }
-
     public void testCreating() {
         try {
             getBufferedCollectionValueModel(null, null);

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/value/support/BufferedValueModelTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/value/support/BufferedValueModelTests.java
        2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/binding/value/support/BufferedValueModelTests.java
        2006-05-10 22:00:33 UTC (rev 1135)
@@ -448,7 +448,7 @@
         // Now replace the default value change detector with one that
         // only uses true equivalence.
         ValueChangeDetector oldVCD = 
(ValueChangeDetector)ApplicationServicesLocator.services().getService(ValueChangeDetector.class);
-        getApplicationServices().registerService(new 
StrictEquivalenceValueChangeDetector(), ValueChangeDetector.class);
+        getApplicationServices().setValueChangeDetector(new 
StrictEquivalenceValueChangeDetector());
         testValueChangeSendsProperEvents(null, obj1,   true);
         testValueChangeSendsProperEvents(obj1, null,   true);
         testValueChangeSendsProperEvents(obj1, obj1,   false);
@@ -456,7 +456,7 @@
         testValueChangeSendsProperEvents(obj2a, obj2b, true); 
         testValueChangeSendsProperEvents(null, null,   false);
 
-        getApplicationServices().registerService(oldVCD, 
ValueChangeDetector.class);
+        getApplicationServices().setValueChangeDetector(oldVCD);
     }
 
   

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/command/support/ButtonEnablingTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/command/support/ButtonEnablingTests.java
       2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/command/support/ButtonEnablingTests.java
       2006-05-10 22:00:33 UTC (rev 1135)
@@ -2,13 +2,10 @@
 
 import javax.swing.AbstractButton;
 
-import org.springframework.binding.value.ValueChangeDetector;
 import org.springframework.binding.value.support.EqualsValueChangeDetector;
-import org.springframework.context.support.StaticApplicationContext;
-import org.springframework.richclient.application.Application;
 import org.springframework.richclient.application.ApplicationServicesLocator;
 import 
org.springframework.richclient.application.config.ApplicationObjectConfigurer;
-import 
org.springframework.richclient.application.support.StaticApplicationServices;
+import 
org.springframework.richclient.application.support.DefaultApplicationServices;
 import org.springframework.richclient.command.AbstractCommand;
 import org.springframework.richclient.command.config.CommandFaceDescriptor;
 import org.springframework.richclient.test.SpringRichTestCase;
@@ -17,20 +14,12 @@
 public class ButtonEnablingTests extends SpringRichTestCase
 {
     
-    protected void doSetUp()
-    {
-        // load application
-        StaticApplicationContext applicationContext = new 
StaticApplicationContext();
-        Application.instance().setApplicationContext(applicationContext);
-        applicationContext.refresh();    
-    }
-    
     /**
      * May be implemented in subclasses that need to register services with 
the global
      * application services instance.
      */
-    protected void registerAdditionalServices( StaticApplicationServices 
applicationServices ) {
-        applicationServices.registerService(new EqualsValueChangeDetector(), 
ValueChangeDetector.class);
+    protected void registerAdditionalServices( DefaultApplicationServices 
applicationServices ) {
+        applicationServices.setValueChangeDetector(new 
EqualsValueChangeDetector());
     }
 
     public void testButtonEnabling()

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/dialog/InputApplicationDialogTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/dialog/InputApplicationDialogTests.java
        2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/dialog/InputApplicationDialogTests.java
        2006-05-10 22:00:33 UTC (rev 1135)
@@ -17,10 +17,9 @@
 
 import javax.swing.JTextField;
 
-import 
org.springframework.richclient.application.support.StaticApplicationServices;
+import 
org.springframework.richclient.application.support.DefaultApplicationServices;
 import org.springframework.richclient.test.SpringRichTestCase;
 import org.springframework.rules.Rules;
-import org.springframework.rules.RulesSource;
 import org.springframework.rules.support.DefaultRulesSource;
 
 /**
@@ -31,6 +30,11 @@
 
     private BusinessObject businessObject;
 
+    protected void doSetUp() {
+        // create business object
+        businessObject = new BusinessObject();
+    }
+
     public void testInitialEnabledState() {
         assertEnabledStateReflectsFormModelState(createDialog(businessObject, 
BUSINESS_FIELD));
 
@@ -71,17 +75,12 @@
         assertEnabledStateReflectsFormModelState(dialog);
     }
 
-    protected void doSetUp() {
-        // create business object
-        businessObject = new BusinessObject();
-    }
-
     /**
      * May be implemented in subclasses that need to register services with 
the global
      * application services instance.
      */
-    protected void registerAdditionalServices( StaticApplicationServices 
applicationServices ) {
-        applicationServices.registerService(new BusinessRulesSource(), 
RulesSource.class);
+    protected void registerAdditionalServices( DefaultApplicationServices 
applicationServices ) {
+        applicationServices.setRulesSource(new BusinessRulesSource());
     }
 
     private class BusinessRulesSource extends DefaultRulesSource {

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/FormGuardTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/FormGuardTests.java
       2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/FormGuardTests.java
       2006-05-10 22:00:33 UTC (rev 1135)
@@ -20,11 +20,10 @@
 import javax.swing.JTextField;
 
 import org.springframework.binding.form.ValidatingFormModel;
-import 
org.springframework.richclient.application.support.StaticApplicationServices;
+import 
org.springframework.richclient.application.support.DefaultApplicationServices;
 import org.springframework.richclient.core.Guarded;
 import org.springframework.richclient.test.SpringRichTestCase;
 import org.springframework.rules.Rules;
-import org.springframework.rules.RulesSource;
 import org.springframework.rules.support.DefaultRulesSource;
 
 /**
@@ -115,13 +114,13 @@
      * May be implemented in subclasses that need to register services with 
the global
      * application services instance.
      */
-    protected void registerAdditionalServices( StaticApplicationServices 
applicationServices ) {
+    protected void registerAdditionalServices( DefaultApplicationServices 
applicationServices ) {
         DefaultRulesSource rulesSource = new DefaultRulesSource();
         Rules rules = new Rules(TestBean.class);
         rules.add("field", rules.required());
         rulesSource.addRules(rules);
 
-        applicationServices.registerService(rulesSource, RulesSource.class);
+        applicationServices.setRulesSource(rulesSource);
     }
 
     public void testEnabledState() {

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/binding/swing/BindingAbstractTest.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/binding/swing/BindingAbstractTest.java
    2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/binding/swing/BindingAbstractTest.java
    2006-05-10 22:00:33 UTC (rev 1135)
@@ -15,24 +15,19 @@
  */
 package org.springframework.richclient.form.binding.swing;
 
-import junit.framework.TestCase;
-
 import org.springframework.binding.form.ConfigurableFormModel;
 import org.springframework.binding.form.support.DefaultFormModel;
 import org.springframework.binding.support.TestBean;
 import org.springframework.binding.value.ValueModel;
-import org.springframework.richclient.application.Application;
-import 
org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor;
+import org.springframework.richclient.test.SpringRichTestCase;
 
-public abstract class BindingAbstractTest extends TestCase {
+public abstract class BindingAbstractTest extends SpringRichTestCase {
     
     protected ConfigurableFormModel fm;
 
     protected ValueModel vm;
 
-    public final void setUp() {
-        Application.load(null);
-        new Application(new DefaultApplicationLifecycleAdvisor()); 
+    public void doSetUp() {
         fm = new DefaultFormModel(new TestBean());        
         String property = setUpBinding();
         vm = fm.getValueModel(property);

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/binding/swing/ListBinderAbstractTest.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/binding/swing/ListBinderAbstractTest.java
 2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/form/binding/swing/ListBinderAbstractTest.java
 2006-05-10 22:00:33 UTC (rev 1135)
@@ -30,9 +30,6 @@
 import org.springframework.binding.form.PropertyMetadata;
 import org.springframework.binding.value.ValueModel;
 import org.springframework.binding.value.support.ValueHolder;
-import org.springframework.context.support.StaticApplicationContext;
-import org.springframework.richclient.application.Application;
-import 
org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor;
 import org.springframework.richclient.list.BeanPropertyValueListRenderer;
 /**
  * Tests for ListBinder and ListBinding
@@ -54,11 +51,6 @@
     private JList c;
 
     protected String setUpBinding() {
-        Application.load(null);
-        new Application(new DefaultApplicationLifecycleAdvisor());
-        StaticApplicationContext applicationContext = new 
StaticApplicationContext();
-        Application.instance().setApplicationContext(applicationContext);
-        applicationContext.refresh();
 
         lb = new ListBinder();
         context = new HashMap();

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/security/DefaultApplicationSecurityManagerTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/security/DefaultApplicationSecurityManagerTests.java
   2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/security/DefaultApplicationSecurityManagerTests.java
   2006-05-10 22:00:33 UTC (rev 1135)
@@ -47,6 +47,7 @@
      */
     private void prepareApplication(String ctxFileName) {
         Application.load( null );
+        ApplicationServicesLocator.load(null);
         Application app = new Application( new 
DefaultApplicationLifecycleAdvisor() );
 
         if( ctxFileName != null ) {

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/security/support/DefaultSecurityControllerManagerTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/security/support/DefaultSecurityControllerManagerTests.java
    2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/security/support/DefaultSecurityControllerManagerTests.java
    2006-05-10 22:00:33 UTC (rev 1135)
@@ -86,7 +86,7 @@
         ApplicationSecurityManager securityManager = 
(ApplicationSecurityManager)ApplicationServicesLocator.services().getService(ApplicationSecurityManager.class);
 
         assertFalse( "Object should not be authorized", 
_testAuth1.isAuthorized() );
-        assertEquals( "Object should be updated", _testAuth1.getAuthCount(), 2 
);
+        assertEquals( "Object should be updated", 1, _testAuth1.getAuthCount() 
);
 
         CommandManager cmgr = 
Application.instance().getActiveWindow().getCommandManager();
         ActionCommand cmdWrite = cmgr.getActionCommand( "cmdWrite" );
@@ -105,7 +105,7 @@
         assertFalse( "Object should not be authorized", 
cmdAdmin.isAuthorized() );
         assertFalse( "Object should not be authorized", 
cmdAdminAlias.isAuthorized() );
         assertFalse( "Object should not be authorized", 
_testAuth1.isAuthorized() );
-        assertEquals( "Object should be updated", _testAuth1.getAuthCount(), 3 
);
+        assertEquals( "Object should be updated", 2, _testAuth1.getAuthCount() 
);
 
         // Now login with ROLE_ADMIN
         auth = TestAuthenticationManager.makeAuthentication( "test", "test", 
"ROLE_ADMIN" );
@@ -115,7 +115,7 @@
         assertTrue( "Object should be authorized", cmdAdmin.isAuthorized() );
         assertTrue( "Object should be authorized", 
cmdAdminAlias.isAuthorized() );
         assertTrue( "Object should be authorized", _testAuth1.isAuthorized() );
-        assertEquals( "Object should be updated", _testAuth1.getAuthCount(), 4 
);
+        assertEquals( "Object should be updated", 3, _testAuth1.getAuthCount() 
);
     }
 
     /**

Modified: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/test/SpringRichTestCase.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/test/SpringRichTestCase.java
   2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/test/SpringRichTestCase.java
   2006-05-10 22:00:33 UTC (rev 1135)
@@ -19,15 +19,12 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.binding.value.ValueChangeDetector;
-import org.springframework.binding.value.support.DefaultValueChangeDetector;
-import org.springframework.context.MessageSource;
 import org.springframework.context.support.StaticApplicationContext;
 import org.springframework.context.support.StaticMessageSource;
 import org.springframework.richclient.application.Application;
 import org.springframework.richclient.application.ApplicationServicesLocator;
 import 
org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor;
-import 
org.springframework.richclient.application.support.StaticApplicationServices;
+import 
org.springframework.richclient.application.support.DefaultApplicationServices;
 
 /**
  * Convenient base implementation for Spring Rich test cases; automatically 
configures the
@@ -43,11 +40,12 @@
      */
     protected final Log logger = LogFactory.getLog(getClass());
 
-    protected StaticApplicationServices applicationServices;
+    protected DefaultApplicationServices applicationServices;
 
     protected final void setUp() throws Exception {
         try {
-            applicationServices = new StaticApplicationServices();
+            Application.load(null);
+            applicationServices = new DefaultApplicationServices();
             new ApplicationServicesLocator(applicationServices);
 
             new Application(new DefaultApplicationLifecycleAdvisor());
@@ -68,22 +66,21 @@
     /**
      * Register the application services needed for our tests.
      */
-    protected void registerBasicServices( StaticApplicationServices 
applicationServices ) {
-        applicationServices.registerService(new StaticMessageSource(), 
MessageSource.class);
-        applicationServices.registerService(new DefaultValueChangeDetector(), 
ValueChangeDetector.class);
+    protected void registerBasicServices( DefaultApplicationServices 
applicationServices ) {
+        applicationServices.setMessageSource(new StaticMessageSource());
     }
 
     /**
      * May be implemented in subclasses that need to register services with 
the global
      * application services instance.
      */
-    protected void registerAdditionalServices( StaticApplicationServices 
applicationServices ) {
+    protected void registerAdditionalServices( DefaultApplicationServices 
applicationServices ) {
     }
 
     /**
      * Get the application services instance.
      */
-    protected StaticApplicationServices getApplicationServices() {
+    protected DefaultApplicationServices getApplicationServices() {
         return applicationServices;
     }
 

Modified: 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/dialog/support/generic-application-ctx.xml
===================================================================
--- 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/dialog/support/generic-application-ctx.xml
        2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/dialog/support/generic-application-ctx.xml
        2006-05-10 22:00:33 UTC (rev 1135)
@@ -3,11 +3,20 @@
     "http://www.springframework.org/dtd/spring-beans.dtd";>
 <beans>
 
-    <bean id="applicationObjectConfigurer"
+    <bean id="serviceLocator" 
class="org.springframework.richclient.application.ApplicationServicesLocator">
+        <property name="applicationServices" ref="applicationServices"/>
+    </bean>
+
+    <bean id="applicationServices"
+        
class="org.springframework.richclient.application.support.DefaultApplicationServices">
+        <property name="imageSource" ref="imageSource" />
+        <property name="applicationObjectConfigurerBeanId">
+            <idref bean="applicationObjectConfigurer" />
+        </property>
+    </bean>
+
+    <bean id="applicationObjectConfigurer" depends-on="serviceLocator"
         
class="org.springframework.richclient.application.config.DefaultApplicationObjectConfigurer">
-        <constructor-arg index="0" ref="messageSource" />
-        <constructor-arg index="1" ref="imageSource" />
-        <constructor-arg index="2" ref="iconSource" />
     </bean>
 
     <bean id="messageSource" 
class="org.springframework.context.support.ResourceBundleMessageSource">
@@ -34,8 +43,4 @@
         </property>
     </bean>
 
-    <bean id="iconSource" 
class="org.springframework.richclient.image.DefaultIconSource">
-        <constructor-arg index="0" ref="imageSource" />
-    </bean>
-
 </beans>

Modified: 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-autoconfig-ctx.xml
===================================================================
--- 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-autoconfig-ctx.xml
 2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-autoconfig-ctx.xml
 2006-05-10 22:00:33 UTC (rev 1135)
@@ -8,6 +8,14 @@
       use the defined authentication manager
 -->
  
+<bean id="serviceLocator" 
class="org.springframework.richclient.application.ApplicationServicesLocator">
+    <property name="applicationServices" ref="applicationServices"/>
+</bean>
+
+<bean id="applicationServices"
+    
class="org.springframework.richclient.application.support.DefaultApplicationServices">
+</bean>
+
 <bean id="authenticationManager"
        
class="org.springframework.richclient.security.TestAuthenticationManager"/>
 

Modified: 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-configurer-ctx.xml
===================================================================
--- 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-configurer-ctx.xml
 2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-configurer-ctx.xml
 2006-05-10 22:00:33 UTC (rev 1135)
@@ -3,6 +3,15 @@
        "http://www.springframework.org/dtd/spring-beans.dtd";>
 <beans>
 
+<bean id="serviceLocator" 
class="org.springframework.richclient.application.ApplicationServicesLocator">
+    <property name="applicationServices" ref="applicationServices"/>
+</bean>
+
+<bean id="applicationServices"
+    
class="org.springframework.richclient.application.support.DefaultApplicationServices">
+    <property name="applicationSecurityManager" 
ref="applicationSecurityManager" />
+</bean>
+
 <bean id="applicationSecurityManager"
        
class="org.springframework.richclient.security.support.DefaultApplicationSecurityManager">
        <property name="authenticationManager" ref="authenticationManager"/>

Modified: 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-ctx.xml
===================================================================
--- 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-ctx.xml
    2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/security-test-ctx.xml
    2006-05-10 22:00:33 UTC (rev 1135)
@@ -3,6 +3,15 @@
        "http://www.springframework.org/dtd/spring-beans.dtd";>
 <beans>
 
+<bean id="serviceLocator" 
class="org.springframework.richclient.application.ApplicationServicesLocator">
+    <property name="applicationServices" ref="applicationServices"/>
+</bean>
+
+<bean id="applicationServices"
+    
class="org.springframework.richclient.application.support.DefaultApplicationServices">
+    <property name="applicationSecurityManager" 
ref="applicationSecurityManager"/>
+</bean>
+
 <bean id="applicationSecurityManager"
        
class="org.springframework.richclient.security.support.DefaultApplicationSecurityManager">
        <property name="authenticationManager" ref="authenticationManager"/>

Modified: 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/support/test-security-controller-ctx.xml
===================================================================
--- 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/support/test-security-controller-ctx.xml
 2006-05-10 20:39:19 UTC (rev 1134)
+++ 
trunk/spring-richclient/support/src/test/resources/org/springframework/richclient/security/support/test-security-controller-ctx.xml
 2006-05-10 22:00:33 UTC (rev 1135)
@@ -9,11 +9,21 @@
         
class="org.springframework.richclient.security.support.DefaultSecurityControllerManagerTests$TestApplicationWindow"
         lazy-init="true"/>
         
-    <bean id="applicationObjectConfigurer"
+    <bean id="serviceLocator" 
class="org.springframework.richclient.application.ApplicationServicesLocator">
+        <property name="applicationServices" ref="applicationServices"/>
+    </bean>
+
+    <bean id="applicationServices"
+        
class="org.springframework.richclient.application.support.DefaultApplicationServices">
+        <property name="imageSource" ref="imageSource" />
+        <property name="securityControllerManager" 
ref="securityControllerManager"/>
+        <property name="applicationObjectConfigurerBeanId">
+            <idref bean="applicationObjectConfigurer" />
+        </property>
+    </bean>
+
+    <bean id="applicationObjectConfigurer" depends-on="serviceLocator"
         
class="org.springframework.richclient.application.config.DefaultApplicationObjectConfigurer">
-        <constructor-arg index="0" ref="messageSource" />
-        <constructor-arg index="1" ref="imageSource" />
-        <constructor-arg index="2" ref="iconSource" />
     </bean>
 
     <bean id="messageSource" 
class="org.springframework.context.support.ResourceBundleMessageSource">
@@ -40,10 +50,6 @@
         </property>
     </bean>
 
-    <bean id="iconSource" 
class="org.springframework.richclient.image.DefaultIconSource">
-        <constructor-arg index="0" ref="imageSource" />
-    </bean>
-
     <bean id="authenticationManager"
           
class="org.springframework.richclient.security.TestAuthenticationManager"/>
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
spring-rich-c-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to