cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components CocoonComponentManager.java
Date Tue, 04 Jun 2002 07:48:52 GMT
cziegeler    2002/06/04 00:48:52

  Modified:    lib      jars.xml
               src/java/org/apache/cocoon/components
                        CocoonComponentManager.java
  Added:       lib/core avalon-framework-20020603.jar
  Removed:     lib/core avalon-framework-4.1.2.jar
  Log:
  Keeping avalon in sync with excalibur
  
  Revision  Changes    Path
  1.10      +1 -1      xml-cocoon2/lib/jars.xml
  
  Index: jars.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/lib/jars.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jars.xml	4 Jun 2002 07:11:25 -0000	1.9
  +++ jars.xml	4 Jun 2002 07:48:51 -0000	1.10
  @@ -23,7 +23,7 @@
   	<description>Part of jakarta-avalon, it is a set of classes and patterns that
          support high level server development.</description>
   	<used-by>Cocoon</used-by>
  -	<lib>core/avalon-framework-4.1.2.jar</lib>
  +	<lib>core/avalon-framework-20020603.jar</lib>
   	<homepage>http://jakarta.apache.org/avalon/framework/</homepage>
    </file>
    <file>
  
  
  
  1.1                  xml-cocoon2/lib/core/avalon-framework-20020603.jar
  
  	<<Binary file>>
  
  
  1.23      +22 -1     xml-cocoon2/src/java/org/apache/cocoon/components/CocoonComponentManager.java
  
  Index: CocoonComponentManager.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/CocoonComponentManager.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- CocoonComponentManager.java	29 May 2002 15:38:09 -0000	1.22
  +++ CocoonComponentManager.java	4 Jun 2002 07:48:52 -0000	1.23
  @@ -58,6 +58,7 @@
   import java.util.Map;
   import java.util.Stack;
   import org.apache.avalon.excalibur.component.ExcaliburComponentManager;
  +import org.apache.avalon.excalibur.component.RoleManager;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
  @@ -81,7 +82,7 @@
    * and by handling the lookup of the <code>SourceResolver</code> (in development)
    *
    * @author <a href="mailto:cziegeler@org.com">Carsten Ziegeler</a>
  - * @version CVS $Id: CocoonComponentManager.java,v 1.22 2002/05/29 15:38:09 cziegeler Exp
$
  + * @version CVS $Id: CocoonComponentManager.java,v 1.23 2002/06/04 07:48:52 cziegeler Exp
$
    */
   public final class CocoonComponentManager
   extends ExcaliburComponentManager
  @@ -93,6 +94,9 @@
       /** The configured <code>SourceResolver</code> */
       private SourceResolver sourceResolver;
   
  +    /** The {@link RoleManager} */
  +    private RoleManager roleManager;
  +
       /** Create the ComponentManager */
       public CocoonComponentManager()
       {
  @@ -186,6 +190,13 @@
       }
   
       /**
  +     * Configure the RoleManager
  +     */
  +    public void setRoleManager( final RoleManager roles ) {
  +        this.roleManager = roles;
  +    }
  +
  +    /**
        * Return an instance of a component based on a Role.  The Role is usually the Interface's
        * Fully Qualified Name(FQN)--unless there are multiple Components for the same Role.
 In that
        * case, the Role's FQN is appended with "Selector", and we return a ComponentSelector.
  @@ -235,6 +246,16 @@
                                   cc = cc.getChild( role, false );
                                   if ( null != cc ) {
                                       ((SitemapConfigurable) component).setSitemapConfiguration(cc);
  +                                } else if ( null != this.roleManager) {
  +                                    // check for hint
  +                                    Configuration[] childs = cc.getChildren();
  +                                    if ( null != childs ) {
  +                                        for(int m = 0; m < childs.length; m++) {
  +                                            System.out.println("Testing: " + childs[m].getName());
  +                                            final String r = this.roleManager.getRoleForName(childs[m].getName());
  +                                            System.out.println("Role: " + r);
  +                                        }
  +                                    }
                                   }
                               }
                           }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message