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/java/org/apache/jetspeed/prefs/containers prefs.container.groovy
Date Thu, 11 Mar 2004 02:56:36 GMT
dlestrat    2004/03/10 18:56:36

  Modified:    components/prefs/src/java/org/apache/jetspeed/prefs/containers
                        prefs.container.groovy
  Log:
  Finally got a satisfying way to assemble containers and instantiate PreferencesProvider
  during assembly.
  Refactoring prefs container.
  
  Revision  Changes    Path
  1.4       +3 -16     jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/containers/prefs.container.groovy
  
  Index: prefs.container.groovy
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/containers/prefs.container.groovy,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- prefs.container.groovy	10 Mar 2004 22:34:43 -0000	1.3
  +++ prefs.container.groovy	11 Mar 2004 02:56:36 -0000	1.4
  @@ -23,30 +23,17 @@
    * and use it as the container for the Preferences.
    */
   
  -pContainer = new DefaultPersistenceStoreContainer(15000, 10000)
  -if (parent != null) 
  -{
  -	pContainer.setParent(parent);
  -}
  -
  -ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", PBStore, new Parameter[]
{new ConstantParameter("jetspeed")})
  -pContainer.registerComponent(ca)
  -
   if(parent != null)
   {
   	container = new DefaultPicoContainer(parent)
  -	parent.registerComponentInstance(PersistenceStoreContainer, pContainer);
   	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")})
  -	parent.registerComponentInstance(PreferencesProvider, new PreferencesProviderImpl(pContainer,
"jetspeed", "org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl"))	
  +	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.registerComponentInstance(PersistenceStoreContainer, pContainer);
  -    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.registerComponentInstance(PreferencesProvider, new PreferencesProviderImpl(pContainer,
"jetspeed", "org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl"))
  +	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
  
  
  

---------------------------------------------------------------------
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