incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1229714 - in /sling/trunk/contrib/extensions/rewriter: pom.xml src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
Date Tue, 10 Jan 2012 20:34:33 GMT
Author: justin
Date: Tue Jan 10 20:34:33 2012
New Revision: 1229714

URL: http://svn.apache.org/viewvc?rev=1229714&view=rev
Log:
SLING-2312 - adding adapter annotations for rewriter

Modified:
    sling/trunk/contrib/extensions/rewriter/pom.xml
    sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java

Modified: sling/trunk/contrib/extensions/rewriter/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/rewriter/pom.xml?rev=1229714&r1=1229713&r2=1229714&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/rewriter/pom.xml (original)
+++ sling/trunk/contrib/extensions/rewriter/pom.xml Tue Jan 10 20:34:33 2012
@@ -52,6 +52,16 @@
             <plugin>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>maven-sling-plugin</artifactId>
+                <version>2.0.7-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <id>generate-adapter-metadata</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>generate-adapter-metadata</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
@@ -112,6 +122,12 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>adapter-annotations</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>servlet-api</artifactId>
         </dependency>

Modified: sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java?rev=1229714&r1=1229713&r2=1229714&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
(original)
+++ sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
Tue Jan 10 20:34:33 2012
@@ -22,6 +22,8 @@ import java.io.Writer;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.sling.adapter.annotations.Adaptable;
+import org.apache.sling.adapter.annotations.Adapter;
 import org.apache.sling.api.SlingException;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.SlingHttpServletResponse;
@@ -35,6 +37,10 @@ import org.xml.sax.ContentHandler;
 /**
  * This response is used to pass the output through the rewriter pipeline.
  */
+@Adaptable(adaptableClass=SlingHttpServletResponse.class, adapters={
+    @Adapter(value=ContentHandler.class,
+            condition="When the response is being processed through the Sling Rewriter filter.")
+})
 class RewriterResponse
     extends SlingHttpServletResponseWrapper {
 



Mime
View raw message