cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r564776 - in /cocoon/trunk: blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/ core/cocoon-expression-language/cocoon-expression-language-api/src/main/java/org/apache/cocoon/objectmodel/ core/cocoon-expres...
Date Fri, 10 Aug 2007 21:33:38 GMT
Author: gkossakowski
Date: Fri Aug 10 14:33:37 2007
New Revision: 564776

URL: http://svn.apache.org/viewvc?view=rev&rev=564776
Log:
COCOON-2103: Removed FlowObjectModelHelper class usage and the class itself.

Removed:
    cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/template/environment/
Modified:
    cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java
    cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-api/src/main/java/org/apache/cocoon/objectmodel/ObjectModel.java
    cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/test/java/org/apache/cocoon/environment/FOMTestCase.java

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java?view=diff&rev=564776&r1=564775&r2=564776
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java
Fri Aug 10 14:33:37 2007
@@ -29,8 +29,8 @@
 import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.generation.ServiceableGenerator;
 import org.apache.cocoon.objectmodel.ObjectModel;
+import org.apache.cocoon.objectmodel.helper.ParametersMap;
 import org.apache.cocoon.template.environment.ExecutionContext;
-import org.apache.cocoon.template.environment.FlowObjectModelHelper;
 import org.apache.cocoon.template.environment.JXCacheKey;
 import org.apache.cocoon.template.environment.JXSourceValidity;
 import org.apache.cocoon.template.expression.JXTExpression;
@@ -143,12 +143,15 @@
 
     public void performGeneration(Event startEvent, Event endEvent) throws SAXException {
         newObjectModel.markLocalContext();
-        FlowObjectModelHelper.fillNewObjectModelWithFOM(newObjectModel, objectModel, parameters);
+        
+        newObjectModel.putAt(ObjectModel.PARAMETERS_PATH, new ParametersMap(parameters));
+        
         XMLConsumer consumer = new AttributeAwareXMLConsumerImpl(new RedundantNamespacesFilter(this.xmlConsumer));
         //not sure why this is needed
         newObjectModel.putAt("cocoon/consumer", consumer);
         Invoker.execute(consumer, this.newObjectModel, new ExecutionContext(this.definitions,
this.scriptManager,
                 this.manager), null, namespaces, startEvent, null);
+        
         newObjectModel.cleanupLocalContext();
     }
 

Modified: cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-api/src/main/java/org/apache/cocoon/objectmodel/ObjectModel.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-api/src/main/java/org/apache/cocoon/objectmodel/ObjectModel.java?view=diff&rev=564776&r1=564775&r2=564776
==============================================================================
--- cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-api/src/main/java/org/apache/cocoon/objectmodel/ObjectModel.java
(original)
+++ cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-api/src/main/java/org/apache/cocoon/objectmodel/ObjectModel.java
Fri Aug 10 14:33:37 2007
@@ -29,6 +29,8 @@
     public static final String CONTEXTBEAN = "contextBean";
 
     public static final String NAMESPACE = "namespace";
+    
+    public static final String PARAMETERS_PATH = "cocoon/parameters";
 
     /**
      * @return a {@link org.apache.commons.collections.MultiMap} that contains all stored
values in all context in

Modified: cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/test/java/org/apache/cocoon/environment/FOMTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/test/java/org/apache/cocoon/environment/FOMTestCase.java?view=diff&rev=564776&r1=564775&r2=564776
==============================================================================
--- cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/test/java/org/apache/cocoon/environment/FOMTestCase.java
(original)
+++ cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/test/java/org/apache/cocoon/environment/FOMTestCase.java
Fri Aug 10 14:33:37 2007
@@ -22,7 +22,7 @@
 import org.apache.cocoon.components.expression.ExpressionFactory;
 import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.cocoon.objectmodel.ObjectModel;
-import org.apache.cocoon.template.environment.FlowObjectModelHelper;
+import org.apache.cocoon.objectmodel.helper.ParametersMap;
 
 public class FOMTestCase extends ContainerTestCase {
 
@@ -31,7 +31,7 @@
         ObjectModel objectModel = (ObjectModel) this.getBeanFactory().getBean(ObjectModel.class.getName());
         Parameters parameters = new Parameters();
         parameters.setParameter("test", "foo");
-        FlowObjectModelHelper.fillNewObjectModelWithFOM(objectModel, getObjectModel(), parameters);
+        objectModel.putAt(ObjectModel.PARAMETERS_PATH, new ParametersMap(parameters));
 
         Expression expression = factory.getExpression("jexl", "cocoon.parameters.test");
         assertEquals("foo", expression.evaluate(objectModel));
@@ -45,7 +45,7 @@
         ObjectModel objectModel = (ObjectModel) this.getBeanFactory().getBean(ObjectModel.class.getName());
         Parameters parameters = new Parameters();
         parameters.setParameter("test", "foo");
-        FlowObjectModelHelper.fillNewObjectModelWithFOM(objectModel, getObjectModel(), parameters);
+        objectModel.putAt(ObjectModel.PARAMETERS_PATH, new ParametersMap(parameters));
 
         Expression expression = factory.getExpression("jxpath", "$cocoon/parameters/test");
         assertEquals("foo", expression.evaluate(objectModel));



Mime
View raw message