ozeigermann    2004/07/27 04:39:50

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        OptionsMethod.java AclMethod.java
                        VersionControlMethod.java SearchMethod.java
                        LabelMethod.java RebindMethod.java
                        CheckinMethod.java UpdateMethod.java
                        MoveMethod.java ReportMethod.java
                        PropPatchMethod.java DeleteMethod.java
                        MkcolMethod.java CopyMethod.java
                        PropFindMethod.java LockMethod.java GetMethod.java
                        UncheckoutMethod.java BindMethod.java
                        AbstractWebdavMethod.java UnlockMethod.java
                        UnbindMethod.java PutMethod.java
                        MkworkspaceMethod.java CheckoutMethod.java
               src/conf/webapp Domain.xml
  Added:       src/webdav/server/org/apache/slide/webdav/method
                        WriteMethod.java ReadMethod.java
  Log:
  Introduced a global read/write lock that can be configured to
  allow at most a single write request per time.
  It can also be configured to either allow read requests or
  disallow them while another request writes.
  However, this switch will have no effect when requests are
  done inside external transactions.
  
  Made this mode the default one in Domain.xmlk
  
  Revision  Changes    Path
  1.42      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/OptionsMethod.java
  
  Index: OptionsMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/OptionsMethod.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- OptionsMethod.java        26 Feb 2004 15:45:54 -0000      1.41
  +++ OptionsMethod.java        27 Jul 2004 11:39:46 -0000      1.42
  @@ -58,7 +58,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
    */
   public class OptionsMethod extends AbstractWebdavMethod
  -    implements DeltavConstants, AclConstants, BindConstants {
  +    implements DeltavConstants, AclConstants, BindConstants, ReadMethod {
       
       // An XML outputter
       private XMLOutputter xmlOut;
  
  
  
  1.41      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AclMethod.java
  
  Index: AclMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AclMethod.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- AclMethod.java    24 Jun 2004 13:18:52 -0000      1.40
  +++ AclMethod.java    27 Jul 2004 11:39:47 -0000      1.41
  @@ -51,7 +51,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter Nevermann</a>
    */
  -public class AclMethod extends AbstractWebdavMethod implements AclConstants {
  +public class AclMethod extends AbstractWebdavMethod implements AclConstants, 
WriteMethod {
       
       private String resourcePath;
       private Vector permissions;
  
  
  
  1.28      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/VersionControlMethod.java
  
  Index: VersionControlMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/VersionControlMethod.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- VersionControlMethod.java 18 Jun 2004 16:05:46 -0000      1.27
  +++ VersionControlMethod.java 27 Jul 2004 11:39:47 -0000      1.28
  @@ -47,7 +47,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter Nevermann</a>
    */
   public class VersionControlMethod extends AbstractWebdavMethod
  -    implements DeltavConstants {
  +    implements DeltavConstants, WriteMethod {
       
       /**
        * Resource to be written.
  
  
  
  1.44      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/SearchMethod.java
  
  Index: SearchMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/SearchMethod.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- SearchMethod.java 28 Jun 2004 16:34:21 -0000      1.43
  +++ SearchMethod.java 27 Jul 2004 11:39:47 -0000      1.44
  @@ -64,7 +64,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Martin Wallmer</a>
    */
  -public class SearchMethod extends AbstractWebdavMethod implements WebdavConstants {
  +public class SearchMethod extends AbstractWebdavMethod implements WebdavConstants, 
ReadMethod {
       
       
       // ----------------------------------------------------- Instance variables
  
  
  
  1.26      +5 -5      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LabelMethod.java
  
  Index: LabelMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LabelMethod.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- LabelMethod.java  24 Jun 2004 13:18:52 -0000      1.25
  +++ LabelMethod.java  27 Jul 2004 11:39:47 -0000      1.26
  @@ -64,7 +64,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Ralf Stuckert</a>
    */
  -public class LabelMethod extends AbstractMultistatusResponseMethod implements 
DeltavConstants {
  +public class LabelMethod extends AbstractMultistatusResponseMethod implements 
DeltavConstants, WriteMethod {
       /**
        ** String constant for <code>Label missing</code>.
        **/
  
  
  
  1.14      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/RebindMethod.java
  
  Index: RebindMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/RebindMethod.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- RebindMethod.java 24 Jun 2004 13:18:52 -0000      1.13
  +++ RebindMethod.java 27 Jul 2004 11:39:47 -0000      1.14
  @@ -49,7 +49,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter Nevermann</a>
    */
  -public class RebindMethod extends AbstractWebdavMethod implements BindConstants {
  +public class RebindMethod extends AbstractWebdavMethod implements BindConstants, 
WriteMethod {
   
       private String sourceUri;
       private String sourceSegment;
  
  
  
  1.26      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CheckinMethod.java
  
  Index: CheckinMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CheckinMethod.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- CheckinMethod.java        24 Feb 2004 17:03:33 -0000      1.25
  +++ CheckinMethod.java        27 Jul 2004 11:39:47 -0000      1.26
  @@ -43,7 +43,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Ralf Stuckert</a>
    */
  -public class CheckinMethod extends AbstractWebdavMethod implements DeltavConstants {
  +public class CheckinMethod extends AbstractWebdavMethod implements DeltavConstants, 
WriteMethod {
   
       /** Resource to be written. */
       private String resourcePath;
  
  
  
  1.30      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UpdateMethod.java
  
  Index: UpdateMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UpdateMethod.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- UpdateMethod.java 24 Jun 2004 13:18:52 -0000      1.29
  +++ UpdateMethod.java 27 Jul 2004 11:39:47 -0000      1.30
  @@ -68,7 +68,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter Nevermann</a>
    */
   public class UpdateMethod extends AbstractMultistatusResponseMethod
  -    implements DeltavConstants {
  +    implements DeltavConstants, WriteMethod {
   
       /** The update target */
       private String resourcePath;
  
  
  
  1.70      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java
  
  Index: MoveMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- MoveMethod.java   24 Jun 2004 13:18:52 -0000      1.69
  +++ MoveMethod.java   27 Jul 2004 11:39:47 -0000      1.70
  @@ -76,7 +76,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
    * @author Juergen Pill
    */
  -public class MoveMethod extends AbstractMultistatusResponseMethod implements 
DeltavConstants, DeleteListener, CopyListener {
  +public class MoveMethod extends AbstractMultistatusResponseMethod implements 
DeltavConstants, DeleteListener, CopyListener, WriteMethod {
   
   
       /**
  
  
  
  1.69      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/ReportMethod.java
  
  Index: ReportMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/ReportMethod.java,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- ReportMethod.java 7 Jul 2004 16:14:23 -0000       1.68
  +++ ReportMethod.java 27 Jul 2004 11:39:47 -0000      1.69
  @@ -57,7 +57,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter Nevermann</a>
    */
  -public class ReportMethod extends AbstractWebdavMethod implements DeltavConstants, 
AclConstants {
  +public class ReportMethod extends AbstractWebdavMethod implements DeltavConstants, 
AclConstants, ReadMethod {
       
       private String resourcePath;
       private AbstractReport reportWorker;
  
  
  
  1.83      +4 -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.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- PropPatchMethod.java      22 Jul 2004 14:57:25 -0000      1.82
  +++ PropPatchMethod.java      27 Jul 2004 11:39:47 -0000      1.83
  @@ -77,7 +77,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
    */
  -public class PropPatchMethod extends AbstractWebdavMethod implements 
DeltavConstants, AclConstants {
  +public class PropPatchMethod extends AbstractWebdavMethod implements 
DeltavConstants, AclConstants, WriteMethod {
       
       
       // -------------------------------------------------------------- Constants
  
  
  
  1.34      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/DeleteMethod.java
  
  Index: DeleteMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/DeleteMethod.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- DeleteMethod.java 24 Feb 2004 17:03:33 -0000      1.33
  +++ DeleteMethod.java 27 Jul 2004 11:39:47 -0000      1.34
  @@ -56,7 +56,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
    */
  -public class DeleteMethod extends AbstractMultistatusResponseMethod implements 
DeltavConstants, DeleteListener {
  +public class DeleteMethod extends AbstractMultistatusResponseMethod implements 
DeltavConstants, DeleteListener, WriteMethod {
       
       
       // ----------------------------------------------------- Instance Variables
  
  
  
  1.33      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MkcolMethod.java
  
  Index: MkcolMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MkcolMethod.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- MkcolMethod.java  24 Feb 2004 17:03:33 -0000      1.32
  +++ MkcolMethod.java  27 Jul 2004 11:39:47 -0000      1.33
  @@ -53,7 +53,7 @@
    */
   public class MkcolMethod
       extends AbstractWebdavMethod
  -    implements DeltavConstants {
  +    implements DeltavConstants, WriteMethod {
       
       
       // ----------------------------------------------------- Instance Variables
  
  
  
  1.65      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java
  
  Index: CopyMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- CopyMethod.java   23 Jun 2004 13:19:59 -0000      1.64
  +++ CopyMethod.java   27 Jul 2004 11:39:47 -0000      1.65
  @@ -86,7 +86,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
    * @author Juergen Pill
    */
  -public class CopyMethod extends AbstractMultistatusResponseMethod implements 
DeltavConstants, AclConstants, BindConstants, CopyListener, DeleteListener, 
CopyRouteRedirector {
  +public class CopyMethod extends AbstractMultistatusResponseMethod implements 
DeltavConstants, AclConstants, BindConstants, CopyListener, DeleteListener, 
CopyRouteRedirector, WriteMethod {
       
       
       
  
  
  
  1.103     +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java
  
  Index: PropFindMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- PropFindMethod.java       24 Jun 2004 13:18:52 -0000      1.102
  +++ PropFindMethod.java       27 Jul 2004 11:39:47 -0000      1.103
  @@ -69,7 +69,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
    */
  -public class PropFindMethod extends AbstractWebdavMethod implements 
DeltavConstants, AclConstants {
  +public class PropFindMethod extends AbstractWebdavMethod implements 
DeltavConstants, AclConstants, ReadMethod {
       
       /**
        * Specify a property mask.
  
  
  
  1.66      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LockMethod.java
  
  Index: LockMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LockMethod.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- LockMethod.java   7 Jul 2004 10:11:18 -0000       1.65
  +++ LockMethod.java   27 Jul 2004 11:39:47 -0000      1.66
  @@ -65,7 +65,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat </a>
    */
   public class LockMethod extends AbstractMultistatusResponseMethod implements
  -             WebdavConstants {
  +             WebdavConstants, WriteMethod {
   
        // -------------------------------------------------------------- Constants
   
  
  
  
  1.47      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/GetMethod.java
  
  Index: GetMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/GetMethod.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- GetMethod.java    21 Jun 2004 08:49:46 -0000      1.46
  +++ GetMethod.java    27 Jul 2004 11:39:47 -0000      1.47
  @@ -60,7 +60,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
    */
  -public class GetMethod extends AbstractWebdavMethod {
  +public class GetMethod extends AbstractWebdavMethod implements ReadMethod {
   
   
       // -------------------------------------------------------------- Constants
  
  
  
  1.17      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UncheckoutMethod.java
  
  Index: UncheckoutMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UncheckoutMethod.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- UncheckoutMethod.java     24 Feb 2004 17:03:34 -0000      1.16
  +++ UncheckoutMethod.java     27 Jul 2004 11:39:48 -0000      1.17
  @@ -40,7 +40,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Ralf Stuckert</a>
    */
  -public class UncheckoutMethod extends AbstractWebdavMethod implements 
DeltavConstants {
  +public class UncheckoutMethod extends AbstractWebdavMethod implements 
DeltavConstants, WriteMethod {
       
       /**
        * String constant for <code>no-cache</code>.
  
  
  
  1.16      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/BindMethod.java
  
  Index: BindMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/BindMethod.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- BindMethod.java   24 Jun 2004 13:18:52 -0000      1.15
  +++ BindMethod.java   27 Jul 2004 11:39:48 -0000      1.16
  @@ -49,7 +49,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter Nevermann</a>
    */
  -public class BindMethod extends AbstractWebdavMethod implements BindConstants {
  +public class BindMethod extends AbstractWebdavMethod implements BindConstants, 
WriteMethod {
   
       private String sourceUri;
       private String collectionUri;
  
  
  
  1.38      +51 -5     
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AbstractWebdavMethod.java
  
  Index: AbstractWebdavMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AbstractWebdavMethod.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- AbstractWebdavMethod.java 13 Jul 2004 09:25:30 -0000      1.37
  +++ AbstractWebdavMethod.java 27 Jul 2004 11:39:48 -0000      1.38
  @@ -24,6 +24,7 @@
   package org.apache.slide.webdav.method;
   
   import java.io.IOException;
  +import java.io.PrintWriter;
   import java.io.StringWriter;
   import java.text.ParseException;
   import java.text.SimpleDateFormat;
  @@ -40,6 +41,9 @@
   import javax.transaction.SystemException;
   import javax.transaction.Transaction;
   
  +import org.apache.commons.transaction.locking.GenericLock;
  +import org.apache.commons.transaction.locking.MultiLevelLock;
  +import org.apache.commons.transaction.util.PrintWriterLogger;
   import org.apache.slide.common.Domain;
   import org.apache.slide.common.NamespaceAccessToken;
   import org.apache.slide.common.NestedSlideException;
  @@ -148,6 +152,10 @@
               new SimpleDateFormat("EEE MMMM d HH:mm:ss yyyy", Locale.US)
       };
   
  +    // create global read/write lock to allow for deadlock-free access
  +    private static final MultiLevelLock GLOBAL_LOCK = new GenericLock("global", 2, 
new PrintWriterLogger(
  +            new PrintWriter(System.out), LOG_CHANNEL, false));
  +    
       // ----------------------------------------------------- Instance Variables
   
   
  @@ -333,6 +341,11 @@
               if (!slideToken.isExternalTransaction() && 
methodNeedsTransactionSupport()) {
                   token.begin();
                   transactionIsStarted = true;
  +                if (this instanceof ReadMethod) {
  +                    assureGlobalReadLock();
  +                } else if (this instanceof WriteMethod) {
  +                    assureGlobalWriteLock();
  +                }
               }
   
               // clear expired lock-tokens
  @@ -399,6 +412,8 @@
                       // TODO Auto-generated catch block
                       e.printStackTrace();
                   }
  +            } else {
  +                releaseGlobalLock();
               }
           }
       }
  @@ -695,7 +710,7 @@
       protected boolean isMsProprietarySupport() {
           return (token.getNamespaceConfig().getParameter("ms") != null);
       }
  -    
  +
       /**
        * Sends a precondition vilolation response.
        *
  @@ -802,7 +817,38 @@
           return 
"true".equalsIgnoreCase(token.getNamespaceConfig().getParameter("history-collection-hack"));
       }
   
  -    /**
  +    protected boolean isSequentialWrite() {
  +        String sm = token.getNamespaceConfig().getParameter("sequential-mode");
  +        return ("write".equalsIgnoreCase(sm) || "full".equalsIgnoreCase(sm));
  +    }
  +    
  +    protected boolean isSequentialRead() {
  +        return 
"full".equalsIgnoreCase(token.getNamespaceConfig().getParameter("sequential-mode"));
  +    }
  +    
  +    protected void assureGlobalReadLock() {
  +        if (isSequentialRead()) {
  +            try {
  +                GLOBAL_LOCK.acquire(this, 1, true, true, Long.MAX_VALUE);
  +            } catch (InterruptedException e) {
  +            }
  +        }
  +    }
  +    
  +    protected void assureGlobalWriteLock() {
  +        if (isSequentialWrite()) {
  +            try {
  +                GLOBAL_LOCK.acquire(this, 2, true, true, Long.MAX_VALUE);
  +            } catch (InterruptedException e) {
  +            }
  +        }
  +    }
  +    
  +    protected void releaseGlobalLock() {
  +        GLOBAL_LOCK.release(this);
  +    }
  +
  +   /**
        * Returns the value of an integer init parameter of the servlet.
        * Default value: -1.
        */
  
  
  
  1.36      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UnlockMethod.java
  
  Index: UnlockMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UnlockMethod.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- UnlockMethod.java 5 Jul 2004 10:46:52 -0000       1.35
  +++ UnlockMethod.java 27 Jul 2004 11:39:48 -0000      1.36
  @@ -68,7 +68,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat </a>
    */
   public class UnlockMethod extends AbstractWebdavMethod implements
  -             WebdavConstants {
  +             WebdavConstants, WriteMethod {
   
        public static final String LOCK_TOKEN_HEADER_MISSING = "Lock-Token header 
missing";
   
  
  
  
  1.13      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UnbindMethod.java
  
  Index: UnbindMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UnbindMethod.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- UnbindMethod.java 24 Jun 2004 13:18:52 -0000      1.12
  +++ UnbindMethod.java 27 Jul 2004 11:39:48 -0000      1.13
  @@ -47,7 +47,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter Nevermann</a>
    */
  -public class UnbindMethod extends AbstractWebdavMethod implements BindConstants {
  +public class UnbindMethod extends AbstractWebdavMethod implements BindConstants, 
WriteMethod {
       
       private String collectionUri;
       private String segment;
  
  
  
  1.78      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PutMethod.java
  
  Index: PutMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PutMethod.java,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- PutMethod.java    24 Jun 2004 13:18:52 -0000      1.77
  +++ PutMethod.java    27 Jul 2004 11:39:48 -0000      1.78
  @@ -64,7 +64,7 @@
    */
   public class PutMethod
       extends AbstractWebdavMethod
  -    implements DeltavConstants {
  +    implements DeltavConstants, WriteMethod {
       
   
       // ----------------------------------------------------- Instance Variables
  
  
  
  1.10      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MkworkspaceMethod.java
  
  Index: MkworkspaceMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MkworkspaceMethod.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MkworkspaceMethod.java    11 Feb 2004 11:30:30 -0000      1.9
  +++ MkworkspaceMethod.java    27 Jul 2004 11:39:48 -0000      1.10
  @@ -40,7 +40,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter Nevermann</a>
    */
   public class MkworkspaceMethod extends AbstractWebdavMethod
  -implements DeltavConstants {
  +implements DeltavConstants, WriteMethod {
       
       /**
        * Resource to be created.
  
  
  
  1.30      +4 -4      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CheckoutMethod.java
  
  Index: CheckoutMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CheckoutMethod.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- CheckoutMethod.java       24 Feb 2004 17:03:33 -0000      1.29
  +++ CheckoutMethod.java       27 Jul 2004 11:39:48 -0000      1.30
  @@ -47,7 +47,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Ralf Stuckert</a>
    */
  -public class CheckoutMethod extends AbstractWebdavMethod implements DeltavConstants 
{
  +public class CheckoutMethod extends AbstractWebdavMethod implements 
DeltavConstants, WriteMethod {
   
       /** Resource to be written. */
       private String resourcePath;
  
  
  
  1.1                  
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WriteMethod.java
  
  Index: WriteMethod.java
  ===================================================================
  /*
   * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WriteMethod.java,v
 1.1 2004/07/27 11:39:47 ozeigermann Exp $
   * $Revision: 1.1 $
   * $Date: 2004/07/27 11:39:47 $
   *
   * ====================================================================
   *
   * Copyright 1999-2002 The Apache Software Foundation 
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   *
   */
  
  package org.apache.slide.webdav.method;
  
  /**
   * Marker interface to indicate this method is likely writes to persistent stores.
   */
  public interface WriteMethod {
  }
  
  
  
  
  1.1                  
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/ReadMethod.java
  
  Index: ReadMethod.java
  ===================================================================
  /*
   * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/ReadMethod.java,v
 1.1 2004/07/27 11:39:47 ozeigermann Exp $
   * $Revision: 1.1 $
   * $Date: 2004/07/27 11:39:47 $
   *
   * ====================================================================
   *
   * Copyright 1999-2002 The Apache Software Foundation 
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   *
   */
  
  package org.apache.slide.webdav.method;
  
  /**
   * Marker interface to indicate this method at most reads from persistent stores.
   */
  public interface ReadMethod {
  }
  
  
  
  1.63      +2 -0      jakarta-slide/src/conf/webapp/Domain.xml
  
  Index: Domain.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/conf/webapp/Domain.xml,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- Domain.xml        27 Jul 2004 09:15:13 -0000      1.62
  +++ Domain.xml        27 Jul 2004 11:39:49 -0000      1.63
  @@ -73,6 +73,8 @@
               <parameter name="acl_inheritance_type">path</parameter>
               <!-- Nested roles: 0 means no nesting (default), 1 means one sublevel, 
etc. -->
               <parameter name="nested_roles_maxdepth">0</parameter>
  +            <!-- Can be "off", "write" and "full" -->
  +            <parameter name="sequential-mode">full</parameter>
           </configuration>
           <data>
               <objectnode classname="org.apache.slide.structure.SubjectNode" uri="/">
  
  
  

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

Reply via email to