incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1003842 - in /sling/trunk/bundles/servlets/post/src/main: java/org/apache/sling/servlets/post/impl/SlingPostServlet.java resources/OSGI-INF/metatype/metatype.properties
Date Sat, 02 Oct 2010 17:33:37 GMT
Author: fmeschbe
Date: Sat Oct  2 17:33:37 2010
New Revision: 1003842

URL: http://svn.apache.org/viewvc?rev=1003842&view=rev
Log:
SLING-1796 By default do not checkout checked-in nodes before applying modifications. This
is to not enable modifications which were not possible before adding versioning support. This
may still be overwritten by configuration to automatically checkout checked-in nodes before
modification.

Modified:
    sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
    sling/trunk/bundles/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties

Modified: sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java?rev=1003842&r1=1003841&r2=1003842&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
(original)
+++ sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
Sat Oct  2 17:33:37 2010
@@ -134,13 +134,13 @@ public class SlingPostServlet extends Sl
      * @scr.property valueRef="DEFAULT_AUTO_CHECKIN" type="Boolean"
      */
     private static final String PROP_AUTO_CHECKIN = "servlet.post.autoCheckin";
-    
+
     private static final boolean DEFAULT_CHECKIN_ON_CREATE = false;
-    
-    private static final boolean DEFAULT_AUTO_CHECKOUT = true;
-    
+
+    private static final boolean DEFAULT_AUTO_CHECKOUT = false;
+
     private static final boolean DEFAULT_AUTO_CHECKIN = true;
-    
+
     private static final String PARAM_CHECKIN_ON_CREATE = ":checkinNewVersionableNodes";
 
     private static final String PARAM_AUTO_CHECKOUT = ":autoCheckout";
@@ -177,12 +177,12 @@ public class SlingPostServlet extends Sl
     private ImportOperation importOperation;
 
     /**
-     * The content importer reference. 
+     * The content importer reference.
      */
 	private ContentImporter contentImporter;
 
     private VersioningConfiguration baseVersioningConfiguration;
-    
+
     @Override
     public void init() {
         // default operation: create/modify
@@ -201,7 +201,7 @@ public class SlingPostServlet extends Sl
         postOperations.put(SlingPostConstants.OPERATION_CHECKIN, new CheckinOperation());
         postOperations.put(SlingPostConstants.OPERATION_CHECKOUT, new CheckoutOperation());
 
-        importOperation = new ImportOperation(defaultNodeNameGenerator, 
+        importOperation = new ImportOperation(defaultNodeNameGenerator,
             contentImporter);
         importOperation.setExtraNodeNameGenerators(cachedNodeNameGenerators);
         postOperations.put(SlingPostConstants.OPERATION_IMPORT,
@@ -218,7 +218,7 @@ public class SlingPostServlet extends Sl
     protected void doPost(SlingHttpServletRequest request,
             SlingHttpServletResponse response) throws IOException {
         VersioningConfiguration localVersioningConfig = createRequestVersioningConfiguration(request);
-        
+
         request.setAttribute(VersioningConfiguration.class.getName(), localVersioningConfig);
 
         // prepare the response
@@ -413,7 +413,7 @@ public class SlingPostServlet extends Sl
             }
             this.delayedNodeNameGenerators.clear();
         }
-        
+
         this.baseVersioningConfiguration = createBaseVersioningConfiguration(props);
     }
 
@@ -550,7 +550,7 @@ public class SlingPostServlet extends Sl
         	this.importOperation.setExtraNodeNameGenerators(this.cachedNodeNameGenerators);
         }
     }
-    
+
     protected void bindContentImporter(ContentImporter importer) {
         this.contentImporter = importer;
         if (importOperation != null) {
@@ -564,7 +564,7 @@ public class SlingPostServlet extends Sl
             importOperation.setContentImporter(null);
         }
     }
-    
+
     private VersioningConfiguration createBaseVersioningConfiguration(Dictionary<?, ?>
props) {
         VersioningConfiguration cfg = new VersioningConfiguration();
         cfg.setCheckinOnNewVersionableNode(OsgiUtil.toBoolean(
@@ -578,7 +578,7 @@ public class SlingPostServlet extends Sl
 
     private VersioningConfiguration createRequestVersioningConfiguration(SlingHttpServletRequest
request) {
         VersioningConfiguration cfg = baseVersioningConfiguration.clone();
-        
+
         String paramValue = request.getParameter(PARAM_CHECKIN_ON_CREATE);
         if (paramValue != null) {
             cfg.setCheckinOnNewVersionableNode(Boolean.parseBoolean(paramValue));

Modified: sling/trunk/bundles/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=1003842&r1=1003841&r2=1003842&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties
(original)
+++ sling/trunk/bundles/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties
Sat Oct  2 17:33:37 2010
@@ -54,7 +54,7 @@ servlet.post.checkinNewVersionableNodes.
  addition of the mix:versionable mixin are checked in. By default, false.
 servlet.post.autoCheckout.name = Auto Checkout Nodes
 servlet.post.autoCheckout.description = If true, checked in nodes are \
- checked out when necessary. By default, true.
+ checked out when necessary. By default, false.
 servlet.post.autoCheckin.name = Auto Checkin Nodes
 servlet.post.autoCheckin.description = If true, nodes which are checked out \
  by the post servlet are checked in. By default, true.
\ No newline at end of file



Mime
View raw message