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

[email protected]
Newsgroups gmane.text.xml.cocoon.cvs
Message-ID <[email protected]>
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;
+    }
+
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.