cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r389215 - in /cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon: Constants.java components/pipeline/VirtualProcessingPipeline.java components/treeprocessor/sitemap/SitemapLanguage.java sitemap/impl/AbstractVirtualSitemapComponent.java
Date Mon, 27 Mar 2006 18:10:05 GMT
Author: cziegeler
Date: Mon Mar 27 10:10:02 2006
New Revision: 389215

URL: http://svn.apache.org/viewcvs?rev=389215&view=rev
Log:
Use local resolver

Modified:
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/Constants.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/pipeline/VirtualProcessingPipeline.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/sitemap/impl/AbstractVirtualSitemapComponent.java

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/Constants.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/Constants.java?rev=389215&r1=389214&r2=389215&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/Constants.java (original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/Constants.java Mon Mar 27 10:10:02
2006
@@ -200,9 +200,6 @@
     /** Application <code>Context</code> key for the current environment prefix
*/
     public static final String CONTEXT_ENV_PREFIX = "env-prefix";
 
-    /** Application <code>Context</code> key for the current environment helper
*/
-    public static final String CONTEXT_ENV_HELPER = "env-helper";
-
     /** Application <code>Context</code> key prefix for the current sitemap virtual
components */
     public static final String CONTEXT_VPC_PREFIX = "vpc-";
 

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/pipeline/VirtualProcessingPipeline.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/pipeline/VirtualProcessingPipeline.java?rev=389215&r1=389214&r2=389215&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/pipeline/VirtualProcessingPipeline.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/pipeline/VirtualProcessingPipeline.java
Mon Mar 27 10:10:02 2006
@@ -21,13 +21,11 @@
 import java.util.Iterator;
 
 import org.apache.avalon.excalibur.pool.Recyclable;
-import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 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.Serviceable;
-import org.apache.cocoon.Constants;
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.Processor;
 import org.apache.cocoon.environment.Environment;
@@ -104,14 +102,14 @@
     protected Processor processor;
 
 
-    public VirtualProcessingPipeline(Context context) throws Exception {
-        this.resolver = (EnvironmentHelper) context.get(Constants.CONTEXT_ENV_HELPER);
+    public VirtualProcessingPipeline() {
     }
 
     public void service(ServiceManager manager)
     throws ServiceException {
         this.manager = manager;
         this.newManager = manager;
+        this.resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE + "/Local");
     }
 
     /**

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java?rev=389215&r1=389214&r2=389215&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
Mon Mar 27 10:10:02 2006
@@ -650,9 +650,6 @@
         DefaultContext newContext = new DefaultContext(this.context);
         Environment env = EnvironmentHelper.getCurrentEnvironment();
         newContext.put(Constants.CONTEXT_ENV_PREFIX, env.getURIPrefix());
-        // FIXME How to get rid of EnvironmentHelper?
-        newContext.put(Constants.CONTEXT_ENV_HELPER, getProcessor().getWrappingProcessor()
-                .getEnvironmentHelper());
 
         return newContext;
     }

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/sitemap/impl/AbstractVirtualSitemapComponent.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/sitemap/impl/AbstractVirtualSitemapComponent.java?rev=389215&r1=389214&r2=389215&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/sitemap/impl/AbstractVirtualSitemapComponent.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/sitemap/impl/AbstractVirtualSitemapComponent.java
Mon Mar 27 10:10:02 2006
@@ -21,7 +21,6 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.context.DefaultContext;
 import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
@@ -73,14 +72,14 @@
     // An environment with the URI and URI prefix of the sitemap where the VPC is defined
     private EnvironmentWrapper vpcEnvironment;
 
-    protected DefaultContext context;
+    protected Context context;
     protected SourceResolver resolver;
     protected ServiceManager manager;
 
     private class MyInvokeContext extends InvokeContext {
         public MyInvokeContext(Logger logger) throws Exception {
             super(true);
-            super.processingPipeline = new VirtualProcessingPipeline(AbstractVirtualSitemapComponent.this.context);
+            super.processingPipeline = new VirtualProcessingPipeline();
             ((VirtualProcessingPipeline)super.processingPipeline).enableLogging(logger);
         }
     }
@@ -91,7 +90,7 @@
      * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
      */
     public void contextualize(Context context) throws ContextException {
-        this.context = (DefaultContext)context;
+        this.context = context;
     }
 
     /**



Mime
View raw message