cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap SitemapLanguage.java
Date Wed, 10 Sep 2003 17:44:19 GMT
proyal      2003/09/10 10:44:19

  Modified:    src/java/org/apache/cocoon/components/treeprocessor/sitemap
                        SitemapLanguage.java
  Log:
  Explicitly bring up CocoonComponentManager vs LifecycleHelper
  so that we can pass in a LoggerManager to use for created components
  
  Revision  Changes    Path
  1.5       +30 -10    cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
  
  Index: SitemapLanguage.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SitemapLanguage.java	18 Jun 2003 11:06:31 -0000	1.4
  +++ SitemapLanguage.java	10 Sep 2003 17:44:19 -0000	1.5
  @@ -53,9 +53,24 @@
   import java.util.*;
   
   import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.DefaultConfiguration;
  +import org.apache.avalon.framework.configuration.Configurable;
  +import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.framework.logger.LogEnabled;
  +import org.apache.avalon.framework.context.Context;
  +import org.apache.avalon.framework.context.Contextualizable;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
  +import org.apache.avalon.framework.parameters.Parameterizable;
  +import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.activity.Startable;
  +import org.apache.avalon.excalibur.component.RoleManager;
  +import org.apache.avalon.excalibur.component.RoleManageable;
  +import org.apache.avalon.excalibur.logger.LoggerLoggerManager;
   import org.apache.cocoon.components.CocoonComponentManager;
   import org.apache.cocoon.components.LifecycleHelper;
   import org.apache.cocoon.components.treeprocessor.CategoryNode;
  @@ -99,16 +114,21 @@
               config = new DefaultConfiguration("", "");
           }
   
  -        ComponentManager manager = new CocoonComponentManager(this.parentManager);
  +        final CocoonComponentManager manager = new CocoonComponentManager(this.parentManager);
   
  -        LifecycleHelper.setupComponent(manager,
  -            getLogger(),
  -            this.context,
  -            this.parentManager,
  -            this.roleManager,
  -            this.logKit,
  -            config
  -        );
  +        manager.enableLogging(getLogger());
  +        manager.setLoggerManager(new LoggerLoggerManager( getLogger()));
  +
  +        if (null != this.context ) {
  +            manager.contextualize(this.context);
  +        }
  +
  +        if (null != this.roleManager) {
  +            manager.setRoleManager(this.roleManager);
  +        }
  +
  +        manager.configure(config);
  +        manager.initialize();
   
           return manager;
       }
  
  
  

Mime
View raw message