cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/xsp XSPModuleHelper.java
Date Thu, 16 Oct 2003 14:57:59 GMT
bloritsch    2003/10/16 07:57:59

  Modified:    src/java/org/apache/cocoon/components/language/generator
                        GeneratorSelector.java ProgramGenerator.java
               src/java/org/apache/cocoon/components/language/markup/xsp
                        XSPModuleHelper.java
  Log:
  Update to Serviceable contracts
  
  Revision  Changes    Path
  1.4       +1 -5      cocoon-2.2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java
  
  Index: GeneratorSelector.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GeneratorSelector.java	24 Sep 2003 21:41:12 -0000	1.3
  +++ GeneratorSelector.java	16 Oct 2003 14:57:59 -0000	1.4
  @@ -50,10 +50,6 @@
   */
   package org.apache.cocoon.components.language.generator;
   
  -import org.apache.avalon.excalibur.component.ComponentHandler;
  -import org.apache.avalon.excalibur.component.ExcaliburComponentSelector;
  -import org.apache.avalon.excalibur.component.LogkitLoggerManager;
  -import org.apache.avalon.excalibur.component.RoleManager;
   import org.apache.avalon.excalibur.logger.LogKitManager;
   import org.apache.avalon.excalibur.logger.LoggerManager;
   import org.apache.avalon.framework.activity.Disposable;
  
  
  
  1.2       +4 -4      cocoon-2.2/src/java/org/apache/cocoon/components/language/generator/ProgramGenerator.java
  
  Index: ProgramGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/language/generator/ProgramGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProgramGenerator.java	9 Mar 2003 00:08:52 -0000	1.1
  +++ ProgramGenerator.java	16 Oct 2003 14:57:59 -0000	1.2
  @@ -52,8 +52,8 @@
   
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.excalibur.source.Source;
  -
   import org.apache.cocoon.environment.SourceResolver;
   
   /**
  @@ -82,7 +82,7 @@
        * @deprecated Pass Source object instead of file name.
        */
       CompiledComponent load(
  -            ComponentManager newManager,
  +            ServiceManager newManager,
               String fileName,
               String markupLanguage,
               String programmingLanguage,
  @@ -102,7 +102,7 @@
        * @exception Exception If an error occurs during generation or loading
        */
       CompiledComponent load(
  -            ComponentManager newManager,
  +            ServiceManager newManager,
               Source source,
               String markupLanguage,
               String programmingLanguage,
  
  
  
  1.6       +14 -18    cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/xsp/XSPModuleHelper.java
  
  Index: XSPModuleHelper.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/xsp/XSPModuleHelper.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSPModuleHelper.java	24 Sep 2003 21:41:11 -0000	1.5
  +++ XSPModuleHelper.java	16 Oct 2003 14:57:59 -0000	1.6
  @@ -56,8 +56,8 @@
   import java.util.Map;
   
   import org.apache.avalon.framework.CascadingRuntimeException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.ComponentSelector;
  +import org.apache.avalon.framework.service.ServiceSelector;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
  @@ -89,9 +89,9 @@
       private final static int OP_NAMES = 2;
   
       Map inputModules = null;
  -    ComponentManager manager = null;
  -    ComponentSelector inputSelector = null;
  -    
  +    ServiceManager manager = null;
  +    ServiceSelector inputSelector = null;
  +
   
       /**
        * Capsules use of an InputModule. Does all the lookups and so
  @@ -117,7 +117,7 @@
           Object value = null;
           InputModule input = null;
   
  -        if (this.inputModules == null) 
  +        if (this.inputModules == null)
               this.inputModules = new HashMap();
           else
               if (this.inputModules.containsKey(name))
  @@ -126,10 +126,10 @@
           try {
   
               if (this.inputSelector == null)
  -                this.inputSelector = (ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
  -        
  +                this.inputSelector = (ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
  +
               if (input == null) {
  -                if (this.inputSelector.hasComponent(name)) {
  +                if (this.inputSelector.isSelectable(name)) {
                       input = (InputModule) this.inputSelector.select(name);
                       this.inputModules.put(name, input);
                   } else {
  @@ -138,7 +138,7 @@
               }
   
               switch (op) {
  -            case OP_GET:    
  +            case OP_GET:
                   value = input.getAttribute(attr, conf, objectModel);
                   break;
               case OP_VALUES:
  @@ -170,16 +170,12 @@
        * @param manager a <code>ComponentManager</code> value
        * @exception RuntimeException if an error occurs
        */
  -    public void setup(ComponentManager manager) throws RuntimeException {
  +    public void setup(ServiceManager manager) throws RuntimeException {
   
           this.inputModules = new HashMap();
           this.manager = manager;
           try {
  -            this.inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);

  -            if (!(this.inputSelector instanceof ThreadSafe)) {
  -                this.manager.release(this.inputSelector);
  -                this.inputSelector = null;
  -            }
  +            this.inputSelector=(ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
           } catch (Exception e) {
               throw new CascadingRuntimeException("Could not obtain selector for InputModule.",e);
           }
  @@ -333,7 +329,7 @@
           if (this.manager != null && this.inputModules != null) {
               try {
                   if (this.inputSelector == null) {
  -                    this.inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);

  +                    this.inputSelector=(ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
                   }
                   Iterator iter = this.inputModules.keySet().iterator();
                   while (iter.hasNext()) {
  
  
  

Mime
View raw message