cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r125079 - in cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon: components/modules/input components/variables portal/components/modules/input
Date Thu, 13 Jan 2005 14:56:15 GMT
Author: cziegeler
Date: Thu Jan 13 06:56:12 2005
New Revision: 125079

URL: http://svn.apache.org/viewcvs?view=rev&rev=125079
Log:

Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/modules/input/PortletURLModule.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/NOPVariableResolver.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/PreparedVariableResolver.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/modules/input/PortletURLModule.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/modules/input/PortletURLModule.java?view=diff&rev=125079&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/modules/input/PortletURLModule.java&r1=125078&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/modules/input/PortletURLModule.java&r2=125079
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/modules/input/PortletURLModule.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/modules/input/PortletURLModule.java
Thu Jan 13 06:56:12 2005
@@ -124,16 +124,15 @@
                 } 
             }
             return url.toString();
+        }
+        if (name.startsWith(PREFIX_RENDER)) {
+            return name.substring(PREFIX_RENDER.length());
+        } else if (name.startsWith(PREFIX_RESOURCE)) {
+            return name.substring(PREFIX_RESOURCE.length());
+        } else if (name.startsWith(PREFIX_ACTION)) {
+            return name.substring(PREFIX_ACTION.length());
         } else {
-            if (name.startsWith(PREFIX_RENDER)) {
-                return name.substring(PREFIX_RENDER.length());
-            } else if (name.startsWith(PREFIX_RESOURCE)) {
-                return name.substring(PREFIX_RESOURCE.length());
-            } else if (name.startsWith(PREFIX_ACTION)) {
-                return name.substring(PREFIX_ACTION.length());
-            } else {
-                throw new IllegalArgumentException("Invalid attribute name '" + name + "'
for '" + getClass().getName() + "'");
-            }
+            throw new IllegalArgumentException("Invalid attribute name '" + name + "' for
'" + getClass().getName() + "'");
         }
     }
 

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java?view=diff&rev=125079&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java&r1=125078&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java&r2=125079
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java
Thu Jan 13 06:56:12 2005
@@ -35,7 +35,7 @@
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  *
- * @version CVS $Id: DefaultVariableResolverFactory.java,v 1.3 2004/03/05 13:02:07 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public class DefaultVariableResolverFactory 
     extends AbstractLogEnabled
@@ -60,9 +60,8 @@
     throws PatternException {
         if ( this.needsResolve( expression ) ) {
             return new PreparedVariableResolver( expression, this.manager, this.context);
-        } else {
-            return new NOPVariableResolver( expression );
         }
+        return new NOPVariableResolver( expression );
     }
 
     public void release(VariableResolver resolver) {

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/NOPVariableResolver.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/NOPVariableResolver.java?view=diff&rev=125079&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/NOPVariableResolver.java&r1=125078&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/NOPVariableResolver.java&r2=125079
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/NOPVariableResolver.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/NOPVariableResolver.java
Thu Jan 13 06:56:12 2005
@@ -15,7 +15,6 @@
  */
 package org.apache.cocoon.components.variables;
 
-import org.apache.avalon.framework.activity.Disposable;
 import org.apache.cocoon.sitemap.PatternException;
 
 /**
@@ -23,10 +22,10 @@
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: NOPVariableResolver.java,v 1.2 2004/03/05 13:02:07 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class NOPVariableResolver 
-    implements VariableResolver, Disposable {
+    implements VariableResolver {
 
     protected String expression;
 
@@ -65,6 +64,4 @@
         return this.expression;
     }
 
-    public void dispose() {
-    }
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/PreparedVariableResolver.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/PreparedVariableResolver.java?view=diff&rev=125079&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/PreparedVariableResolver.java&r1=125078&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/PreparedVariableResolver.java&r2=125079
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/PreparedVariableResolver.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/components/variables/PreparedVariableResolver.java
Thu Jan 13 06:56:12 2005
@@ -18,6 +18,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.service.ServiceException;
@@ -34,10 +35,11 @@
  * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  * @author <a href="mailto:tcurdt@apache.org">Torsten Curdt</a>
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Id: PreparedVariableResolver.java,v 1.4 2004/03/05 13:02:07 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public class PreparedVariableResolver 
-    extends NOPVariableResolver {
+    extends NOPVariableResolver 
+    implements Disposable {
     
     protected ServiceManager  manager;
     protected ServiceSelector selector;
@@ -216,8 +218,10 @@
         
     }
     
+    /* (non-Javadoc)
+     * @see org.apache.avalon.framework.activity.Disposable#dispose()
+     */
     public void dispose() {
-        super.dispose();
         if (this.selector != null) {
             for (int i = 0; i < this.items.size(); i++) {
                 int type = ((Integer) this.items.get(i)).intValue();

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java?view=diff&rev=125079&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java&r1=125078&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java&r2=125079
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java
Thu Jan 13 06:56:12 2005
@@ -20,7 +20,6 @@
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.service.ServiceException;
-import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.portal.PortalService;
 import org.apache.commons.jxpath.JXPathContext;
 
@@ -45,9 +44,6 @@
 
             portalService = (PortalService)this.manager.lookup(PortalService.ROLE);
 
-            // are we running inside a coplet?
-            final Map context = (Map)objectModel.get(ObjectModelHelper.PARENT_CONTEXT);
-            
             int pos = name.indexOf('/');
             String path;
             if ( pos == -1 ) {

Mime
View raw message