cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r1298241 - /cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/pipeline/components/parameters/Parameters.java
Date Thu, 08 Mar 2012 00:41:41 GMT
Author: thorsten
Date: Thu Mar  8 00:41:40 2012
New Revision: 1298241

URL: http://svn.apache.org/viewvc?rev=1298241&view=rev
Log:
Extending Parameter class to export the map for usage with ParameterCacheKey

Modified:
    cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/pipeline/components/parameters/Parameters.java

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/pipeline/components/parameters/Parameters.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/pipeline/components/parameters/Parameters.java?rev=1298241&r1=1298240&r2=1298241&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/pipeline/components/parameters/Parameters.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/pipeline/components/parameters/Parameters.java
Thu Mar  8 00:41:40 2012
@@ -130,4 +130,18 @@ public class Parameters {
 
     }
 
+    public Map<String, String> export() {
+        Map<String, String> map = new HashMap<String, String>();
+        Set<String> keySet = values.keySet();
+        for (String key : keySet) {
+            Object value= values.get(key);
+            if (value instanceof String){
+                map.put(key, (String) value);
+            } else {
+                map.put(key, String.valueOf(value)) ;
+            }
+        }
+        return map;
+    }
+
 }



Mime
View raw message