incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject svn commit: r1420206 - in /sling/trunk/bundles: jcr/jackrabbit-accessmanager/ jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ jcr/jackrabbit-server/src/main/resources/META-INF/ jcr/jackrabbit-usermanager/ ...
Date Tue, 11 Dec 2012 14:57:10 GMT
Author: mykee
Date: Tue Dec 11 14:57:03 2012
New Revision: 1420206

URL: http://svn.apache.org/viewvc?rev=1420206&view=rev
Log:
SLING-2644 - Make the jackrabbit/accessmanager and jackrabbit/usermanager to work with newer
servlets/post bundle

Modified:
    sling/trunk/bundles/jcr/jackrabbit-accessmanager/pom.xml
    sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java
    sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java
    sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java
    sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/META-INF/MANIFEST.BAK
    sling/trunk/bundles/jcr/jackrabbit-usermanager/pom.xml
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
    sling/trunk/bundles/resourceresolver/pom.xml

Modified: sling/trunk/bundles/jcr/jackrabbit-accessmanager/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-accessmanager/pom.xml?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-accessmanager/pom.xml (original)
+++ sling/trunk/bundles/jcr/jackrabbit-accessmanager/pom.xml Tue Dec 11 14:57:03 2012
@@ -65,8 +65,8 @@
                             org.apache.sling.servlets.post;inline="org/apache/sling/servlets/post/impl/helper/JSONResponse*"
                         </Embed-Dependency>
                         <Export-Package>
-                     org.apache.sling.jcr.jackrabbit.accessmanager;version=2.1.0,
-                     org.apache.sling.jcr.jackrabbit.accessmanager.post;version=2.1.0
+                     org.apache.sling.jcr.jackrabbit.accessmanager;version=2.1.1,
+                     org.apache.sling.jcr.jackrabbit.accessmanager.post;version=2.1.1
                         </Export-Package>
                         <Sling-Initial-Content />
                         <Sling-Nodetypes />
@@ -118,7 +118,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.servlets.post</artifactId>
-            <version>2.1.0</version>
+            <version>2.1.2</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java
Tue Dec 11 14:57:03 2012
@@ -34,12 +34,13 @@ import org.apache.sling.api.SlingHttpSer
 import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.resource.ResourceNotFoundException;
 import org.apache.sling.api.resource.ResourceUtil;
-import org.apache.sling.api.servlets.HtmlResponse;
+import org.apache.sling.servlets.post.HtmlResponse;
 import org.apache.sling.api.servlets.SlingAllMethodsServlet;
 import org.apache.sling.api.wrappers.SlingRequestPaths;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
