sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r783242 - in /incubator/sling/whiteboard/rewriter: ./ src/main/java/org/apache/sling/rewriter/impl/
Date Wed, 10 Jun 2009 07:21:39 GMT
Author: cziegeler
Date: Wed Jun 10 07:21:38 2009
New Revision: 783242

URL: http://svn.apache.org/viewvc?rev=783242&view=rev
Log:
Use latest Sling API (for response.adaptTo) and fix some javadocs.

Modified:
    incubator/sling/whiteboard/rewriter/pom.xml
    incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessingComponentConfigurationImpl.java
    incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterFilter.java
    incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java

Modified: incubator/sling/whiteboard/rewriter/pom.xml
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/pom.xml?rev=783242&r1=783241&r2=783242&view=diff
==============================================================================
--- incubator/sling/whiteboard/rewriter/pom.xml (original)
+++ incubator/sling/whiteboard/rewriter/pom.xml Wed Jun 10 07:21:38 2009
@@ -70,7 +70,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.0.4-incubator</version>
+            <version>2.0.5-incubator-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessingComponentConfigurationImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessingComponentConfigurationImpl.java?rev=783242&r1=783241&r2=783242&view=diff
==============================================================================
--- incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessingComponentConfigurationImpl.java
(original)
+++ incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessingComponentConfigurationImpl.java
Wed Jun 10 07:21:38 2009
@@ -26,15 +26,23 @@
  */
 public class ProcessingComponentConfigurationImpl implements ProcessingComponentConfiguration
{
 
-    /** For which paths should this pipeline be applied. */
-    private final String type;
-
-    private final Map<String, Object> configuration;
-
+    /** Empty configuration map. */
     public static final Map<String, Object> EMPTY_CONFIG = new HashMap<String, Object>();
 
+    /** Empty configuration. */
     public static final ProcessingComponentConfiguration EMPTY = new ProcessingComponentConfigurationImpl("<empty>",
null);
 
+    /** The type of the component. */
+    private final String type;
+
+    /** The configuration map. */
+    private final Map<String, Object> configuration;
+
+    /**
+     * Create a new configuration.
+     * @param type The type of the component.
+     * @param config The configuration or null if no config is available.
+     */
     public ProcessingComponentConfigurationImpl(final String type, final Map<String, Object>
config) {
         this.type = type;
         this.configuration = (config == null ? EMPTY_CONFIG : config);

Modified: incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterFilter.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterFilter.java?rev=783242&r1=783241&r2=783242&view=diff
==============================================================================
--- incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterFilter.java
(original)
+++ incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterFilter.java
Wed Jun 10 07:21:38 2009
@@ -69,12 +69,12 @@
         final SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;
         final SlingHttpServletResponse slingResponse = (SlingHttpServletResponse) response;
 
-        final RewriterResponse linkCheckerResponse =
+        final RewriterResponse rewriterResponse =
                 new RewriterResponse(slingRequest, slingResponse, this.pipelineManager);
         try {
-            chain.doFilter(request, linkCheckerResponse);
+            chain.doFilter(request, rewriterResponse);
         } finally {
-            linkCheckerResponse.finished();
+            rewriterResponse.finished();
         }
 	}
 }

Modified: incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java?rev=783242&r1=783241&r2=783242&view=diff
==============================================================================
--- incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
(original)
+++ incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
Wed Jun 10 07:21:38 2009
@@ -24,7 +24,6 @@
 
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.SlingHttpServletResponse;
-import org.apache.sling.api.adapter.Adaptable;
 import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper;
 import org.apache.sling.rewriter.ProcessingContext;
 import org.apache.sling.rewriter.Processor;
@@ -36,8 +35,7 @@
  * This response is used to pass the output through the rewriter pipeline.
  */
 class RewriterResponse
-    extends SlingHttpServletResponseWrapper
-    implements Adaptable {
+    extends SlingHttpServletResponseWrapper {
 
     /** The current request. */
     private final SlingHttpServletRequest request;
@@ -175,6 +173,6 @@
                 return object;
             }
         }
-        return null;
+        return super.adaptTo(type);
     }
 }



Mime
View raw message