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.1/src/java/org/apache/cocoon/components/treeprocessor AbstractProcessingNode.java TreeProcessor.java ProcessingNode.java
Date Tue, 25 May 2004 13:30:10 GMT
cziegeler    2004/05/25 06:30:10

  Modified:    src/java/org/apache/cocoon/components/treeprocessor/sitemap
                        ActTypeNode.java
               src/java/org/apache/cocoon/components/treeprocessor
                        AbstractProcessingNode.java TreeProcessor.java
                        ProcessingNode.java
  Log:
  We don't need to store the resolver in the object model anymore
  
  Revision  Changes    Path
  1.6       +3 -2      cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActTypeNode.java
  
  Index: ActTypeNode.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActTypeNode.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ActTypeNode.java	5 Mar 2004 13:02:51 -0000	1.5
  +++ ActTypeNode.java	25 May 2004 13:30:10 -0000	1.6
  @@ -32,6 +32,7 @@
   import org.apache.cocoon.environment.Environment;
   import org.apache.cocoon.environment.Redirector;
   import org.apache.cocoon.environment.SourceResolver;
  +import org.apache.cocoon.environment.internal.EnvironmentHelper;
   import org.apache.cocoon.sitemap.PatternException;
   
   /**
  @@ -89,7 +90,7 @@
           // Prepare data needed by the action
           Map objectModel = env.getObjectModel();
           Redirector redirector = PipelinesNode.getRedirector(env);
  -        SourceResolver resolver = getSourceResolver(objectModel);
  +        SourceResolver resolver = EnvironmentHelper.getCurrentProcessor().getSourceResolver();
           String resolvedSource = source.resolve(context, objectModel);
           Parameters resolvedParams =
               VariableResolver.buildParameters(this.parameters,
  
  
  
  1.3       +1 -8      cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNode.java
  
  Index: AbstractProcessingNode.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractProcessingNode.java	5 Mar 2004 13:02:51 -0000	1.2
  +++ AbstractProcessingNode.java	25 May 2004 13:30:10 -0000	1.3
  @@ -31,13 +31,6 @@
       protected String location = "unknown location";
   
       /**
  -     * Get the <code>SourceResolver</code> in an object model.
  -     */
  -    protected static final SourceResolver getSourceResolver(Map objectModel) {
  -        return (SourceResolver)objectModel.get(OBJECT_SOURCE_RESOLVER);
  -    }
  -
  -    /**
        * Get the location of this node.
        */
       public String getLocation() {
  
  
  
  1.28      +1 -5      cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
  
  Index: TreeProcessor.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- TreeProcessor.java	25 May 2004 07:28:25 -0000	1.27
  +++ TreeProcessor.java	25 May 2004 13:30:10 -0000	1.28
  @@ -51,7 +51,6 @@
   import org.apache.cocoon.components.container.ComponentManagerWrapper;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.components.source.impl.DelayedRefreshSourceWrapper;
  -import org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode;
   import org.apache.cocoon.environment.Environment;
   import org.apache.cocoon.environment.ForwardRedirector;
   import org.apache.cocoon.environment.internal.EnvironmentHelper;
  @@ -336,14 +335,12 @@
   
           Map objectModel = environment.getObjectModel();
   
  -        Object oldResolver = objectModel.get(ProcessingNode.OBJECT_SOURCE_RESOLVER);
           Object oldRedirector = environment.getAttribute(REDIRECTOR_ATTR);
   
           // Build a redirector
           TreeProcessorRedirector redirector = new TreeProcessorRedirector(environment, context);
           setupLogger(redirector);
   
  -        objectModel.put(ProcessingNode.OBJECT_SOURCE_RESOLVER, environment);
           environment.setAttribute(REDIRECTOR_ATTR, redirector);
           try {
               boolean success = this.rootNode.invoke(environment, context);
  @@ -354,7 +351,6 @@
               EnvironmentHelper.leaveProcessor();
               // Restore old redirector and resolver
               environment.setAttribute(REDIRECTOR_ATTR, oldRedirector);
  -            objectModel.put(PipelinesNode.OBJECT_SOURCE_RESOLVER, oldResolver);
           }
       }
           
  
  
  
  1.3       +1 -6      cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/ProcessingNode.java
  
  Index: ProcessingNode.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/ProcessingNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProcessingNode.java	5 Mar 2004 13:02:51 -0000	1.2
  +++ ProcessingNode.java	25 May 2004 13:30:10 -0000	1.3
  @@ -28,11 +28,6 @@
   public interface ProcessingNode extends ThreadSafe {
   
       /**
  -     * The key of the <code>SourceResolver</code> in the object model.
  -     */
  -    String OBJECT_SOURCE_RESOLVER = "source-resolver";
  -
  -    /**
        * Process environment.
        */
       boolean invoke(Environment env, InvokeContext context) throws Exception;
  
  
  

Mime
View raw message