cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/components/language/generator ProgramGeneratorImpl.java ProgramGenerator.java
Date Sun, 09 Nov 2003 20:09:47 GMT
cziegeler    2003/11/09 12:09:47

  Modified:    src/java/org/apache/cocoon/components/language/generator
                        ProgramGeneratorImpl.java ProgramGenerator.java
  Log:
  Move to Serviceable
  
  Revision  Changes    Path
  1.6       +16 -16    cocoon-2.2/src/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java
  
  Index: ProgramGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProgramGeneratorImpl.java	7 Oct 2003 16:07:33 -0000	1.5
  +++ ProgramGeneratorImpl.java	9 Nov 2003 20:09:47 -0000	1.6
  @@ -51,10 +51,6 @@
   package org.apache.cocoon.components.language.generator;
   
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.ComponentSelector;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.component.Recomposable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  @@ -63,6 +59,10 @@
   import org.apache.avalon.framework.parameters.ParameterException;
   import org.apache.avalon.framework.parameters.Parameterizable;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.ServiceSelector;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
  @@ -88,7 +88,7 @@
    * @version CVS $Id$
    */
   public class ProgramGeneratorImpl extends AbstractLogEnabled
  -    implements ProgramGenerator, Contextualizable, Composable, Parameterizable,
  +    implements ProgramGenerator, Contextualizable, Serviceable, Parameterizable,
                  Disposable, ThreadSafe {
   
       /** The auto-reloading option */
  @@ -106,14 +106,14 @@
        */
       protected GeneratorSelector cache;
   
  -    /** The component manager */
  -    protected ComponentManager manager;
  +    /** The service manager */
  +    protected ServiceManager manager;
   
       /** The markup language component selector */
  -    protected ComponentSelector markupSelector;
  +    protected ServiceSelector markupSelector;
   
       /** The programming language component selector */
  -    protected ComponentSelector languageSelector;
  +    protected ServiceSelector languageSelector;
   
       /** The working directory */
       protected File workDir;
  @@ -165,12 +165,12 @@
        * and programming languages.
        * @param manager The global component manager
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           if (this.manager == null && manager != null) {
               this.manager = manager;
               this.cache = (GeneratorSelector) this.manager.lookup(GeneratorSelector.ROLE
+ "Selector");
  -            this.markupSelector = (ComponentSelector)this.manager.lookup(MarkupLanguage.ROLE
+ "Selector");
  -            this.languageSelector = (ComponentSelector)this.manager.lookup(ProgrammingLanguage.ROLE
+ "Selector");
  +            this.markupSelector = (ServiceSelector)this.manager.lookup(MarkupLanguage.ROLE
+ "Selector");
  +            this.languageSelector = (ServiceSelector)this.manager.lookup(ProgrammingLanguage.ROLE
+ "Selector");
               this.classManager = (ClassLoaderManager)this.manager.lookup(ClassLoaderManager.ROLE);
           }
       }
  @@ -214,7 +214,7 @@
        * @exception Exception If an error occurs during generation or loading
        * @deprecated Pass Source object instead of file name.
        */
  -    public CompiledComponent load(ComponentManager newManager,
  +    public CompiledComponent load(ServiceManager newManager,
                                     String fileName,
                                     String markupLanguageName,
                                     String programmingLanguageName,
  @@ -241,7 +241,7 @@
        * @return The loaded program instance
        * @exception Exception If an error occurs during generation or loading
        */
  -    public CompiledComponent load(ComponentManager newManager,
  +    public CompiledComponent load(ServiceManager newManager,
                                     Source source,
                                     String markupLanguageName,
                                     String programmingLanguageName,
  @@ -414,7 +414,7 @@
           }
       }
   
  -    private CompiledComponent loadProgram(ComponentManager newManager,
  +    private CompiledComponent loadProgram(ServiceManager newManager,
                                             String normalizedName,
                                             MarkupLanguage markupLanguage,
                                             ProgrammingLanguage programmingLanguage)
  
  
  
  1.3       +2 -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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProgramGenerator.java	16 Oct 2003 14:57:59 -0000	1.2
  +++ ProgramGenerator.java	9 Nov 2003 20:09:47 -0000	1.3
  @@ -50,8 +50,6 @@
   */
   package org.apache.cocoon.components.language.generator;
   
  -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;
  @@ -63,7 +61,7 @@
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
    * @version CVS $Id$
    */
  -public interface ProgramGenerator extends Component {
  +public interface ProgramGenerator {
   
       String ROLE = ProgramGenerator.class.getName();
   
  
  
  

Mime
View raw message