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/pipeline AbstractProcessingPipeline.java
Date Thu, 30 Oct 2003 14:05:13 GMT
cziegeler    2003/10/30 06:05:13

  Modified:    src/java/org/apache/cocoon/components/treeprocessor
                        TreeProcessor.java
               src/java/org/apache/cocoon/components/pipeline
                        AbstractProcessingPipeline.java
  Log:
  Updating environment handling
  
  Revision  Changes    Path
  1.23      +9 -2      cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
  
  Index: TreeProcessor.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- TreeProcessor.java	30 Oct 2003 12:20:45 -0000	1.22
  +++ TreeProcessor.java	30 Oct 2003 14:05:13 -0000	1.23
  @@ -417,7 +417,7 @@
           
           // Get the processor that should process this request
           TreeProcessor processor;
  -        if (newEnv.getRootContext() == newEnv.getContext()) {
  +        if (getRootProcessor().getContext().equals(this.getContext())) {
               processor = (TreeProcessor)getRootProcessor();
           } else {
               processor = this;
  @@ -616,4 +616,11 @@
           return this.environmentHelper;
       }
   
  +    /* (non-Javadoc)
  +     * @see org.apache.cocoon.Processor#getContext()
  +     */
  +    public String getContext() {
  +        return this.environmentHelper.getContext();
  +    }
  +    
   }
  
  
  
  1.13      +6 -5      cocoon-2.2/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
  
  Index: AbstractProcessingPipeline.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AbstractProcessingPipeline.java	29 Oct 2003 14:42:59 -0000	1.12
  +++ AbstractProcessingPipeline.java	30 Oct 2003 14:05:13 -0000	1.13
  @@ -73,6 +73,7 @@
   import org.apache.cocoon.Processor;
   import org.apache.cocoon.components.CocoonComponentManager;
   import org.apache.cocoon.environment.Environment;
  +import org.apache.cocoon.environment.EnvironmentHelper;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Response;
   import org.apache.cocoon.generation.Generator;
  @@ -385,7 +386,7 @@
           try {
               // setup the generator
               this.generator.setup(
  -                this.processor.getSourceResolver(),
  +                this.processor.getEnvironmentHelper(),
                   environment.getObjectModel(),
                   generatorSource,
                   generatorParam
  @@ -397,7 +398,7 @@
   
               while (transformerItt.hasNext()) {
                   Transformer trans = (Transformer)transformerItt.next();
  -                trans.setup(this.processor.getSourceResolver(),
  +                trans.setup(this.processor.getEnvironmentHelper(),
                               environment.getObjectModel(),
                               (String)transformerSourceItt.next(),
                               (Parameters)transformerParamItt.next());
  @@ -503,7 +504,7 @@
       protected void preparePipeline(Environment environment)
       throws ProcessingException {
           // TODO (CZ) Get the processor set via IoC
  -        this.processor = CocoonComponentManager.getCurrentProcessor();
  +        this.processor = EnvironmentHelper.getCurrentProcessor();
           if ( !checkPipeline() ) {
               throw new ProcessingException("Attempted to process incomplete pipeline.");
           }
  @@ -570,7 +571,7 @@
       throws ProcessingException {
           try {
               String mimeType;
  -            this.reader.setup(this.processor.getSourceResolver(),environment.getObjectModel(),readerSource,readerParam);
  +            this.reader.setup(this.processor.getEnvironmentHelper(),environment.getObjectModel(),readerSource,readerParam);
               mimeType = this.reader.getMimeType();
               if ( mimeType != null ) {
                   environment.setContentType(mimeType);
  
  
  

Mime
View raw message