portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/prefs/src/test/org/apache/jetspeed/prefs/containers test.prefs.groovy
Date Thu, 11 Mar 2004 02:57:25 GMT
dlestrat    2004/03/10 18:57:25

  Modified:    components/prefs/src/test/org/apache/jetspeed/prefs/containers
                        test.prefs.groovy
  Log:
  Finally got a satisfying way to assemble containers and instantiate PreferencesProvider
  during assembly.
  Use getComponentInstanceOfType: Finds a component instance matching the type, looking in
parent if not found in self (unless parent is null).
  
  Revision  Changes    Path
  1.3       +6 -2      jakarta-jetspeed-2/components/prefs/src/test/org/apache/jetspeed/prefs/containers/test.prefs.groovy
  
  Index: test.prefs.groovy
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/prefs/src/test/org/apache/jetspeed/prefs/containers/test.prefs.groovy,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- test.prefs.groovy	10 Mar 2004 22:36:53 -0000	1.2
  +++ test.prefs.groovy	11 Mar 2004 02:57:25 -0000	1.3
  @@ -1,6 +1,7 @@
   import org.picocontainer.defaults.DefaultPicoContainer
   
   import org.apache.jetspeed.components.util.NanoQuickAssembler
  +import org.apache.jetspeed.prefs.impl.PreferencesProviderImpl
   import java.io.File
   
   // WARNING!!!!!!
  @@ -10,7 +11,6 @@
   // in pico.  You need to use Class.forName() instead.
   
   
  -
   // create the root container
   container = new DefaultPicoContainer()
   
  @@ -18,10 +18,14 @@
   
   NanoQuickAssembler.assemble(cl, "org/apache/jetspeed/containers/rdbms.container.groovy",
container)
   
  +NanoQuickAssembler.assemble(cl, "org/apache/jetspeed/containers/persistence.container.groovy",
container)
  +
   //
   // Preferences
   //
  -
   NanoQuickAssembler.assemble(cl, "org/apache/jetspeed/prefs/containers/prefs.container.groovy",
container)
  +
  +// Instantiate the Preferences provider.
  +container.getComponentInstanceOfType(PreferencesProviderImpl)
   
   return container
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message