incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r752207 - in /incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main: java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTEI.java java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTag.java resources/META-INF/taglib.tld
Date Tue, 10 Mar 2009 18:29:40 GMT
Author: cziegeler
Date: Tue Mar 10 18:29:39 2009
New Revision: 752207

URL: http://svn.apache.org/viewvc?rev=752207&view=rev
Log:
SLING-590 : Remove properties variable again to avoid compatibility issues.

Modified:
    incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTEI.java
    incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTag.java
    incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/resources/META-INF/taglib.tld

Modified: incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTEI.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTEI.java?rev=752207&r1=752206&r2=752207&view=diff
==============================================================================
--- incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTEI.java
(original)
+++ incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTEI.java
Tue Mar 10 18:29:39 2009
@@ -18,8 +18,6 @@
 
 import static org.apache.sling.scripting.jsp.taglib.DefineObjectsTag.DEFAULT_LOG_NAME;
 import static org.apache.sling.scripting.jsp.taglib.DefineObjectsTag.DEFAULT_NODE_NAME;
-import static org.apache.sling.scripting.jsp.taglib.DefineObjectsTag.DEFAULT_PROPERTIES_IS_VALUE_MAP;
-import static org.apache.sling.scripting.jsp.taglib.DefineObjectsTag.DEFAULT_PROPERTIES_NAME;
 import static org.apache.sling.scripting.jsp.taglib.DefineObjectsTag.DEFAULT_REQUEST_NAME;
 import static org.apache.sling.scripting.jsp.taglib.DefineObjectsTag.DEFAULT_RESOURCE_NAME;
 import static org.apache.sling.scripting.jsp.taglib.DefineObjectsTag.DEFAULT_RESOURCE_RESOLVER_NAME;
@@ -28,7 +26,6 @@
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 
 import javax.jcr.Node;
 import javax.servlet.jsp.tagext.TagData;
@@ -39,7 +36,6 @@
 import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.api.scripting.SlingScriptHelper;
 import org.slf4j.Logger;
 
@@ -91,18 +87,6 @@
      */
     public static final String ATTR_LOG_NAME = "logName";
 
-    /**
-     * The name of the tag attribute used to define the name of the properties map
-     * scripting variable (value is "propertiesName").
-     */
-    public static final String ATTR_PROPERTIES_NAME = "propertiesName";
-
-    /**
-     * The name of the tag attribute used to define the class of the properties
-     * scripting variable (value is "propertiesIsValueMap").
-     */
-    public static final String ATTR_PROPERTIES_IS_VALUE_MAP_NAME = "propertiesIsValueMap";
-
     private static final String SLING_REQUEST_CLASS = SlingHttpServletRequest.class.getName();
 
     private static final String SLING_RESPONSE_CLASS = SlingHttpServletResponse.class.getName();
@@ -145,22 +129,6 @@
         addVar(varInfos, data, ATTR_LOG_NAME,
                 DEFAULT_LOG_NAME, LOG_CLASS);
 
-        Boolean isValueMap = DEFAULT_PROPERTIES_IS_VALUE_MAP;
-        final Object isValueMapObj = data.getAttribute(ATTR_PROPERTIES_IS_VALUE_MAP_NAME);
-        if ( isValueMapObj instanceof Boolean ) {
-            isValueMap = (Boolean)isValueMapObj;
-        }
-
-        final String propertiesClassName;
-        if ( isValueMap ) {
-            propertiesClassName = ValueMap.class.getName();
-        } else {
-            propertiesClassName = Map.class.getName();
-        }
-        addVar(varInfos, data, ATTR_PROPERTIES_NAME,
-                DEFAULT_PROPERTIES_NAME,
-                propertiesClassName);
-
         return varInfos.toArray(new VariableInfo[varInfos.size()]);
 
     }

Modified: incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTag.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTag.java?rev=752207&r1=752206&r2=752207&view=diff
==============================================================================
--- incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTag.java
(original)
+++ incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/DefineObjectsTag.java
Tue Mar 10 18:29:39 2009
@@ -16,13 +16,10 @@
  */
 package org.apache.sling.scripting.jsp.taglib;
 
-import java.util.Map;
-
 import javax.jcr.Node;
 import javax.servlet.jsp.tagext.TagSupport;
 
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.api.scripting.SlingBindings;
 import org.apache.sling.api.scripting.SlingScriptHelper;
 
@@ -71,18 +68,6 @@
     public static final String DEFAULT_SLING_NAME = "sling";
 
     /**
-     * Default name for the scripting variable referencing the properties
-     * map (value is "properties").
-     */
-    public static final String DEFAULT_PROPERTIES_NAME = "properties";
-
-    /**
-     * Default name for the properties class information.
-     * (value is "true").
-     */
-    public static final Boolean DEFAULT_PROPERTIES_IS_VALUE_MAP = true;
-
-    /**
      * Default name for the scripting variable referencing the current
      * <code>ResourceResolver</code> (value is "resourceResolver").
      */
@@ -102,10 +87,6 @@
 
     private String resourceResolverName = DEFAULT_RESOURCE_RESOLVER_NAME;
 
-    private String propertiesName = DEFAULT_PROPERTIES_NAME;
-
-    private boolean propertiesIsValueMap = DEFAULT_PROPERTIES_IS_VALUE_MAP;
-
     /**
      * Default constructor.
      */
@@ -140,18 +121,6 @@
         if (node != null) {
             pageContext.setAttribute(nodeName, node);
         }
-        if ( this.propertiesIsValueMap ) {
-            final ValueMap vm = resource.adaptTo(ValueMap.class);
-            if ( vm != null ) {
-                pageContext.setAttribute(propertiesName, vm);
-            }
-        } else {
-            @SuppressWarnings("unchecked")
-            final Map map = resource.adaptTo(Map.class);
-            if ( map != null ) {
-                pageContext.setAttribute(propertiesName, map);
-            }
-        }
 
         return EVAL_PAGE;
     }
@@ -185,12 +154,4 @@
     public void setResourceResolverName(String name) {
         this.resourceResolverName = name;
     }
-
-    public void setPropertiesName(String name) {
-        this.propertiesName = name;
-    }
-
-    public void setPropertiesIsValueMap(boolean value) {
-        this.propertiesIsValueMap = value;
-    }
 }

Modified: incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/resources/META-INF/taglib.tld
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/resources/META-INF/taglib.tld?rev=752207&r1=752206&r2=752207&view=diff
==============================================================================
--- incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/resources/META-INF/taglib.tld
(original)
+++ incubator/sling/trunk/bundles/scripting/jsp-taglib/src/main/resources/META-INF/taglib.tld
Tue Mar 10 18:29:39 2009
@@ -234,20 +234,6 @@
             <required>false</required>
             <rtexprvalue>false</rtexprvalue>
         </attribute>
-        <attribute>
-            <name>propertiesName</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-        </attribute>
-        <attribute>
-            <description>
-                Should the properties variable be a value map or a map
-            </description>
-            <name>propertiesIsValueMap</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-            <type>boolean</type>
-        </attribute>
     </tag>
 
 </taglib>



Mime
View raw message