incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1498989 - /sling/trunk/contrib/extensions/healthcheck/hc-sling/src/main/java/org/apache/sling/hc/sling/impl/rules/InternalRequest.java
Date Tue, 02 Jul 2013 15:50:30 GMT
Author: bdelacretaz
Date: Tue Jul  2 15:50:30 2013
New Revision: 1498989

URL: http://svn.apache.org/r1498989
Log:
SLING-2822 - support attributes in InternalRequest

Modified:
    sling/trunk/contrib/extensions/healthcheck/hc-sling/src/main/java/org/apache/sling/hc/sling/impl/rules/InternalRequest.java

Modified: sling/trunk/contrib/extensions/healthcheck/hc-sling/src/main/java/org/apache/sling/hc/sling/impl/rules/InternalRequest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/healthcheck/hc-sling/src/main/java/org/apache/sling/hc/sling/impl/rules/InternalRequest.java?rev=1498989&r1=1498988&r2=1498989&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/healthcheck/hc-sling/src/main/java/org/apache/sling/hc/sling/impl/rules/InternalRequest.java
(original)
+++ sling/trunk/contrib/extensions/healthcheck/hc-sling/src/main/java/org/apache/sling/hc/sling/impl/rules/InternalRequest.java
Tue Jul  2 15:50:30 2013
@@ -37,19 +37,20 @@ import javax.servlet.http.HttpSession;
 public class InternalRequest implements HttpServletRequest {
 
     private final String path;
+    private final Map<String, Object> attributes = new HashMap<String, Object>();
     
     public InternalRequest(String path) {
         this.path = path;
     }
     
     @Override
-    public Object getAttribute(String arg0) {
-        return null;
+    public Object getAttribute(String key) {
+        return attributes.get(key);
     }
 
     @Override
     public Enumeration<?> getAttributeNames() {
-        return null;
+        return new Vector<String>(attributes.keySet()).elements();
     }
 
     @Override
@@ -182,7 +183,8 @@ public class InternalRequest implements 
     }
 
     @Override
-    public void setAttribute(String arg0, Object arg1) {
+    public void setAttribute(String key, Object value) {
+        attributes.put(key, value);
     }
 
     @Override



Mime
View raw message