luetzkendorf    2005/01/19 07:21:27

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        PropPatchMethod.java
  Log:
  introduced new Domain parameter no-versioning-for-proppatch, that allows
  PROPPATCH on version controlled resources, that do not create new versions.
  
  Revision  Changes    Path
  1.91      +10 -4     
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropPatchMethod.java
  
  Index: PropPatchMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropPatchMethod.java,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- PropPatchMethod.java      10 Jan 2005 18:15:08 -0000      1.90
  +++ PropPatchMethod.java      19 Jan 2005 15:21:27 -0000      1.91
  @@ -29,12 +29,14 @@
   import java.util.Iterator;
   import java.util.List;
   
  +import org.apache.slide.common.Domain;
   import org.apache.slide.common.NamespaceAccessToken;
   import org.apache.slide.common.PropertyParseException;
   import org.apache.slide.common.RequestedPropertiesImpl;
   import org.apache.slide.common.RequestedProperty;
   import org.apache.slide.common.RequestedPropertyImpl;
   import org.apache.slide.common.ServiceAccessException;
  +import org.apache.slide.common.Uri;
   import org.apache.slide.content.NodeProperty;
   import org.apache.slide.content.NodeRevisionDescriptor;
   import org.apache.slide.content.NodeRevisionDescriptors;
  @@ -282,9 +284,10 @@
               
               // Changed for DeltaV --start--
               boolean mustCheckIn = false;
  -            if( Configuration.useVersionControl() &&
  -                   (resourceKind instanceof CheckedInVersionControlled) &&
  -               
versioningHelper.mustCheckoutAutoVersionedVCR(revisionDescriptors, 
revisionDescriptor) ) {
  +            if(Configuration.useVersionControl() &&
  +                (resourceKind instanceof CheckedInVersionControlled) &&
  +                !notVersionForPropPatch(token.getUri(slideToken, 
resourcePath)) &&
  +                
versioningHelper.mustCheckoutAutoVersionedVCR(revisionDescriptors, 
revisionDescriptor) ) {
                   
                   vHelp.checkout(revisionDescriptors, revisionDescriptor, 
false, false, true );
                   mustCheckIn = 
versioningHelper.mustCheckinAutoVersionedVCR(slideToken, revisionDescriptors, 
revisionDescriptor);
  @@ -713,7 +716,10 @@
           }
       }
       
  -    
  +    private static boolean notVersionForPropPatch(Uri resource) {
  +        return 
Boolean.valueOf(Domain.getParameter("no-versioning-for-proppatch", 
  +                "false", resource.getStore())).booleanValue();
  +    }
       
       /**
        * An extension of the RequestedProperties class manages 
PropPatchProperty
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to