-import org.apache.sling.servlets.post.impl.helper.JSONResponse;
+import org.apache.sling.servlets.post.JSONResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,20 +63,20 @@ public abstract class AbstractAccessPost
 			SlingHttpServletResponse httpResponse) throws ServletException,
 			IOException {
         // prepare the response
-        HtmlResponse htmlResponse = createHtmlResponse(request);
-        htmlResponse.setReferer(request.getHeader("referer"));
+		AbstractPostResponse response = createHtmlResponse(request);
+        response.setReferer(request.getHeader("referer"));
 
         // calculate the paths
         String path = getItemPath(request);
-        htmlResponse.setPath(path);
+        response.setPath(path);
 
         // location
-        htmlResponse.setLocation(externalizePath(request, path));
+        response.setLocation(externalizePath(request, path));
 
         // parent location
         path = ResourceUtil.getParent(path);
         if (path != null) {
-        	htmlResponse.setParentLocation(externalizePath(request, path));
+        	response.setParentLocation(externalizePath(request, path));
         }
 
         Session session = request.getResourceResolver().adaptTo(Session.class);
@@ -83,19 +84,19 @@ public abstract class AbstractAccessPost
         final List<Modification> changes = new ArrayList<Modification>();
 
         try {
-            handleOperation(request, htmlResponse, changes);
+            handleOperation(request, response, changes);
 
             //TODO: maybe handle SlingAuthorizablePostProcessor handlers here
 
             // set changes on html response
             for(Modification change : changes) {
                 switch ( change.getType() ) {
-                    case MODIFY : htmlResponse.onModified(change.getSource()); break;
-                    case DELETE : htmlResponse.onDeleted(change.getSource()); break;
-                    case MOVE :   htmlResponse.onMoved(change.getSource(), change.getDestination());
break;
-                    case COPY :   htmlResponse.onCopied(change.getSource(), change.getDestination());
break;
-                    case CREATE : htmlResponse.onCreated(change.getSource()); break;
-                    case ORDER : htmlResponse.onChange("ordered", change.getSource(), change.getDestination());
break;
+                    case MODIFY : response.onModified(change.getSource()); break;
+                    case DELETE : response.onDeleted(change.getSource()); break;
+                    case MOVE :   response.onMoved(change.getSource(), change.getDestination());
break;
+                    case COPY :   response.onCopied(change.getSource(), change.getDestination());
break;
+                    case CREATE : response.onCreated(change.getSource()); break;
+                    case ORDER : response.onChange("ordered", change.getSource(), change.getDestination());
break;
 				default:
 					break;
                 }
@@ -105,13 +106,13 @@ public abstract class AbstractAccessPost
                 session.save();
             }
         } catch (ResourceNotFoundException rnfe) {
-            htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND,
+            response.setStatus(HttpServletResponse.SC_NOT_FOUND,
                 rnfe.getMessage());
         } catch (Throwable throwable) {
             log.debug("Exception while handling POST "
                 + request.getResource().getPath() + " with "
                 + getClass().getName(), throwable);
-            htmlResponse.setError(throwable);
+            response.setError(throwable);
         } finally {
             try {
                 if (session.hasPendingChanges()) {
@@ -124,8 +125,8 @@ public abstract class AbstractAccessPost
         }
 
         // check for redirect URL if processing succeeded
-        if (htmlResponse.isSuccessful()) {
-            String redirect = getRedirectUrl(request, htmlResponse);
+        if (response.isSuccessful()) {
+            String redirect = getRedirectUrl(request, response);
             if (redirect != null) {
                 httpResponse.sendRedirect(redirect);
                 return;
@@ -133,7 +134,7 @@ public abstract class AbstractAccessPost
         }
 
         // create a html response and send if unsuccessful or no redirect
-        htmlResponse.send(httpResponse, isSetStatus(request));
+        response.send(httpResponse, isSetStatus(request));
 	}
 
     /**
@@ -145,7 +146,7 @@ public abstract class AbstractAccessPost
      * </ul>
      * or a {@link org.apache.sling.api.servlets.HtmlResponse} otherwise
      */
-    protected HtmlResponse createHtmlResponse(SlingHttpServletRequest req) {
+    protected AbstractPostResponse createHtmlResponse(SlingHttpServletRequest req) {
     	if (JSONResponse.RESPONSE_CONTENT_TYPE.equals(req.getResponseContentType())) {
     		return new JSONResponse();
     	} else {
@@ -157,11 +158,11 @@ public abstract class AbstractAccessPost
 	 * Extending Servlet should implement this operation to do the work
 	 *
 	 * @param request the sling http request to process
-	 * @param htmlResponse the response
+	 * @param response the response
 	 * @param changes
 	 */
 	abstract protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse htmlResponse, List<Modification> changes) throws RepositoryException;
+			AbstractPostResponse response, List<Modification> changes) throws RepositoryException;
 
 
     /**
@@ -170,7 +171,7 @@ public abstract class AbstractAccessPost
      * @param ctx the post processor
      * @return the redirect location or <code>null</code>
      */
-    protected String getRedirectUrl(HttpServletRequest request, HtmlResponse ctx) {
+    protected String getRedirectUrl(HttpServletRequest request, AbstractPostResponse ctx)
{
         // redirect param has priority (but see below, magic star)
         String result = request.getParameter(SlingPostConstants.RP_REDIRECT_TO);
         if (result != null && ctx.getPath() != null) {

Modified: sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java
Tue Dec 11 14:57:03 2012
@@ -39,6 +39,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.servlets.HtmlResponse;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.apache.sling.jcr.jackrabbit.accessmanager.DeleteAces;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 
@@ -95,7 +96,7 @@ public class DeleteAcesServlet extends A
 	 */
 	@Override
 	protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse htmlResponse, List<Modification> changes)
+			AbstractPostResponse htmlResponse, List<Modification> changes)
 			throws RepositoryException {
 
 		Session session = request.getResourceResolver().adaptTo(Session.class);

Modified: sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java
Tue Dec 11 14:57:03 2012
@@ -40,6 +40,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.servlets.HtmlResponse;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.apache.sling.jcr.jackrabbit.accessmanager.ModifyAce;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 
 /**
@@ -107,7 +108,7 @@ public class ModifyAceServlet extends Ab
 	 */
 	@Override
 	protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse htmlResponse, List<Modification> changes)
+			AbstractPostResponse response, List<Modification> changes)
 			throws RepositoryException {
 		Session session = request.getResourceResolver().adaptTo(Session.class);
     	String resourcePath = request.getResource().getPath();

Modified: sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/META-INF/MANIFEST.BAK
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/META-INF/MANIFEST.BAK?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/META-INF/MANIFEST.BAK (original)
+++ sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/META-INF/MANIFEST.BAK Tue
Dec 11 14:57:03 2012
@@ -1,85 +1,85 @@
-Manifest-Version: 1.0
-Export-Package: org.apache.sling.jcr.jackrabbit.server;uses:="javax.jc
- r";version="2.0.7",org.apache.sling.jcr.jackrabbit.server.security;us
- es:="javax.jcr,javax.security.auth.callback,javax.security.auth.login
- ";version="2.0.4.incubator",org.apache.sling.jcr.jackrabbit.server.se
- curity.accessmanager;uses:="javax.jcr,javax.security.auth";version="2
- .0.4.incubator",org.apache.jackrabbit.core.security.principal;uses:="
- org.apache.jackrabbit.api.security.principal,org.slf4j,org.apache.com
- mons.collections.map,javax.jcr,org.apache.jackrabbit.api.security.use
- r,javax.security.auth,org.apache.commons.collections.iterators,org.ap
- ache.jackrabbit.spi,org.apache.jackrabbit.spi.commons.conversion,java
- x.jcr.observation,org.apache.jackrabbit.util,org.apache.jackrabbit.co
- mmons.iterator";version="2.0.0"
-Service-Component: OSGI-INF/serviceComponents.xml
-Ignore-Package: org.apache.jackrabbit.test
-Bundle-ClassPath: .,jackrabbit-core-2.0.0.jar,lucene-core-2.4.1.jar,co
- ncurrent-1.3.4.jar,commons-dbcp-1.2.2.jar,commons-pool-1.3.jar
-Tool: Bnd-0.0.357
-Bundle-Activator: org.apache.sling.jcr.jackrabbit.server.impl.Activato
- r
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-SymbolicName: org.apache.sling.jcr.jackrabbit.server
-Note: Built by bundle profile
-Bundle-Category: sling,jcr,jackrabbit
-Bundle-Name: Apache Sling Jackrabbit Embedded Repository
-Created-By: 1.6.0_17 (Apple Inc.)
-DynamicImport-Package: *
-Bundle-Vendor: The Apache Software Foundation
-Bundle-Version: 2.0.7.SNAPSHOT
-Bnd-LastModified: 1268869104703
-Bundle-ManifestVersion: 2
-Bundle-Description: Bundle providing support to embed Jackrabbit Repos
- itory        instances and publish via RMI and/or JNDI
-Import-Package: javax.imageio.spi,javax.jcr;version="2.0.0",javax.jcr.
- lock;version="2.0.0",javax.jcr.nodetype;version="2.0.0",javax.jcr.obs
- ervation;version="2.0.0",javax.jcr.query;version="2.0.0",javax.jcr.qu
- ery.qom;version="2.0.0",javax.jcr.retention;version="2.0.0",javax.jcr
- .security;version="2.0.0",javax.jcr.util;version="2.0.0",javax.jcr.ve
- rsion;version="2.0.0",javax.naming,javax.naming.spi,javax.security.au
- th,javax.security.auth.callback,javax.security.auth.login,javax.secur
- ity.auth.spi,javax.sql,javax.swing;resolution:=optional,javax.swing.b
- order;resolution:=optional,javax.transaction.xa,javax.xml.parsers,jav
- ax.xml.transform,javax.xml.transform.dom,javax.xml.transform.stream,o
- rg.apache.commons.collections;version="3.2.1",org.apache.commons.coll
- ections.bidimap;version="3.2.1",org.apache.commons.collections.buffer
- ;version="3.2.1",org.apache.commons.collections.iterators;version="3.
- 2.1",org.apache.commons.collections.map;version="3.2.1",org.apache.co
- mmons.io;version="1.4.0",org.apache.commons.io.input;version="1.4.0",
- org.apache.derby.jdbc;resolution:=optional,org.apache.jackrabbit.api;
- version="2.0.0",org.apache.jackrabbit.api.management;version="2.0.0",
- org.apache.jackrabbit.api.observation;version="2.0.0",org.apache.jack
- rabbit.api.security;version="2.0.0",org.apache.jackrabbit.api.securit
- y.principal;version="2.0.0",org.apache.jackrabbit.api.security.user;v
- ersion="2.0.0",org.apache.jackrabbit.commons;version="2.0.0",org.apac
- he.jackrabbit.commons.cnd;version="2.0.0",org.apache.jackrabbit.commo
- ns.iterator;version="2.0.0",org.apache.jackrabbit.commons.query;versi
- on="2.0.0",org.apache.jackrabbit.commons.query.qom;version="2.0.0",or
- g.apache.jackrabbit.rmi.remote;version="2.0.0",org.apache.jackrabbit.
- rmi.server;version="2.0.0",org.apache.jackrabbit.spi;version="2.0.0",
- org.apache.jackrabbit.spi.commons;version="2.0.0",org.apache.jackrabb
- it.spi.commons.conversion;version="2.0.0",org.apache.jackrabbit.spi.c
- ommons.name;version="2.0.0",org.apache.jackrabbit.spi.commons.namespa
- ce;version="2.0.0",org.apache.jackrabbit.spi.commons.nodetype;version
- ="2.0.0",org.apache.jackrabbit.spi.commons.nodetype.compact;version="
- 2.0.0",org.apache.jackrabbit.spi.commons.nodetype.constraint;version=
- "2.0.0",org.apache.jackrabbit.spi.commons.query;version="2.0.0",org.a
- pache.jackrabbit.spi.commons.query.qom;version="2.0.0",org.apache.jac
- krabbit.spi.commons.value;version="2.0.0",org.apache.jackrabbit.util;
- version="2.0.0",org.apache.jackrabbit.value;version="2.0.0",org.apach
- e.sling.jcr.api;version="2.0.2",org.apache.sling.jcr.base;version="2.
- 1.0",org.apache.sling.jcr.jackrabbit.server;version="2.0.7",org.apach
- e.sling.jcr.jackrabbit.server.security;version="2.0.4",org.apache.sli
- ng.jcr.jackrabbit.server.security.accessmanager;version="2.0.4",org.a
- pache.tika.config,org.apache.tika.exception,org.apache.tika.metadata,
- org.apache.tika.parser,org.apache.tika.parser.html,org.apache.tika.pa
- rser.image,org.apache.tika.parser.microsoft,org.apache.tika.parser.od
- f,org.apache.tika.parser.pdf,org.apache.tika.parser.rtf,org.apache.ti
- ka.parser.txt,org.apache.tika.parser.xml,org.apache.tika.sax,org.osgi
- .framework;version="1.4.0",org.osgi.service.cm;version="1.2.0",org.os
- gi.service.component;version="1.0.0",org.osgi.service.log;version="1.
- 3.0",org.osgi.util.tracker;version="1.3.3",org.slf4j;version="1.5.2",
- org.w3c.dom,org.xml.sax,org.xml.sax.helpers
-Bundle-DocURL: http://sling.apache.org
-Originally-Created-By: 1.6.0_17 (Apple Inc.)
-
+Manifest-Version: 1.0
+Export-Package: org.apache.sling.jcr.jackrabbit.server;uses:="javax.jc
+ r";version="2.0.7",org.apache.sling.jcr.jackrabbit.server.security;us
+ es:="javax.jcr,javax.security.auth.callback,javax.security.auth.login
+ ";version="2.0.4.incubator",org.apache.sling.jcr.jackrabbit.server.se
+ curity.accessmanager;uses:="javax.jcr,javax.security.auth";version="2
+ .0.4.incubator",org.apache.jackrabbit.core.security.principal;uses:="
+ org.apache.jackrabbit.api.security.principal,org.slf4j,org.apache.com
+ mons.collections.map,javax.jcr,org.apache.jackrabbit.api.security.use
+ r,javax.security.auth,org.apache.commons.collections.iterators,org.ap
+ ache.jackrabbit.spi,org.apache.jackrabbit.spi.commons.conversion,java
+ x.jcr.observation,org.apache.jackrabbit.util,org.apache.jackrabbit.co
+ mmons.iterator";version="2.0.0"
+Service-Component: OSGI-INF/serviceComponents.xml
+Ignore-Package: org.apache.jackrabbit.test
+Bundle-ClassPath: .,jackrabbit-core-2.0.0.jar,lucene-core-2.4.1.jar,co
+ ncurrent-1.3.4.jar,commons-dbcp-1.2.2.jar,commons-pool-1.3.jar
+Tool: Bnd-0.0.357
+Bundle-Activator: org.apache.sling.jcr.jackrabbit.server.impl.Activato
+ r
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-SymbolicName: org.apache.sling.jcr.jackrabbit.server
+Note: Built by bundle profile
+Bundle-Category: sling,jcr,jackrabbit
+Bundle-Name: Apache Sling Jackrabbit Embedded Repository
+Created-By: 1.6.0_17 (Apple Inc.)
+DynamicImport-Package: *
+Bundle-Vendor: The Apache Software Foundation
+Bundle-Version: 2.0.7.SNAPSHOT
+Bnd-LastModified: 1268869104703
+Bundle-ManifestVersion: 2
+Bundle-Description: Bundle providing support to embed Jackrabbit Repos
+ itory        instances and publish via RMI and/or JNDI
+Import-Package: javax.imageio.spi,javax.jcr;version="2.0.0",javax.jcr.
+ lock;version="2.0.0",javax.jcr.nodetype;version="2.0.0",javax.jcr.obs
+ ervation;version="2.0.0",javax.jcr.query;version="2.0.0",javax.jcr.qu
+ ery.qom;version="2.0.0",javax.jcr.retention;version="2.0.0",javax.jcr
+ .security;version="2.0.0",javax.jcr.util;version="2.0.0",javax.jcr.ve
+ rsion;version="2.0.0",javax.naming,javax.naming.spi,javax.security.au
+ th,javax.security.auth.callback,javax.security.auth.login,javax.secur
+ ity.auth.spi,javax.sql,javax.swing;resolution:=optional,javax.swing.b
+ order;resolution:=optional,javax.transaction.xa,javax.xml.parsers,jav
+ ax.xml.transform,javax.xml.transform.dom,javax.xml.transform.stream,o
+ rg.apache.commons.collections;version="3.2.1",org.apache.commons.coll
+ ections.bidimap;version="3.2.1",org.apache.commons.collections.buffer
+ ;version="3.2.1",org.apache.commons.collections.iterators;version="3.
+ 2.1",org.apache.commons.collections.map;version="3.2.1",org.apache.co
+ mmons.io;version="1.4.0",org.apache.commons.io.input;version="1.4.0",
+ org.apache.derby.jdbc;resolution:=optional,org.apache.jackrabbit.api;
+ version="2.0.0",org.apache.jackrabbit.api.management;version="2.0.0",
+ org.apache.jackrabbit.api.observation;version="2.0.0",org.apache.jack
+ rabbit.api.security;version="2.0.0",org.apache.jackrabbit.api.securit
+ y.principal;version="2.0.0",org.apache.jackrabbit.api.security.user;v
+ ersion="2.0.0",org.apache.jackrabbit.commons;version="2.0.0",org.apac
+ he.jackrabbit.commons.cnd;version="2.0.0",org.apache.jackrabbit.commo
+ ns.iterator;version="2.0.0",org.apache.jackrabbit.commons.query;versi
+ on="2.0.0",org.apache.jackrabbit.commons.query.qom;version="2.0.0",or
+ g.apache.jackrabbit.rmi.remote;version="2.0.0",org.apache.jackrabbit.
+ rmi.server;version="2.0.0",org.apache.jackrabbit.spi;version="2.0.0",
+ org.apache.jackrabbit.spi.commons;version="2.0.0",org.apache.jackrabb
+ it.spi.commons.conversion;version="2.0.0",org.apache.jackrabbit.spi.c
+ ommons.name;version="2.0.0",org.apache.jackrabbit.spi.commons.namespa
+ ce;version="2.0.0",org.apache.jackrabbit.spi.commons.nodetype;version
+ ="2.0.0",org.apache.jackrabbit.spi.commons.nodetype.compact;version="
+ 2.0.0",org.apache.jackrabbit.spi.commons.nodetype.constraint;version=
+ "2.0.0",org.apache.jackrabbit.spi.commons.query;version="2.0.0",org.a
+ pache.jackrabbit.spi.commons.query.qom;version="2.0.0",org.apache.jac
+ krabbit.spi.commons.value;version="2.0.0",org.apache.jackrabbit.util;
+ version="2.0.0",org.apache.jackrabbit.value;version="2.0.0",org.apach
+ e.sling.jcr.api;version="2.0.2",org.apache.sling.jcr.base;version="2.
+ 1.0",org.apache.sling.jcr.jackrabbit.server;version="2.0.7",org.apach
+ e.sling.jcr.jackrabbit.server.security;version="2.0.4",org.apache.sli
+ ng.jcr.jackrabbit.server.security.accessmanager;version="2.0.4",org.a
+ pache.tika.config,org.apache.tika.exception,org.apache.tika.metadata,
+ org.apache.tika.parser,org.apache.tika.parser.html,org.apache.tika.pa
+ rser.image,org.apache.tika.parser.microsoft,org.apache.tika.parser.od
+ f,org.apache.tika.parser.pdf,org.apache.tika.parser.rtf,org.apache.ti
+ ka.parser.txt,org.apache.tika.parser.xml,org.apache.tika.sax,org.osgi
+ .framework;version="1.4.0",org.osgi.service.cm;version="1.2.0",org.os
+ gi.service.component;version="1.0.0",org.osgi.service.log;version="1.
+ 3.0",org.osgi.util.tracker;version="1.3.3",org.slf4j;version="1.5.2",
+ org.w3c.dom,org.xml.sax,org.xml.sax.helpers
+Bundle-DocURL: http://sling.apache.org
+Originally-Created-By: 1.6.0_17 (Apple Inc.)
+

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/pom.xml?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/pom.xml (original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/pom.xml Tue Dec 11 14:57:03 2012
@@ -75,7 +75,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>
-                            org.apache.sling.jackrabbit.usermanager;version=2.2.0,
+                            org.apache.sling.jackrabbit.usermanager;version=2.2.1,
                         </Export-Package>
                         <Private-Package>
                             org.apache.sling.jackrabbit.usermanager.impl.*
@@ -105,7 +105,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.servlets.post</artifactId>
-            <version>2.1.0</version>
+            <version>2.1.2</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java
Tue Dec 11 14:57:03 2012
@@ -30,12 +30,13 @@ import org.apache.sling.api.SlingHttpSer
 import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.resource.ResourceNotFoundException;
 import org.apache.sling.api.resource.ResourceUtil;
-import org.apache.sling.api.servlets.HtmlResponse;
+import org.apache.sling.servlets.post.HtmlResponse;
 import org.apache.sling.api.servlets.SlingAllMethodsServlet;
 import org.apache.sling.api.wrappers.SlingRequestPaths;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
-import org.apache.sling.servlets.post.impl.helper.JSONResponse;
+import org.apache.sling.servlets.post.JSONResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -64,20 +65,20 @@ public abstract class AbstractPostServle
             SlingHttpServletResponse httpResponse) throws ServletException,
             IOException {
         // prepare the response
-        HtmlResponse htmlResponse = createHtmlResponse(request);
-        htmlResponse.setReferer(request.getHeader("referer"));
+    	AbstractPostResponse response = createHtmlResponse(request);
+        response.setReferer(request.getHeader("referer"));
 
         // calculate the paths
         String path = getItemPath(request);
-        htmlResponse.setPath(path);
+        response.setPath(path);
 
         // location
-        htmlResponse.setLocation(externalizePath(request, path));
+        response.setLocation(externalizePath(request, path));
 
         // parent location
         path = ResourceUtil.getParent(path);
         if (path != null) {
-            htmlResponse.setParentLocation(externalizePath(request, path));
+            response.setParentLocation(externalizePath(request, path));
         }
 
         Session session = request.getResourceResolver().adaptTo(Session.class);
@@ -85,7 +86,7 @@ public abstract class AbstractPostServle
         final List<Modification> changes = new ArrayList<Modification>();
 
         try {
-            handleOperation(request, htmlResponse, changes);
+            handleOperation(request, response, changes);
 
             // TODO: maybe handle SlingAuthorizablePostProcessor handlers here
 
@@ -93,24 +94,24 @@ public abstract class AbstractPostServle
             for (Modification change : changes) {
                 switch (change.getType()) {
                     case MODIFY:
-                        htmlResponse.onModified(change.getSource());
+                        response.onModified(change.getSource());
                         break;
                     case DELETE:
-                        htmlResponse.onDeleted(change.getSource());
+                        response.onDeleted(change.getSource());
                         break;
                     case MOVE:
-                        htmlResponse.onMoved(change.getSource(),
+                        response.onMoved(change.getSource(),
                             change.getDestination());
                         break;
                     case COPY:
-                        htmlResponse.onCopied(change.getSource(),
+                        response.onCopied(change.getSource(),
                             change.getDestination());
                         break;
                     case CREATE:
-                        htmlResponse.onCreated(change.getSource());
+                        response.onCreated(change.getSource());
                         break;
                     case ORDER:
-                        htmlResponse.onChange("ordered", change.getSource(),
+                        response.onChange("ordered", change.getSource(),
                             change.getDestination());
                         break;
                 }
@@ -120,13 +121,13 @@ public abstract class AbstractPostServle
                 session.save();
             }
         } catch (ResourceNotFoundException rnfe) {
-            htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND,
+            response.setStatus(HttpServletResponse.SC_NOT_FOUND,
                 rnfe.getMessage());
         } catch (Throwable throwable) {
             log.debug("Exception while handling POST "
                 + request.getResource().getPath() + " with "
                 + getClass().getName(), throwable);
-            htmlResponse.setError(throwable);
+            response.setError(throwable);
         } finally {
             try {
                 if (session.hasPendingChanges()) {
@@ -139,8 +140,8 @@ public abstract class AbstractPostServle
         }
 
         // check for redirect URL if processing succeeded
-        if (htmlResponse.isSuccessful()) {
-            String redirect = getRedirectUrl(request, htmlResponse);
+        if (response.isSuccessful()) {
+            String redirect = getRedirectUrl(request, response);
             if (redirect != null) {
                 httpResponse.sendRedirect(redirect);
                 return;
@@ -148,7 +149,7 @@ public abstract class AbstractPostServle
         }
 
         // create a html response and send if unsuccessful or no redirect
-        htmlResponse.send(httpResponse, isSetStatus(request));
+        response.send(httpResponse, isSetStatus(request));
     }
 
     /**
@@ -160,7 +161,7 @@ public abstract class AbstractPostServle
      * </ul>
      * or a {@link org.apache.sling.api.servlets.HtmlResponse} otherwise
      */
-    protected HtmlResponse createHtmlResponse(SlingHttpServletRequest req) {
+    protected AbstractPostResponse createHtmlResponse(SlingHttpServletRequest req) {
         if (JSONResponse.RESPONSE_CONTENT_TYPE.equals(req.getResponseContentType())) {
             return new JSONResponse();
         } else {
@@ -172,11 +173,11 @@ public abstract class AbstractPostServle
      * Extending Servlet should implement this operation to do the work
      * 
      * @param request the sling http request to process
-     * @param htmlResponse the response
+     * @param response the response
      * @param changes
      */
     abstract protected void handleOperation(SlingHttpServletRequest request,
-            HtmlResponse htmlResponse, List<Modification> changes)
+    		AbstractPostResponse response, List<Modification> changes)
             throws RepositoryException;
 
     /**
@@ -185,7 +186,7 @@ public abstract class AbstractPostServle
      * @param ctx the post processor
      * @return the redirect location or <code>null</code>
      */
-    protected String getRedirectUrl(HttpServletRequest request, HtmlResponse ctx) {
+    protected String getRedirectUrl(HttpServletRequest request, AbstractPostResponse ctx)
{
         // redirect param has priority (but see below, magic star)
         String result = request.getParameter(SlingPostConstants.RP_REDIRECT_TO);
         if (result != null && ctx.getPath() != null) {

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
Tue Dec 11 14:57:03 2012
@@ -42,6 +42,7 @@ import org.apache.sling.commons.osgi.Osg
 import org.apache.sling.jackrabbit.usermanager.ChangeUserPassword;
 import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
@@ -150,7 +151,7 @@ public class ChangeUserPasswordServlet e
      */
     @Override
     protected void handleOperation(SlingHttpServletRequest request,
-            HtmlResponse htmlResponse, List<Modification> changes)
+    		AbstractPostResponse response, List<Modification> changes)
             throws RepositoryException {
         
         Resource resource = request.getResource();

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
Tue Dec 11 14:57:03 2012
@@ -40,6 +40,7 @@ import org.apache.sling.jackrabbit.userm
 import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.apache.sling.jcr.resource.JcrResourceResolverFactory;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 import org.apache.sling.servlets.post.impl.helper.RequestProperty;
@@ -112,7 +113,7 @@ public class CreateGroupServlet extends 
      */
     @Override
     protected void handleOperation(SlingHttpServletRequest request,
-            HtmlResponse response, List<Modification> changes)
+    		AbstractPostResponse response, List<Modification> changes)
             throws RepositoryException {
 
         Session session = request.getResourceResolver().adaptTo(Session.class);

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
Tue Dec 11 14:57:03 2012
@@ -40,6 +40,7 @@ import org.apache.sling.jackrabbit.userm
 import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.ModificationType;
 import org.apache.sling.servlets.post.SlingPostConstants;
@@ -195,7 +196,7 @@ public class CreateUserServlet extends A
      */
     @Override
     protected void handleOperation(SlingHttpServletRequest request,
-            HtmlResponse response, List<Modification> changes)
+    		AbstractPostResponse response, List<Modification> changes)
             throws RepositoryException {
       
 

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
Tue Dec 11 14:57:03 2012
@@ -43,6 +43,7 @@ import org.apache.sling.jackrabbit.userm
 import org.apache.sling.jackrabbit.usermanager.DeleteUser;
 import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 
@@ -114,7 +115,7 @@ public class DeleteAuthorizableServlet e
      */
     @Override
     protected void handleOperation(SlingHttpServletRequest request,
-            HtmlResponse htmlResponse, List<Modification> changes)
+    		AbstractPostResponse response, List<Modification> changes)
             throws RepositoryException {
 
         Session session = request.getResourceResolver().adaptTo(Session.class);
@@ -130,7 +131,7 @@ public class DeleteAuthorizableServlet e
             if (item == null) {
                 String msg = "Missing source " + resource.getPath()
                     + " for delete";
-                htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND, msg);
+                response.setStatus(HttpServletResponse.SC_NOT_FOUND, msg);
                 throw new ResourceNotFoundException(msg);
             } else {
                 if (item instanceof User) {

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
Tue Dec 11 14:57:03 2012
@@ -40,6 +40,7 @@ import org.apache.sling.jackrabbit.userm
 import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.apache.sling.jcr.resource.JcrResourceResolverFactory;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.impl.helper.RequestProperty;
 
@@ -113,7 +114,7 @@ public class UpdateGroupServlet extends 
      */
     @Override
     protected void handleOperation(SlingHttpServletRequest request,
-            HtmlResponse htmlResponse, List<Modification> changes)
+    		AbstractPostResponse response, List<Modification> changes)
             throws RepositoryException {
         Resource resource = request.getResource();
         Session session = request.getResourceResolver().adaptTo(Session.class);

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
Tue Dec 11 14:57:03 2012
@@ -37,6 +37,7 @@ import org.apache.sling.api.servlets.Htm
 import org.apache.sling.jackrabbit.usermanager.UpdateUser;
 import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
+import org.apache.sling.servlets.post.AbstractPostResponse;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.impl.helper.RequestProperty;
 
@@ -106,7 +107,7 @@ public class UpdateUserServlet extends A
      */
     @Override
     protected void handleOperation(SlingHttpServletRequest request,
-            HtmlResponse htmlResponse, List<Modification> changes)
+    		AbstractPostResponse response, List<Modification> changes)
             throws RepositoryException {
         Resource resource = request.getResource();
         Session session = request.getResourceResolver().adaptTo(Session.class);

Modified: sling/trunk/bundles/resourceresolver/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/resourceresolver/pom.xml?rev=1420206&r1=1420205&r2=1420206&view=diff
==============================================================================
--- sling/trunk/bundles/resourceresolver/pom.xml (original)
+++ sling/trunk/bundles/resourceresolver/pom.xml Tue Dec 11 14:57:03 2012
@@ -124,7 +124,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.commons.osgi</artifactId>
-            <version>2.1.0</version>
+            <version>2.1.1-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>



Mime
View raw message