weaver      2004/04/22 14:11:41

  Modified:    components/prefs/src/java/META-INF Tag:
                        NANOCONTAINER_DEPLOYER nanocontainer.groovy
  Log:
  - Uses ChildAwareContainer

  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.2   +8 -22     
jakarta-jetspeed-2/components/prefs/src/java/META-INF/Attic/nanocontainer.groovy
  
  Index: nanocontainer.groovy
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/components/prefs/src/java/META-INF/Attic/nanocontainer.groovy,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- nanocontainer.groovy      20 Apr 2004 03:08:51 -0000      1.1.2.1
  +++ nanocontainer.groovy      22 Apr 2004 21:11:41 -0000      1.1.2.2
  @@ -14,7 +14,7 @@
    * limitations under the License.

    * ========================================================================

    */

  -import org.picocontainer.defaults.DefaultPicoContainer

  +import org.apache.jetspeed.components.ChildAwareContainer

   import org.picocontainer.Parameter

   import org.picocontainer.defaults.ConstantParameter

   import org.picocontainer.defaults.ComponentParameter

  @@ -29,26 +29,12 @@
   

   import java.io.File

   

  -/**

  - * This is the standard assembly for a Preferences

  - * component.  We want the Preferences component to be exposed

  - * at as high the container hierarchy as possibly so, if a

  - * parent container is provided, we will regsiter to the parent

  - * and use it as the container for the Preferences.

  - */

  -

  -if(parent != null)

  -{

  -     container = new DefaultPicoContainer(parent)

  -     parent.registerComponentImplementation(PropertyManager, PropertyManagerImpl, 
new Parameter[] {new ComponentParameter(PersistenceStoreContainer), new 
ConstantParameter("jetspeed")} )

  -     parent.registerComponentImplementation(PreferencesProvider, 
PreferencesProviderImpl, new Parameter[] {new 
ComponentParameter(PersistenceStoreContainer), new ConstantParameter("jetspeed"), new 
ConstantParameter("org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl")} )

  -}

  -else

  -{

  -     container = new DefaultPicoContainer()

  -     container.registerComponentImplementation(PropertyManager, 
PropertyManagerImpl, new Parameter[] {new 
ComponentParameter(PersistenceStoreContainer), new ConstantParameter("jetspeed")} )

  -     container.registerComponentImplementation(PreferencesProvider, 
PreferencesProviderImpl, new Parameter[] {new 
ComponentParameter(PersistenceStoreContainer), new ConstantParameter("jetspeed"), new 
ConstantParameter("org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl")} )        

  -}    

  +

  +

  +container = new ChildAwareContainer(parent)

  +container.registerComponentImplementation(PropertyManager, PropertyManagerImpl, new 
Parameter[] {new ComponentParameter(PersistenceStoreContainer), new 
ConstantParameter("jetspeed")} )

  +container.registerComponentImplementation(PreferencesProvider, 
PreferencesProviderImpl, new Parameter[] {new 
ComponentParameter(PersistenceStoreContainer), new ConstantParameter("jetspeed"), new 
ConstantParameter("org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl")} )     

        

  -// This will be an empty container if "parent" was not null

  +     

  +

   return container
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to