You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Warwick Burrows <wa...@e2open.com> on 2004/12/07 18:12:12 UTC

RE: FW: cvs commit: jakarta-slide/src/webdav/server/org/apache/sl ide/ webdav/util/resourcekind DeltavCompliantUnmappedUrlImpl.java

Man, somehow I managed to miss that!  Of course I have scoured every other
commit log since looking for the tags but didn't go back to my original
email :-) Ok, now I'm happy and know that I can tell what fixes have gone to
which branch/tag from the commit log.

Thanks,
Warwick


> -----Original Message-----
> From: James Mason [mailto:masonjm@apache.org] 
> Sent: Tuesday, December 07, 2004 10:53 AM
> To: Slide Developers Mailing List
> Subject: RE: FW: cvs commit: 
> jakarta-slide/src/webdav/server/org/apache/sl ide/ 
> webdav/util/resourcekind DeltavCompliantUnmappedUrlImpl.java
> 
> 
> Warwick,
> The email for your last commit has a tag. And I quote (with edits) :)
> 
> wburrows    2004/12/06 15:01:48
> 
>   Modified:   
> testsuite/testsuite/junit/xmltestcases/functional/proppatch/code
>       ----- TAG ---->   Tag: SLIDE_2_1_RELEASE_BRANCH   <---- 
> TAG -----
>                         
> PropPatchDeleteDAVPropertyWithPropFindOnContentLength.xml
> 
> All of the other commits you've mentioned have been to HEAD, 
> so they don't mention a tag.
> 
> -James
> 
> On Tue, 2004-12-07 at 08:21 -0800, Warwick Burrows wrote:
> > Again, sorry James for repeating the question to the dev list again 
> > before reading your response :-)
> > 
> > But to clarify: in the case of my submission the email log 
> didn't have 
> > any tags and neither does the log for your fix, or for 
> Oliver's latest 
> > submission for the MacroImpl fix for copying read only 
> files and yet 
> > my fix went to the slide 2.1 release branch :-)
> > 
> > Warwick
> > 
> > 
> > > -----Original Message-----
> > > From: James Mason [mailto:masonjm@apache.org]
> > > Sent: Monday, December 06, 2004 9:55 PM
> > > To: Warwick Burrows
> > > Subject: Re: FW: cvs commit: 
> > > jakarta-slide/src/webdav/server/org/apache/slide/ 
> > > webdav/util/resourcekind DeltavCompliantUnmappedUrlImpl.java
> > > 
> > > 
> > > This was committed to HEAD. If it was to a different
> > > tag/branch, you would see the name of the tag/branch in front 
> > > of the file name. eg:
> > > 
> > >  Modified:    src/share/org/apache/slide/event Tag:
> > >                      SLIDE_2_1_RELEASE_BRANCH
> > > EventCollectionFilter.java
> > >               
> src/webdav/server/org/apache/slide/webdav/method Tag:
> > >                      SLIDE_2_1_RELEASE_BRANCH 
> > > AbstractWebdavMethod.java
> > >                      UnlockMethod.java
> > >               
> > > webdavclient/clientlib/src/java/org/apache/webdav/lib Tag:
> > >                      SLIDE_2_1_RELEASE_BRANCH WebdavResource.java
> > > 
> > > -James
> > > 
> > > On Mon, 2004-12-06 at 14:24 -0800, Warwick Burrows wrote:
> > > > Hi James,
> > > > 
> > > > I'm checking that my local CVS tree is properly in 
> sync. Were the
> > > > changes in the commit log submitted to the HEAD or the 
> 2.1 release 
> > > > branch?  Is there someway I can tell where it was submitted 
> > > from the
> > > > commit log itself?
> > > > 
> > > > Thanks,
> > > > Warwick
> > > > 
> > > > 
> > > > > -----Original Message-----
> > > > > From: masonjm@apache.org [mailto:masonjm@apache.org]
> > > > > Sent: Monday, December 06, 2004 2:54 AM
> > > > > To: jakarta-slide-cvs@apache.org
> > > > > Subject: cvs commit:
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/r
> > > > > esourcekind DeltavCompliantUnmappedUrlImpl.java
> > > > > 
> > > > > 
> > > > > masonjm     2004/12/06 00:54:14
> > > > > 
> > > > >   Modified:    src/webdav/server/org/apache/slide/webdav/util
> > > > >                         DeltavConstants.java 
> > > > > PropertyRetrieverImpl.java
> > > > >                         WebdavUtils.java WebdavConstants.java
> > > > >                         DirectoryIndexGenerator.java
> > > > >                
> src/webdav/server/org/apache/slide/webdav/method
> > > > >                         GetMethod.java PropFindMethod.java
> > > > >                         OptionsMethod.java
> > > AbstractWebdavMethod.java
> > > > >                         DefaultMethodFactory.java 
> PutMethod.java
> > > > >                src/share/org/apache/slide/util/resources
> > > > >                         messages.properties
> > > > >                src/conf/webapp slide.properties
> > > > >                src/conf/catalina slide.properties
> > > > >                src/share/org/apache/slide/content
> > > > >                         NodeRevisionDescriptor.java
> > > > >                src/share/org/apache/slide/util 
> > > > > Configuration.java
> > > > >                
> > > > > src/webdav/server/org/apache/slide/webdav/util/resourcekind
> > > > >                         DeltavCompliantUnmappedUrlImpl.java
> > > > >   Added:       src/webdav/server/org/apache/slide/webdav/util
> > > > >                         
> > > > > RedirectRefWorkaroundWithProvidedProperties.java
> > > > >                
> src/webdav/server/org/apache/slide/webdav/method
> > > > >                         MkredirectrefMethod.java
> > > > >   Log:
> > > > >   Initial support for Redirect References. 
> Contributed by Steve 
> > > > > Vaughan. Bug 29348.
> > > > >   
> > > > >   Revision  Changes    Path
> > > > >   1.32      +6 -3      
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/D
> > > > > eltavConstants.java
> > > > >   
> > > > >   Index: DeltavConstants.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/util/DeltavConstants.java,v
> > > > >   retrieving revision 1.31
> > > > >   retrieving revision 1.32
> > > > >   diff -u -r1.31 -r1.32
> > > > >   --- DeltavConstants.java	1 Oct 2004 11:22:18 
> > > -0000	1.31
> > > > >   +++ DeltavConstants.java	6 Dec 2004 08:54:13 
> > > -0000	1.32
> > > > >   @@ -95,12 +95,15 @@
> > > > >        String E_LOCKED_CHECKOUT                               
> > > > >                = "locked-checkout";
> > > > >        String E_LABEL                                         
> > > > >                = "label";
> > > > >        String E_LABEL_NAME                                    
> > > > >                = "label-name";
> > > > >   +    String E_MKREDIRECTREF                                 
> > > > >                = "mkredirectref";
> > > > >        String E_MKWORKSPACE                                   
> > > > >                = "mkworkspace";
> > > > >        String E_MKWORKSPACE_RESPONSE                          
> > > > >                = "mkworkspace-response";
> > > > >        String E_NAME                                          
> > > > >                = "name";
> > > > >        String E_OPTIONS                                       
> > > > >                = "options";
> > > > >        String E_OPTIONS_RESPONSE                              
> > > > >                = "options-response";
> > > > >        String E_PROPERTY                                      
> > > > >                = "property";
> > > > >   +    String E_REDIRECT_LIFETIME                             
> > > > >                = "redirect-lifetime";
> > > > >   +    String E_REFTARGET                                     
> > > > >                = "reftarget";
> > > > >        String E_SUPPORTED_LIVE_PROPERTY                       
> > > > >                = "supported-live-property";
> > > > >        String E_SUPPORTED_METHOD                              
> > > > >                = "supported-method";
> > > > >        String E_SUPPORTED_REPORT                              
> > > > >                = "supported-report";
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.44      +54 -5     
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/P
> > > > > ropertyRetrieverImpl.java
> > > > >   
> > > > >   Index: PropertyRetrieverImpl.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/util/PropertyRetrieverImpl.java,v
> > > > >   retrieving revision 1.43
> > > > >   retrieving revision 1.44
> > > > >   diff -u -r1.43 -r1.44
> > > > >   --- PropertyRetrieverImpl.java	2 Dec 2004 21:25:16 
> > > > > -0000	1.43
> > > > >   +++ PropertyRetrieverImpl.java	6 Dec 2004 08:54:13 
> > > > > -0000	1.44
> > > > >   @@ -468,7 +468,56 @@
> > > > >            
> > > > >            return elementList;
> > > > >        }
> > > > >   -    
> > > > >   +
> > > > >   +    /**
> > > > >   +     * Returns the requested properties of the resource 
> > > > > identified by the given
> > > > >   +     * <code>uri</code> and 
> > > <code>revisionNumber</code> as list of
> > > > >   +     * <code>&lt;propstat&gt;</code> JDOM Elements, but 
> > > > > representing the
> > > > >   +     * redirect reference as a file resource.  This method 
> > > > > is essentially the
> > > > >   +     * same as <code>getPropertiesOfObject</code>, but the 
> > > > > generated
> > > > >   +     * <code>RequestedResource</code> is replaced.  This 
> > > > > method should only
> > > > >   +     * be called for redirect references when the 
> > > > > user-agent doesn't support
> > > > >   +     * redirect references and requires this workaround.
> > > > >   +     *
> > > > >   +     * @param      requestedProperties    the 
> > > requested properties.
> > > > >   +     * @param      revisionDescriptors    the 
> > > > > NodeRevisionDescriptors of the
> > > > >   +     *                                    resource.
> > > > >   +     * @param      revisionDescriptor     the 
> > > > > NodeRevisionDescriptor of the
> > > > >   +     *                                    resource.
> > > > >   +     * @param      contextPath            a String, 
> > > the result of
> > > > >   +     *                                    
> > > > > HttpRequest.getContextPath()
> > > > >   +     * @param      servletPath            a String, 
> > > the result of
> > > > >   +     *                                    
> > > > > HttpRequest.getServletPath()     
> > > > >   +     * @param      extendedAllprop        indicates if the 
> > > > > <code>DeltaV</code>
> > > > >   +     *                                    specific 
> > > > > properties should be included
> > > > >   +     *                                    in case all 
> > > > > properties are requested.
> > > > >   +     *
> > > > >   +     * @return     the requested properties as list of
> > > > >   +     *             <code>&lt;propstat&gt;</code> 
> JDOM Element.
> > > > >   +     *
> > > > >   +     * @throws     SlideException
> > > > >   +     *
> > > > >   +     * @see        
> #getPropertiesOfObject(RequestedProperties,
> > > > >   +     *                     NodeRevisionDescriptors, 
> > > > > NodeRevisionDescriptor,
> > > > >   +     *                     String, String, boolean)
> > > > >   +     */
> > > > >   +    public List getWorkaroundPropertiesOfObject
> > > > >   +        (RequestedProperties requestedProperties,
> > > > >   +        NodeRevisionDescriptors revisionDescriptors,
> > > > >   +        NodeRevisionDescriptor revisionDescriptor, String 
> > > > > servletContextPath,
> > > > >   +        boolean extendedAllprop)
> > > > >   +        throws SlideException, JDOMException
> > > > >   +    {
> > > > >   +        ComputedPropertyProvider propertyProvider
> > > > >   +                = new ComputedPropertyProvider(nsaToken, 
> > > > > sToken, propertyHelper,
> > > > >   +                        servletContextPath);
> > > > >   +        return getPropertiesOfObject(requestedProperties,
> > > > >   +                new 
> > > RedirectRefWorkaroundWithProvidedProperties(
> > > > >   +                        revisionDescriptors, 
> > > revisionDescriptor,
> > > > >   +                        propertyProvider),
> > > > >   +                servletContextPath, extendedAllprop);
> > > > >   +    }
> > > > >   +
> > > > >        /**
> > > > >         * Returns a list of 
> <code>&lt;propstat&gt;</code> JDOM 
> > > > > Elements for the properties
> > > > >         * that could not be retrieved due to an error.
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.30      +24 -5     
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/W
> > > > > ebdavUtils.java
> > > > >   
> > > > >   Index: WebdavUtils.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/util/WebdavUtils.java,v
> > > > >   retrieving revision 1.29
> > > > >   retrieving revision 1.30
> > > > >   diff -u -r1.29 -r1.30
> > > > >   --- WebdavUtils.java	28 Sep 2004 22:00:03 
> -0000	1.29
> > > > >   +++ WebdavUtils.java	6 Dec 2004 08:54:13 
> -0000	1.30
> > > > >   @@ -500,7 +500,26 @@
> > > > >            
> > > > >            return result;
> > > > >        }
> > > > >   -    
> > > > >   +
> > > > >   +
> > > > >   +    /**
> > > > >   +     * Tests whether a resource is a redirect reference.
> > > > >   +     *
> > > > >   +     * @param revisionDescriptor revision descriptor of 
> > > > > the resource
> > > > >   +     *
> > > > >   +     * @return <code>true</code> if the descriptor 
> > > > > represents a redirect
> > > > >   +     *       reference, <code>false</code> otherwise.
> > > > >   +     */
> > > > >   +    public static boolean isRedirectref
> > > > >   +        (NodeRevisionDescriptor revisionDescriptor) {
> > > > >   +        if (revisionDescriptor == null)
> > > > >   +            return false;
> > > > >   +
> > > > >   +        return revisionDescriptor.propertyValueContains(
> > > > >   +                NodeRevisionDescriptor.RESOURCE_TYPE, 
> > > > > "redirectref");
> > > > >   +    }
> > > > >   +
> > > > >   +
> > > > >        public static String getSlidePath(String 
> fullpath, String 
> > > > > slideContextPath) {
> > > > >            // strip off the protocol://host:port part
> > > > >            if (fullpath.indexOf("://") >= 0) {
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.25      +14 -3     
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/W
> > > > > ebdavConstants.java
> > > > >   
> > > > >   Index: WebdavConstants.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/util/WebdavConstants.java,v
> > > > >   retrieving revision 1.24
> > > > >   retrieving revision 1.25
> > > > >   diff -u -r1.24 -r1.25
> > > > >   --- WebdavConstants.java	5 Aug 2004 14:43:30 
> > > -0000	1.24
> > > > >   +++ WebdavConstants.java	6 Dec 2004 08:54:13 
> > > -0000	1.25
> > > > >   @@ -40,6 +40,7 @@
> > > > >        /** Features */
> > > > >        String F_WEBDAV               = "1"; // class 1
> > > > >        String F_LOCKING              = "2"; // class 2
> > > > >   +    String F_REDIRECTREFS         = "redirectrefs";
> > > > >        String F_SLIDE                = "slide"; // what does 
> > > > > this feature exactly mean?
> > > > >    
> > > > >        /** Methods */
> > > > >   @@ -50,6 +51,7 @@
> > > > >        String M_HEAD                 = "HEAD";
> > > > >        String M_LOCK                 = "LOCK";
> > > > >        String M_MKCOL                = "MKCOL";
> > > > >   +    String M_MKREDIRECTREF        = "MKREDIRECTREF";
> > > > >        String M_MOVE                 = "MOVE";
> > > > >        String M_OPTIONS              = "OPTIONS";
> > > > >        String M_POST                 = "POST";
> > > > >   @@ -60,6 +62,7 @@
> > > > >        String M_UNLOCK               = "UNLOCK";
> > > > >    
> > > > >        /** Headers */
> > > > >   +    String H_APPLY_TO_REDIRECT_REF = 
> "Apply-To-Redirect-Ref";
> > > > >        String H_CACHE_CONTROL        = "Cache-Control";
> > > > >        String H_DAV                  = "DAV";
> > > > >        String H_DEPTH                = "Depth";
> > > > >   @@ -68,6 +71,7 @@
> > > > >        String H_LOCK_TOKEN           = "Lock-Token";
> > > > >        String H_LOCATION             = "Location";
> > > > >        String H_OVERWRITE            = "Overwrite";
> > > > >   +    String H_REDIRECT_REF         = "Redirect-Ref";
> > > > >        String H_STATUS_URI           = "Status-URI";
> > > > >        String H_TIMEOUT              = "Timeout";
> > > > >        String H_TRANSACTION          = "Transaction";
> > > > >   @@ -87,6 +91,7 @@
> > > > >        String E_HREF                 = "href";
> > > > >        String E_KEEPALIVE            = "keepalive";
> > > > >        String E_LINK                 = "link";
> > > > >   +    String E_LOCATION             = "location";
> > > > >        String E_LOCAL                = "local";
> > > > >        String E_LOCKDISCOVERY        = "lockdiscovery";
> > > > >        String E_LOCKENTRY            = "lockentry";
> > > > >   @@ -98,6 +103,7 @@
> > > > >        String E_MULTISTATUS          = "multistatus";
> > > > >        String E_OMIT                 = "omit";
> > > > >        String E_OWNER                = "owner";
> > > > >   +    String E_PERMANENT            = "permanent";
> > > > >        String E_PROP                 = "prop";
> > > > >        String E_PROPERTYBEHAVIOR     = "propertybehavior";
> > > > >        String E_PROPERTYUPDATE       = "propertyupdate";
> > > > >   @@ -112,6 +118,7 @@
> > > > >        String E_SHARED               = "shared";
> > > > >        String E_SRC                  = "src";
> > > > >        String E_STATUS               = "status";
> > > > >   +    String E_TEMPORARY            = "temporary";
> > > > >        String E_TIMEOUT              = "timeout";
> > > > >        String E_TRANSACTION          = "transaction";
> > > > >        String E_TRANSACTIONINFO      = "transactioninfo";
> > > > >   @@ -128,6 +135,8 @@
> > > > >        String P_GETETAG              = "getetag";
> > > > >        String P_GETLASTMODIFIED      = "getlastmodified";
> > > > >        String P_LOCKDISCOVERY        = "lockdiscovery";
> > > > >   +    String P_REDIRECT_LIFETIME    = "redirect-lifetime";
> > > > >   +    String P_REFTARGET            = "reftarget";
> > > > >        String P_RESOURCETYPE         = "resourcetype";
> > > > >        String P_SOURCE               = "source";
> > > > >        String P_SUPPORTEDLOCK        = "supportedlock";
> > > > >   @@ -142,6 +151,8 @@
> > > > >            P_GETETAG,
> > > > >            P_GETLASTMODIFIED,
> > > > >            P_LOCKDISCOVERY,
> > > > >   +        P_REDIRECT_LIFETIME,
> > > > >   +        P_REFTARGET,
> > > > >            P_RESOURCETYPE,
> > > > >            P_SOURCE,
> > > > >            P_SUPPORTEDLOCK
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.12      +16 -6     
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/D
> > > > > irectoryIndexGenerator.java
> > > > >   
> > > > >   Index: DirectoryIndexGenerator.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/util/DirectoryIndexGenerator.java,v
> > > > >   retrieving revision 1.11
> > > > >   retrieving revision 1.12
> > > > >   diff -u -r1.11 -r1.12
> > > > >   --- DirectoryIndexGenerator.java	24 Nov 2004 16:22:45 
> > > > > -0000	1.11
> > > > >   +++ DirectoryIndexGenerator.java	6 Dec 2004 08:54:13 
> > > > > -0000	1.12
> > > > >   @@ -37,6 +37,7 @@
> > > > >    import org.apache.slide.common.SlideException;
> > > > >    import org.apache.slide.common.SlideToken;
> > > > >    import org.apache.slide.content.Content;
> > > > >   +import org.apache.slide.content.NodeProperty;
> > > > >    import org.apache.slide.content.NodeRevisionDescriptor;
> > > > >    import org.apache.slide.content.NodeRevisionDescriptors;
> > > > >    import org.apache.slide.lock.Lock;
> > > > >   @@ -300,14 +301,23 @@
> > > > >                writer.print("<a href=\"");
> > > > >                
> > > > > writer.print(WebdavUtils.getAbsolutePath(currentResource,
> > > > > req, config));
> > > > >                writer.print("\"><tt>");
> > > > >   -            writer.print(stringToCharacterRef(trimmed));   
> > > > > // I18N chars
> > > > >   +            NodeProperty displayname = 
> > > > > currentDescriptor.getProperty("displayname");
> > > > >   +            if (displayname != null)
> > > > >   +               
> > > > > 
> > > 
> writer.print(stringToCharacterRef((String)displayname.getValue()));
> > > > >   +            else
> > > > >   +               
> > > > > writer.print(stringToCharacterRef(trimmed));   // I18N chars
> > > > >   +               
> > > > >                if 
> (WebdavUtils.isCollection(currentDescriptor)) {
> > > > >                    writer.print("/");
> > > > >                }
> > > > >   +            else if 
> > > > > (WebdavUtils.isRedirectref(currentDescriptor)) {
> > > > >   +                writer.print("*");
> > > > >   +            }
> > > > >                writer.print("</tt></a></td>\r\n");
> > > > >                
> > > > >                writer.print("<td align=\"right\"><tt>");
> > > > >   -            if 
> (WebdavUtils.isCollection(currentDescriptor)) {
> > > > >   +            if (WebdavUtils.isCollection(currentDescriptor)
> > > > >   +                    || 
> > > > > WebdavUtils.isRedirectref(currentDescriptor)) {
> > > > >                    writer.print("&nbsp;");
> > > > >                }
> > > > >                else {
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.1                  
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/R
> > > > > edirectRefWorkaroundWithProvidedProperties.java
> > > > >   
> > > > >   Index: RedirectRefWorkaroundWithProvidedProperties.java
> > > > >   
> > > 
> ===================================================================
> > > > >   /*
> > > > >    * $Header: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/util/RedirectRefWorkaroundWithProvidedProperties.java,v
> > > > > 1.1 2004/12/06 08:54:13 masonjm Exp $
> > > > >    * $Revision: 1.1 $
> > > > >    * $Date: 2004/12/06 08:54:13 $
> > > > >    *
> > > > >    * 
> > > > > 
> > > 
> ====================================================================
> > > > >    *
> > > > >    * 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.util;
> > > > >   
> > > > >   import org.apache.slide.common.PropertyName;
> > > > >   import org.apache.slide.common.SlideException;
> > > > >   import org.apache.slide.content.NodeProperty;
> > > > >   import org.apache.slide.content.NodeRevisionDescriptor;
> > > > >   import org.apache.slide.content.NodeRevisionDescriptors;
> > > > >   import org.apache.slide.search.PropertyProvider;
> > > > >   
> > > > >   import java.util.HashSet;
> > > > >   import java.util.Iterator;
> > > > >   import java.util.Set;
> > > > >   
> > > > >   /**
> > > > >    * This is an adapter that creates a RequestedResource
> > > from a given
> > > > >    * NodeRevisionDescriptor(s) for cases when the requesting 
> > > > > user-agent does not
> > > > >    * support redirect references.
> > > > >    *
> > > > >    * @author <a
> > > href="mailto:snmvaughan92@yahoo.com>snmvaughan92</a>
> > > > >    */
> > > > >   public class RedirectRefWorkaroundWithProvidedProperties
> > > > >      extends ResourceWithProvidedProperties {
> > > > >   
> > > > >      /**
> > > > >       * Create a RequestedResource extends 
> > > > > ResourceWithProvidedProperties to
> > > > >       * present a "text/url" file resource.
> > > > >       * 
> > > > >       * @param      revisionDescriptors  the 
> > > > > NodeRevisionDescriptors this
> > > > >       *                                  resource is based on.
> > > > >       * @param      revisionDescriptor   the 
> > > > > NodeRevisionDescriptor this
> > > > >       *                                  resource is based on.
> > > > >       * @param      propertyProvider     the PropertyProvider 
> > > > > that provides the
> > > > >       *                                  additional 
> > > properties (may be
> > > > >       *                                  <code>null</code>).
> > > > >       */
> > > > >      public RedirectRefWorkaroundWithProvidedProperties(
> > > > >         NodeRevisionDescriptors revisionDescriptors,
> > > > >         NodeRevisionDescriptor revisionDescriptor,
> > > > >         PropertyProvider propertyProvider) {
> > > > >         super(revisionDescriptors, revisionDescriptor,
> > > > > propertyProvider);
> > > > >      }
> > > > >   
> > > > >   
> > > > >      /**
> > > > >       * Return the property associated with the specified 
> > > > > property name and
> > > > >       * namespace except:
> > > > >       * <ul>
> > > > >       * <li><code>resourcetype</code> is always an empty
> > > > > string in order to make
> > > > >       *     the resource appear to be a file resource.  
> > > > > WebFolders treat all
> > > > >       *     non-file resource types as collections.</li>
> > > > >       * </ul>
> > > > >       * 
> > > > >       * @see 
> > > > > ResourceWithProvidedProperties#getProperty(java.lang.String,
> > > > >       *         java.lang.String)
> > > > >       */
> > > > >      public NodeProperty getProperty(String name, String 
> > > namespace)
> > > > >         throws SlideException {
> > > > >         if ("DAV:".equals(namespace)) {
> > > > >            if ("resourcetype".equals(name)) {
> > > > >               return new NodeProperty(name, "", namespace);
> > > > >            }
> > > > >         }
> > > > >   
> > > > >         return super.getProperty(name, namespace);
> > > > >      }
> > > > >   
> > > > >   
> > > > >      /**
> > > > >       * Instead of directly getting the properties from the 
> > > > > revision descriptor,
> > > > >       * we use the list of all property names and call
> > > > > <code>getProperty</code>.
> > > > >       * This allows us to have a single method which contains 
> > > > > all workaround
> > > > >       * code.
> > > > >       * 
> > > > >       * @see ResourceWithProvidedProperties#getAllProperties()
> > > > >       */
> > > > >      public Iterator getAllProperties() throws 
> SlideException {
> > > > >         Set properties = new HashSet();
> > > > >   
> > > > >         Iterator names = getAllPropertiesNames();
> > > > >         while (names.hasNext()) {
> > > > >            PropertyName name = (PropertyName) names.next();
> > > > >            properties.add(getProperty(name));
> > > > >         }
> > > > >   
> > > > >         return properties.iterator();
> > > > >      }
> > > > >   }
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.56      +10 -3     
> > > > > 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/web
> > > > > dav/method/GetMethod.java,v
> > > > >   retrieving revision 1.55
> > > > >   retrieving revision 1.56
> > > > >   diff -u -r1.55 -r1.56
> > > > >   --- GetMethod.java	9 Nov 2004 15:00:28 -0000	1.55
> > > > >   +++ GetMethod.java	6 Dec 2004 08:54:13 -0000	1.56
> > > > >   @@ -240,6 +240,13 @@
> > > > >                                
> > > > > NodeRevisionDescriptor.COLLECTION_TYPE)) {
> > > > >                            displayDirectory();
> > > > >                        } else {
> > > > >   +                        
> > > > >   +                        // Check if this is a redirect 
> > > reference.
> > > > >   +                        if 
> > > > > (WebdavUtils.isRedirectref(revisionDescriptor)) {
> > > > >   +                            
> > > > > resp.sendError(HttpServletResponse.SC_FORBIDDEN,
> > > > >   +                                    "Redirect references 
> > > > > do not have bodies");
> > > > >   +                            return;
> > > > >   +                        }
> > > > >                        
> > > > >                            ResourceInfo resourceInfo =
> > > > >                                new ResourceInfo(resourcePath, 
> > > > > revisionDescriptor);
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.111     +109 -61   
> > > > > 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/web
> > > > > dav/method/PropFindMethod.java,v
> > > > >   retrieving revision 1.110
> > > > >   retrieving revision 1.111
> > > > >   diff -u -r1.110 -r1.111
> > > > >   --- PropFindMethod.java	26 Nov 2004 23:37:44 
> -0000	1.110
> > > > >   +++ PropFindMethod.java	6 Dec 2004 08:54:13 
> -0000	1.111
> > > > >   @@ -96,6 +96,12 @@
> > > > >         * Depth.
> > > > >         */
> > > > >        protected int depth;
> > > > >   +
> > > > >   +    
> > > > >   +    /**
> > > > >   +     * Special workarounds based on "User Agent" detection.
> > > > >   +     */
> > > > >   +    protected boolean agentWorkaround;
> > > > >        
> > > > >        
> > > > >        /**
> > > > >   @@ -103,6 +109,7 @@
> > > > >         */
> > > > >        protected int propFindType;
> > > > >        
> > > > >   +    
> > > > >        /** if true, an ALL_PROP request will include
> > > computed props */
> > > > >        protected boolean extendedAllprop = false;
> > > > >        
> > > > >   @@ -135,6 +142,11 @@
> > > > >        protected String labelHeader = null;
> > > > >        
> > > > >        /**
> > > > >   +     * The value of the 
> > > <code>Apply-To-Redirect-Ref</code> header.
> > > > >   +     */
> > > > >   +    protected boolean applyToRedirectRef;
> > > > >   +    
> > > > >   +    /**
> > > > >         * If set <code>true</code>, instead of creating the 
> > > > > complete response document
> > > > >         * in memory and then sending it to the client,
> > > > > available parts of the response
> > > > >         * are send immediatly in order to reduce the 
> > > memory footprint.
> > > > >   @@ -193,8 +205,12 @@
> > > > >            
> > > > >            labelHeader = 
> > > > > 
> WebdavUtils.fixTomcatHeader(requestHeaders.getLabel(), "UTF-8");
> > > > >            
> > > > >   +        applyToRedirectRef = 
> > > > > requestHeaders.getApplyToRedirectRef(false);
> > > > >   +        
> > > > >            retrieveDepth();
> > > > >            
> > > > >   +        agentWorkaround = "Microsoft Data Access Internet 
> > > > > Publishing Provider DAV".equals(req.getHeader("User-Agent"));
> > > > >   +        
> > > > >            if (req.getContentLength() == 0) {
> > > > >                requestedProperties = new
> > > RequestedPropertiesImpl();
> > > > >                requestedProperties.setIsAllProp(true);
> > > > >   @@ -295,8 +311,11 @@
> > > > >            
> > > > >            // Create multistatus object
> > > > >            Element multistatusElement = new 
> > > > > Element(E_MULTISTATUS, DNSP);
> > > > >   -        org.jdom.output.Format format = 
> > > > > org.jdom.output.Format.getPrettyFormat();
> > > > >   -        format.setIndent(XML_RESPONSE_INDENT);
> > > > >   +        // We shouldn't pretty print (indent) the output, 
> > > > > since this may
> > > > >   +        // potentially corrupt the property values.
> > > > >   +//        org.jdom.output.Format format = 
> > > > > org.jdom.output.Format.getPrettyFormat();
> > > > >   +//        format.setIndent(XML_RESPONSE_INDENT);
> > > > >   +        org.jdom.output.Format format = 
> > > > > org.jdom.output.Format.getRawFormat();
> > > > >            XMLOutputter xmlOutputter = new 
> XMLOutputter(format);
> > > > >            
> > > > >            if (resource != null) {
> > > > >   @@ -511,62 +530,91 @@
> > > > >                throw new WebdavException( statusCode );
> > > > >            }
> > > > >    
> > > > >   -        PropertyRetrieverImpl propertyRetriever = new 
> > > > > PropertyRetrieverImpl(token, lightSToken, getConfig());
> > > > >   -
> > > > >   -        switch (propFindType) {
> > > > >   -            case FIND_ALL_PROP :
> > > > >   -            case FIND_BY_PROPERTY :
> > > > >   -                try {
> > > > >   -                    List propstatList= 
> > > > > propertyRetriever.getPropertiesOfObject(requestedProperties,
> > > > > revisionDescriptors, revisionDescriptor,
> > > > > getSlideContextPath(), extendedAllprop);
> > > > >   -                    Iterator iterator = 
> > > propstatList.iterator();
> > > > >   -                    while (iterator.hasNext()) {
> > > > >   -                        
> > > > > responseElement.addContent((Element)iterator.next());
> > > > >   -                    }
> > > > >   -                } catch (ServiceAccessException e) {
> > > > >   -                    int statusCode = 
> WebdavStatus.SC_FORBIDDEN;
> > > > >   -                    sendError( statusCode, e );
> > > > >   -                    throw new WebdavException( 
> statusCode );
> > > > >   -                } catch (Exception e) {
> > > > >   -                    int statusCode = getErrorCode( e );
> > > > >   -                    sendError( statusCode, e );
> > > > >   -                    throw new WebdavException( 
> statusCode );
> > > > >   -                }
> > > > >   -                break;
> > > > >   -            case FIND_PROPERTY_NAMES :
> > > > >   -
> > > > >   -                try {
> > > > >   -                    status = HTTP_VERSION + " " + 
> > > > > WebdavStatus.SC_OK + " " 
> > > > >   -                        + 
> > > > > WebdavStatus.getStatusText(WebdavStatus.SC_OK);
> > > > >   -
> > > > >   -                    Element propstatElement = new 
> > > > > Element(E_PROPSTAT, DNSP);
> > > > >   -                    Element propElement = new 
> > > > > Element(E_PROP, DNSP);
> > > > >   -                    RequestedProperties propnames =
> > > > >   -                        
> > > > > propertyRetriever.getAllPropertyNames(object.getUri(), true);
> > > > >   -                    Iterator iterator = 
> > > > > propnames.getRequestedProperties();
> > > > >   -                    while (iterator.hasNext()) {
> > > > >   -                        RequestedProperty p = 
> > > > > (RequestedProperty)iterator.next();
> > > > >   -                        Namespace nsp = 
> > > > > DNSP.getURI().equals(p.getNamespace())
> > > > >   -                            ? DNSP
> > > > >   -                            : 
> > > > > Namespace.getNamespace(p.getNamespace());
> > > > >   -                        propElement.addContent(new 
> > > > > Element(p.getName(), nsp));
> > > > >   -                    }
> > > > >   -                    Element statusElement = new 
> > > > > Element(E_STATUS, DNSP);
> > > > >   -                    statusElement.setText(status);
> > > > >   -                    
> propstatElement.addContent(propElement);
> > > > >   -                    
> propstatElement.addContent(statusElement);
> > > > >   -                    
> > > responseElement.addContent(propstatElement);
> > > > >   -                }
> > > > >   -                catch (ServiceAccessException e) {
> > > > >   -                    int statusCode = 
> WebdavStatus.SC_FORBIDDEN;
> > > > >   -                    sendError( statusCode, e );
> > > > >   -                    throw new WebdavException( 
> statusCode );
> > > > >   -                }
> > > > >   -                catch (Exception e) {
> > > > >   -                    int statusCode = getErrorCode( e );
> > > > >   -                    sendError( statusCode, e );
> > > > >   -                    throw new WebdavException( 
> statusCode );
> > > > >   -                }
> > > > >   -                break;
> > > > >   +        if (WebdavUtils.isRedirectref(revisionDescriptor) 
> > > > > && !applyToRedirectRef && !agentWorkaround) {
> > > > >   +            int statusCode;
> > > > >   +            if (revisionDescriptor.propertyValueContains(
> > > > >   +                  NodeRevisionDescriptor.RESOURCE_TYPE, 
> > > > > "permanent"))
> > > > >   +               statusCode = 
> WebdavStatus.SC_MOVED_PERMANENTLY;
> > > > >   +            else
> > > > >   +               statusCode = 
> WebdavStatus.SC_MOVED_TEMPORARILY;
> > > > >   +            status = new String("HTTP/1.1 " + 
> statusCode + " "
> > > > >   +                     + 
> WebdavStatus.getStatusText(statusCode));
> > > > >   +            Element statusElement = new 
> > > Element(E_STATUS, DNSP);
> > > > >   +            statusElement.setText(status);
> > > > >   +            responseElement.addContent(statusElement);
> > > > >   +            // @todo What if reftarget is undefined? (an 
> > > > > invalid state)
> > > > >   +            // @todo What if reftarget is relative?
> > > > >   +            Element hrefElement = new 
> Element(E_HREF, DNSP);
> > > > >   +            Object refTarget = 
> > > > > revisionDescriptor.getProperty(P_REFTARGET)
> > > > >   +                    .getValue();
> > > > >   +            hrefElement.setText(refTarget.toString());
> > > > >   +            Element locationElement = new 
> > > > > Element(E_LOCATION, DNSP);
> > > > >   +            locationElement.addContent(hrefElement);
> > > > >   +            responseElement.addContent(locationElement);
> > > > >   +        }
> > > > >   +        else {
> > > > >   +            PropertyRetrieverImpl propertyRetriever = new 
> > > > > PropertyRetrieverImpl(token, lightSToken, getConfig());
> > > > >   +    
> > > > >   +            switch (propFindType) {
> > > > >   +                case FIND_ALL_PROP :
> > > > >   +                case FIND_BY_PROPERTY :
> > > > >   +                    try {
> > > > >   +                        List propstatList;
> > > > >   +                        if 
> > > > > (WebdavUtils.isRedirectref(revisionDescriptor)
> > > > >   +                               && agentWorkaround)
> > > > >   +                            propstatList = 
> > > > > propertyRetriever.getWorkaroundPropertiesOfObject(requestedPro
> > > > > perties, revisionDescriptors, revisionDescriptor,
> > > > > getSlideContextPath(), extendedAllprop);
> > > > >   +                        else
> > > > >   +                            propstatList = 
> > > > > propertyRetriever.getPropertiesOfObject(requestedProperties, 
> > > > > revisionDescriptors, revisionDescriptor, 
> > > > > getSlideContextPath(), extendedAllprop);
> > > > >   +                        Iterator iterator = 
> > > > > propstatList.iterator();
> > > > >   +                        while (iterator.hasNext()) {
> > > > >   +                            
> > > > > responseElement.addContent((Element)iterator.next());
> > > > >   +                        }
> > > > >   +                    } catch (ServiceAccessException e) {
> > > > >   +                        int statusCode = 
> > > WebdavStatus.SC_FORBIDDEN;
> > > > >   +                        sendError( statusCode, e );
> > > > >   +                        throw new WebdavException( 
> > > statusCode );
> > > > >   +                    } catch (Exception e) {
> > > > >   +                        int statusCode = getErrorCode( e );
> > > > >   +                        sendError( statusCode, e );
> > > > >   +                        throw new WebdavException( 
> > > statusCode );
> > > > >   +                    }
> > > > >   +                    break;
> > > > >   +                case FIND_PROPERTY_NAMES :
> > > > >   +    
> > > > >   +                    try {
> > > > >   +                        status = HTTP_VERSION + " " + 
> > > > > WebdavStatus.SC_OK + " " 
> > > > >   +                            + 
> > > > > WebdavStatus.getStatusText(WebdavStatus.SC_OK);
> > > > >   +    
> > > > >   +                        Element propstatElement = new 
> > > > > Element(E_PROPSTAT, DNSP);
> > > > >   +                        Element propElement = new 
> > > > > Element(E_PROP, DNSP);
> > > > >   +                        RequestedProperties propnames =
> > > > >   +                            
> > > > > propertyRetriever.getAllPropertyNames(object.getUri(), true);
> > > > >   +                        Iterator iterator = 
> > > > > propnames.getRequestedProperties();
> > > > >   +                        while (iterator.hasNext()) {
> > > > >   +                            RequestedProperty p = 
> > > > > (RequestedProperty)iterator.next();
> > > > >   +                            Namespace nsp = 
> > > > > DNSP.getURI().equals(p.getNamespace())
> > > > >   +                                ? DNSP
> > > > >   +                                : 
> > > > > Namespace.getNamespace(p.getNamespace());
> > > > >   +                            propElement.addContent(new 
> > > > > Element(p.getName(), nsp));
> > > > >   +                        }
> > > > >   +                        Element statusElement = new 
> > > > > Element(E_STATUS, DNSP);
> > > > >   +                        statusElement.setText(status);
> > > > >   +                        
> > > propstatElement.addContent(propElement);
> > > > >   +                        
> > > propstatElement.addContent(statusElement);
> > > > >   +                        
> > > > > responseElement.addContent(propstatElement);
> > > > >   +                    }
> > > > >   +                    catch (ServiceAccessException e) {
> > > > >   +                        int statusCode = 
> > > WebdavStatus.SC_FORBIDDEN;
> > > > >   +                        sendError( statusCode, e );
> > > > >   +                        throw new WebdavException( 
> > > statusCode );
> > > > >   +                    }
> > > > >   +                    catch (Exception e) {
> > > > >   +                        int statusCode = getErrorCode( e );
> > > > >   +                        sendError( statusCode, e );
> > > > >   +                        throw new WebdavException( 
> > > statusCode );
> > > > >   +                    }
> > > > >   +                    break;
> > > > >   +            }
> > > > >            }
> > > > >    
> > > > >            return responseElement;
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.49      +8 -3      
> > > > > 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/web
> > > > > dav/method/OptionsMethod.java,v
> > > > >   retrieving revision 1.48
> > > > >   retrieving revision 1.49
> > > > >   diff -u -r1.48 -r1.49
> > > > >   --- OptionsMethod.java	26 Oct 2004 20:06:01 
> -0000	1.48
> > > > >   +++ OptionsMethod.java	6 Dec 2004 08:54:13 
> -0000	1.49
> > > > >   @@ -150,6 +150,9 @@
> > > > >            if( Configuration.useGlobalBinding() )
> > > > >                davHeader.append( ", " ).append( F_BINDING );
> > > > >            
> > > > >   +        if (Configuration.useRedirectReferences())
> > > > >   +            davHeader.append(", ").append(F_REDIRECTREFS);
> > > > >   +        
> > > > >            resp.addHeader( "DAV", davHeader.toString() );
> > > > >            
> > > > >            if( Configuration.useVersionControl() ) {
> > > > >   @@ -215,6 +218,8 @@
> > > > >                methodsAllowed.append( "OPTIONS, MKCOL, PUT" );
> > > > >                if( Configuration.useIntegratedLocking() )
> > > > >                    methodsAllowed.append( ", LOCK" );
> > > > >   +            if (Configuration.useRedirectReferences())
> > > > >   +                methodsAllowed.append(", MKREDIRECTREF");
> > > > >            }
> > > > >            
> > > > >            resp.addHeader("Allow", methodsAllowed.toString());
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.63      +94 -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/web
> > > > > dav/method/AbstractWebdavMethod.java,v
> > > > >   retrieving revision 1.62
> > > > >   retrieving revision 1.63
> > > > >   diff -u -r1.62 -r1.63
> > > > >   --- AbstractWebdavMethod.java	29 Nov 2004 18:55:15 
> > > > > -0000	1.62
> > > > >   +++ AbstractWebdavMethod.java	6 Dec 2004 08:54:13 
> > > > > -0000	1.63
> > > > >   @@ -112,6 +112,11 @@
> > > > >        protected static final String NO_CACHE = "no-cache";
> > > > >    
> > > > >        /**
> > > > >   +     * String constant for <code>private</code>.
> > > > >   +     */
> > > > >   +    protected static final String PRIVATE_CACHE = 
> "private";
> > > > >   +
> > > > >   +    /**
> > > > >         * String constant for <code>http://</code>.
> > > > >         */
> > > > >        public static final String HTTP_PROTOCOL = "http://";
> > > > >   @@ -408,8 +413,55 @@
> > > > >                } catch (ObjectNotFoundException e) {
> > > > >                    // ignore, it can't have locks
> > > > >                }
> > > > >   +
> > > > >   +            boolean responseIsRedirected = false;
> > > > >   +            if 
> (!requestHeaders.getApplyToRedirectRef(false)) {
> > > > >   +                try {
> > > > >   +                    NodeRevisionDescriptors 
> revisionDescriptors
> > > > >   +                            = content.retrieve(slideToken, 
> > > > > requestUri);
> > > > >   +                    NodeRevisionDescriptor 
> revisionDescriptor
> > > > >   +                            = content.retrieve(slideToken, 
> > > > > revisionDescriptors);
> > > > >   +                    if 
> > > > > (WebdavUtils.isRedirectref(revisionDescriptor)) {
> > > > >   +                        NodeProperty refTarget
> > > > >   +                                = 
> > > > > revisionDescriptor.getProperty(P_REFTARGET);
> > > > >   +
> > > > >   +                        // Add the header indicating that 
> > > > > this redirect is the
> > > > >   +                        // result of a redirect reference.
> > > > >   +                        resp.addHeader(H_REDIRECT_REF,
> > > > >   +                                
> > > refTarget.getValue().toString());
> > > > >   +                     
> > > > >   +                        // Set the location header for the 
> > > > > redirect.
> > > > >   +                        resp.addHeader("Location",
> > > > >   +                                
> > > refTarget.getValue().toString());
> > > > >   +                               
> > > > >   +                        // Determine the appropriate 
> > > status code.
> > > > >   +                        boolean permanent
> > > > >   +                                = 
> > > > > revisionDescriptor.propertyValueContains(
> > > > >   +                                P_REDIRECT_LIFETIME, 
> > > "permanent");
> > > > >   +                        if (permanent) {
> > > > >   +                            
> > > > > resp.setStatus(WebdavStatus.SC_MOVED_PERMANENTLY);
> > > > >   +                            
> > > > > resp.addHeader(H_CACHE_CONTROL, PRIVATE_CACHE);
> > > > >   +                        }
> > > > >   +                        else {
> > > > >   +                            
> > > > > resp.setStatus(WebdavStatus.SC_MOVED_TEMPORARILY);
> > > > >   +                            
> > > > > resp.addHeader(H_CACHE_CONTROL, NO_CACHE);
> > > > >   +                        }
> > > > >   +
> > > > >   +                        // Set this flag so that we don't 
> > > > > attempt to execute the
> > > > >   +                        // request on the redirect 
> > > > > reference itself.
> > > > >   +                        responseIsRedirected = true;
> > > > >   +                    }
> > > > >   +                }
> > > > >   +                catch (ObjectNotFoundException notFound) {
> > > > >   +                    token.getLogger().log("Error while 
> > > > > trying to send redirect",
> > > > >   +                            notFound, LOG_CHANNEL, 
> > > Logger.ERROR);
> > > > >   +                }
> > > > >   +            }
> > > > >                
> > > > >   -            executeRequest();
> > > > >   +            if (!responseIsRedirected) {
> > > > >   +                executeRequest();
> > > > >   +            }
> > > > >   +
> > > > >                if (!slideToken.isExternalTransaction() &&
> > > > > transactionIsStarted) {
> > > > >                    token.commit();
> > > > >                    transactionIsStarted = false;
> > > > >   @@ -1597,6 +1649,7 @@
> > > > >            private String hTxIdStr;
> > > > >            private String hTxMethodStr;
> > > > >            private String hContentTypeStr;
> > > > >   +        private String hApplyToRedirectRefStr;
> > > > >    
> > > > >            // parsed headers
> > > > >            private List hIf;
> > > > >   @@ -1614,6 +1667,7 @@
> > > > >            private String hTxId;
> > > > >            private String hTxMethod;
> > > > >            private String hContentType;
> > > > >   +        private boolean hApplyToRedirectRef;
> > > > >    
> > > > >            // states
> > > > >            private int stIf = ST_UNDEFINED;
> > > > >   @@ -1631,6 +1685,7 @@
> > > > >            private int stTxId = ST_UNDEFINED;
> > > > >            private int stTxMethod= ST_UNDEFINED;
> > > > >            private int stContentType = ST_UNDEFINED;
> > > > >   +        private int stApplyToRedirectRef = ST_UNDEFINED;
> > > > >    
> > > > >            protected RequestHeaders() {
> > > > >            }
> > > > >   @@ -1838,6 +1893,25 @@
> > > > >               }
> > > > >            }
> > > > >    
> > > > >   +
> > > > >   +        protected boolean getApplyToRedirectRef( boolean 
> > > > > defaultValue )
> > > > >   +            throws WebdavException
> > > > >   +        {
> > > > >   +            if (stApplyToRedirectRef == ST_UNDEFINED) {
> > > > >   +                return defaultValue;
> > > > >   +            }
> > > > >   +            else if (stApplyToRedirectRef == ST_INVALID) {
> > > > >   +                int sc = 
> WebdavStatus.SC_PRECONDITION_FAILED;
> > > > >   +                sendError( sc, "Invalid header 
> > > > > Apply-To-Redirect-Ref: " +
> > > > >   +                hApplyToRedirectRefStr );
> > > > >   +                throw new WebdavException( sc );
> > > > >   +            }
> > > > >   +            else {
> > > > >   +                return hApplyToRedirectRef;
> > > > >   +            }
> > > > >   +        }
> > > > >   +
> > > > >   +
> > > > >            protected void parse() {
> > > > >                // TransactionId header
> > > > >                hTxIdStr = req.getHeader(H_TRANSACTION);
> > > > >   @@ -1974,7 +2048,7 @@
> > > > >                }
> > > > >                
> > > > >                // Overwrite header
> > > > >   -            String hOverwriteStr = 
> req.getHeader(H_OVERWRITE);
> > > > >   +            hOverwriteStr = req.getHeader(H_OVERWRITE);
> > > > >                if (hOverwriteStr != null) {
> > > > >                    stOverwrite = ST_DEFINED;
> > > > >                    if ("T".equalsIgnoreCase(hOverwriteStr)) {
> > > > >   @@ -2005,6 +2079,21 @@
> > > > >                if (hLabelStr != null) {
> > > > >                    stLabel = ST_DEFINED;
> > > > >                    hLabel = hLabelStr;
> > > > >   +            }
> > > > >   +
> > > > >   +            // Apply-To-Redirect-Ref header
> > > > >   +            hApplyToRedirectRefStr = 
> > > req.getHeader(H_OVERWRITE);
> > > > >   +            if (hApplyToRedirectRefStr != null) {
> > > > >   +                stApplyToRedirectRef = ST_DEFINED;
> > > > >   +                if 
> > > ("T".equalsIgnoreCase(hApplyToRedirectRefStr)) {
> > > > >   +                    hApplyToRedirectRef = true;
> > > > >   +                }
> > > > >   +                else if 
> > > > > ("F".equalsIgnoreCase(hApplyToRedirectRefStr)) {
> > > > >   +                    hApplyToRedirectRef = false;
> > > > >   +                }
> > > > >   +                else {
> > > > >   +                    stApplyToRedirectRef = ST_INVALID;
> > > > >   +                }
> > > > >                }
> > > > >                
> > > > >                // Content-Type header
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.14      +5 -3      
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/method
> > > > > /DefaultMethodFactory.java
> > > > >   
> > > > >   Index: DefaultMethodFactory.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/method/DefaultMethodFactory.java,v
> > > > >   retrieving revision 1.13
> > > > >   retrieving revision 1.14
> > > > >   diff -u -r1.13 -r1.14
> > > > >   --- DefaultMethodFactory.java	5 Aug 2004 14:43:29 
> > > > > -0000	1.13
> > > > >   +++ DefaultMethodFactory.java	6 Dec 2004 08:54:13 
> > > > > -0000	1.14
> > > > >   @@ -79,6 +79,8 @@
> > > > >                return new PutMethod(token, config);
> > > > >            } else if (name.equals("MKCOL")) {
> > > > >                return new MkcolMethod(token, config);
> > > > >   +        } else if (name.equals("MKREDIRECTREF")) {
> > > > >   +            return new MkredirectrefMethod(token, config);
> > > > >            } else if (name.equals("POST")) {
> > > > >                return new PostMethod(token, config);
> > > > >            } else if (name.equals("COPY")) {
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.86      +13 -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/web
> > > > > dav/method/PutMethod.java,v
> > > > >   retrieving revision 1.85
> > > > >   retrieving revision 1.86
> > > > >   diff -u -r1.85 -r1.86
> > > > >   --- PutMethod.java	28 Oct 2004 14:47:18 -0000	1.85
> > > > >   +++ PutMethod.java	6 Dec 2004 08:54:13 -0000	1.86
> > > > >   @@ -26,6 +26,8 @@
> > > > >    import java.io.IOException;
> > > > >    import java.util.Date;
> > > > >    
> > > > >   +import javax.servlet.http.HttpServletResponse;
> > > > >   +
> > > > >    import org.apache.slide.common.NamespaceAccessToken;
> > > > >    import org.apache.slide.common.ServiceAccessException;
> > > > >    import org.apache.slide.common.SlideException;
> > > > >   @@ -182,7 +184,14 @@
> > > > >                        sendError( statusCode, 
> > > > > getClass().getName()+".mustNotBeCollection" );
> > > > >                        throw new WebdavException( 
> statusCode );
> > > > >                    }
> > > > >   -                
> > > > >   +
> > > > >   +                // Check if this is a redirect reference.
> > > > >   +                if 
> > > > > (WebdavUtils.isRedirectref(oldRevisionDescriptor)) {
> > > > >   +                    
> > > > > resp.sendError(HttpServletResponse.SC_FORBIDDEN,
> > > > >   +                            "Redirect references can not 
> > > > > have bodies");
> > > > >   +                    return;
> > > > >   +                }
> > > > >   +
> > > > >                    NodeRevisionDescriptor
> > > revisionDescriptor = null;
> > > > >                    if (oldRevisionDescriptor == null) {
> > > > >                        revisionDescriptor = new
> > > > > NodeRevisionDescriptor();
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.1                  
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/method
> > > > > /MkredirectrefMethod.java
> > > > >   
> > > > >   Index: MkredirectrefMethod.java
> > > > >   
> > > 
> ===================================================================
> > > > >   /*
> > > > >    * $Header: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/method/MkredirectrefMethod.java,v 1.1 2004/12/06 08:54:13
> > > > > masonjm Exp $
> > > > >    * $Revision: 1.1 $
> > > > >    * $Date: 2004/12/06 08:54:13 $
> > > > >    *
> > > > >    * 
> > > > > 
> > > 
> ====================================================================
> > > > >    *
> > > > >    * 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;
> > > > >   
> > > > >   import java.io.IOException;
> > > > >   import java.util.Date;
> > > > >   import java.util.List;
> > > > >   
> > > > >   import org.apache.slide.common.NamespaceAccessToken;
> > > > >   import org.apache.slide.common.ServiceAccessException;
> > > > >   import org.apache.slide.common.SlideException;
> > > > >   import org.apache.slide.content.NodeProperty;
> > > > >   import org.apache.slide.content.NodeRevisionDescriptor;
> > > > >   import 
> org.apache.slide.structure.LinkedObjectNotFoundException;
> > > > >   import 
> org.apache.slide.structure.ObjectAlreadyExistsException;
> > > > >   import org.apache.slide.structure.ObjectNotFoundException;
> > > > >   import org.apache.slide.structure.SubjectNode;
> > > > >   import org.apache.slide.util.Configuration;
> > > > >   import org.apache.slide.webdav.WebdavException;
> > > > >   import org.apache.slide.webdav.WebdavServletConfig;
> > > > >   import org.apache.slide.webdav.util.DeltavConstants;
> > > > >   import org.apache.slide.webdav.util.UriHandler;
> > > > >   import org.apache.slide.webdav.util.VersioningHelper;
> > > > >   import org.apache.slide.webdav.util.WebdavStatus;
> > > > >   import org.jdom.Element;
> > > > >   import org.jdom.JDOMException;
> > > > >   
> > > > >   
> > > > >   /**
> > > > >    * MKCOL method.
> > > > >    *
> > > > >    * @author <a
> > > href="mailto:snmvaughan92@yahoo.com">Steve Vaughan</a>
> > > > >    */
> > > > >   public class MkredirectrefMethod
> > > > >       extends AbstractWebdavMethod
> > > > >       implements DeltavConstants {
> > > > >       
> > > > >       
> > > > >       //
> > > > > -----------------------------------------------------
> > > > > Instance Variables
> > > > >       
> > > > >       
> > > > >       /**
> > > > >        * Redirect reference name.
> > > > >        */
> > > > >       protected String redirectRefName;
> > > > >       
> > > > >       /**
> > > > >        * Redirect reference target.
> > > > >        */
> > > > >       protected String refTarget;
> > > > >       
> > > > >       /**
> > > > >        * Redirect lifetime.
> > > > >        */
> > > > >       protected String redirectLifetime;
> > > > >       
> > > > >       /**
> > > > >        * Constructor.
> > > > >        *
> > > > >        * @param token     the token for accessing the 
> namespace
> > > > >        * @param config    configuration of the WebDAV servlet
> > > > >        */
> > > > >       public MkredirectrefMethod(NamespaceAccessToken token,
> > > > >                          WebdavServletConfig config) {
> > > > >           super(token, config);
> > > > >       }
> > > > >       
> > > > >       
> > > > >       //
> > > > > ------------------------------------------------------
> > > > > Protected Methods
> > > > >       
> > > > >       
> > > > >       /**
> > > > >        * Parse XML request.
> > > > >        */
> > > > >       protected void parseRequest()
> > > > >           throws WebdavException {
> > > > >           
> > > > >           redirectRefName = requestUri;
> > > > >           if (redirectRefName == null) {
> > > > >               redirectRefName = "/";
> > > > >           }
> > > > >   
> > > > >           if (req.getContentLength() > 0) {
> > > > >              try {
> > > > >                  Element mkredirectrefElement =
> > > parseRequestContent(
> > > > >                          E_MKREDIRECTREF);
> > > > >                          
> > > > >                  // Parse the reference target.
> > > > >                  Element reftargetElement = 
> > > > > mkredirectrefElement.getChild(
> > > > >                          E_REFTARGET, DNSP);
> > > > >                  if (reftargetElement != null) {
> > > > >                     refTarget =
> > > > > reftargetElement.getChildText("href", DNSP);
> > > > >                     if (refTarget == null)
> > > > >                        throw new JDOMException ("Required 
> > > > > Element <" + E_HREF
> > > > >                              + "> Missing");
> > > > >                  }
> > > > >                  else {
> > > > >                     throw new JDOMException ("Required 
> > > > > Element <" + E_REFTARGET
> > > > >                             + "> Missing");
> > > > >                  }
> > > > >                  
> > > > >                  // Parse the optional lifetime of 
> the redirect.
> > > > >                  Element redirectLifetimeElement = 
> > > > > mkredirectrefElement.getChild(
> > > > >                          E_REDIRECT_LIFETIME, DNSP);
> > > > >                  if (redirectLifetimeElement != null) {
> > > > >                      List children =
> > > > > redirectLifetimeElement.getChildren();
> > > > >                      if (children.isEmpty())
> > > > >                          throw new JDOMException 
> > > ("Required Element <"
> > > > >                                  + E_PERMANENT + "> or <" +
> > > > > E_TEMPORARY
> > > > >                                  + "> Missing");
> > > > >   
> > > > >                      Element child = (Element)children.get(0);
> > > > >                      if (E_PERMANENT.equals(child.getName()))
> > > > >                          redirectLifetime = 
> > > > > NodeRevisionDescriptor.PERMANENT_LIFETIME;
> > > > >                      else if 
> (E_TEMPORARY.equals(child.getName()))
> > > > >                          redirectLifetime =
> > > > > NodeRevisionDescriptor.TEMPORARY_LIFETIME;
> > > > >                      else
> > > > >                          throw new JDOMException 
> > > ("Expected Element <"
> > > > >                                  + E_PERMANENT + "> or <" +
> > > > > E_TEMPORARY
> > > > >                                  + "> but found <" + 
> > > > > child.getName() + ">");
> > > > >                  }
> > > > >                  else
> > > > >                      redirectLifetime = 
> > > > > NodeRevisionDescriptor.TEMPORARY_LIFETIME;
> > > > >              }
> > > > >              catch( Exception e ) {
> > > > >                  int statusCode = getErrorCode( e );
> > > > >                  sendError( statusCode, e );
> > > > >                  throw new WebdavException( statusCode );
> > > > >              }
> > > > >           }
> > > > >           else {
> > > > >               int statusCode = WebdavStatus.SC_BAD_REQUEST;
> > > > >               sendError( statusCode, 
> > > > > getClass().getName()+".missingRequestBody" );
> > > > >               throw new WebdavException( statusCode );
> > > > >           }
> > > > >       }
> > > > >       
> > > > >       
> > > > >       /**
> > > > >        * Execute request.
> > > > >        *
> > > > >        * @exception WebdavException Bad request
> > > > >        */
> > > > >       protected void executeRequest() throws WebdavException, 
> > > > > IOException {
> > > > >           
> > > > >           // Prevent dirty reads
> > > > >           slideToken.setForceStoreEnlistment(true);
> > > > >           NodeRevisionDescriptor revisionDescriptor = null;
> > > > >           
> > > > >           // check lock-null resources
> > > > >           boolean isLockNull = false;
> > > > >           try {
> > > > >               revisionDescriptor =
> > > > >                   content.retrieve(slideToken, 
> > > > > content.retrieve(slideToken,
> > > > >                   redirectRefName));
> > > > >               isLockNull = isLockNull( revisionDescriptor );
> > > > >           }
> > > > >           catch (ServiceAccessException e) {
> > > > >               int statusCode = getErrorCode((Exception)e);
> > > > >               sendError( statusCode, e );
> > > > >               throw new WebdavException( statusCode );
> > > > >           }
> > > > >           catch (SlideException e) {
> > > > >               // ignore silently
> > > > >           }
> > > > >           
> > > > >           if (revisionDescriptor == null) {
> > > > >               revisionDescriptor =
> > > > >                   new NodeRevisionDescriptor(0);
> > > > >           }
> > > > >           
> > > > >           // check destination URI
> > > > >           UriHandler destinationUriHandler = 
> > > > > UriHandler.getUriHandler(redirectRefName);
> > > > >           if (destinationUriHandler.isRestrictedUri()) {
> > > > >               int statusCode = WebdavStatus.SC_FORBIDDEN;
> > > > >               sendError( statusCode,
> > > > > getClass().getName()+".restrictedDestinationUri", new 
> > > > > Object[]{redirectRefName} );
> > > > >               throw new WebdavException( statusCode );
> > > > >           }
> > > > >           
> > > > >           // Resource type
> > > > >           
> > > > > revisionDescriptor.setResourceType(NodeRevisionDescriptor.REDI
> > > > > RECTREF_TYPE);
> > > > >           
> > > > >           // Reference target
> > > > >           revisionDescriptor.setRefTarget(refTarget);
> > > > >           
> > > > >           // Redirect lifetime
> > > > >           
> > > revisionDescriptor.setRedirectLifetime(redirectLifetime);
> > > > >           
> > > > >           // Creation date
> > > > >           Date creationDate = new Date();
> > > > >           revisionDescriptor.setCreationDate(creationDate);
> > > > >           
> > > > >           // Last modification date
> > > > >           revisionDescriptor.setLastModified(creationDate);
> > > > >           
> > > > >           // Content length name
> > > > >           revisionDescriptor.setContentLength(0);
> > > > >           
> > > > >           // Source
> > > > >           revisionDescriptor.setSource("");
> > > > >           
> > > > >           // Owner
> > > > >           try {
> > > > >               String creator = 
> > > > > ((SubjectNode)security.getPrincipal(slideToken)).getPath().las
> > > > > tSegment();
> > > > >               revisionDescriptor.setCreationUser(creator);
> > > > >               revisionDescriptor.setOwner(creator);
> > > > >           } catch (Exception e) {
> > > > >               int statusCode = getErrorCode( e );
> > > > >               sendError( statusCode, e );
> > > > >               throw new WebdavException( statusCode );
> > > > >           }
> > > > >           
> > > > >           // Added for DeltaV --start--
> > > > >           if( Configuration.useVersionControl() ) {
> > > > >               VersioningHelper vHelp = 
> > > > > VersioningHelper.getVersioningHelper(
> > > > >                   slideToken, token, req, resp, getConfig() );
> > > > >               
> > > > >               // Workspace
> > > > >               vHelp.setWorkspaceProperty( redirectRefName, 
> > > > > revisionDescriptor );
> > > > >           }
> > > > >           // Added for DeltaV --end--
> > > > >           
> > > > >           if (isMsProprietarySupport()) {
> > > > >               
> > > > >               NodeProperty property = null;
> > > > >               
> > > > >               // Is hidden
> > > > >               property = new NodeProperty("ishidden", "0", 
> > > > > "MICROSOFT");
> > > > >               revisionDescriptor.setProperty(property);
> > > > >               
> > > > >               // Is read only
> > > > >               property = new NodeProperty("isreadonly", "0", 
> > > > > "MICROSOFT");
> > > > >               revisionDescriptor.setProperty(property);
> > > > >               
> > > > >               // Last accessed
> > > > >               property = new NodeProperty("lastaccessed",
> > > > >                                               
> > > > > (creationDate).toString(), "MICROSOFT");
> > > > >               revisionDescriptor.setProperty(property);
> > > > >               
> > > > >           }
> > > > >           
> > > > >           // If everything is ok : 201 - Created / OK
> > > > >           resp.setStatus(WebdavStatus.SC_CREATED);
> > > > >           
> > > > >           try {
> > > > >               if (!isLockNull) {
> > > > >                   SubjectNode collection = new SubjectNode();
> > > > >                   structure.create(slideToken, collection, 
> > > > > redirectRefName);
> > > > >                   content.create(slideToken, redirectRefName,
> > > > > revisionDescriptor, null);
> > > > >               }
> > > > >               else {
> > > > >                   content.store(slideToken, redirectRefName, 
> > > > > revisionDescriptor, null);
> > > > >               }
> > > > >           } catch (Exception e) {
> > > > >               int statusCode = getErrorCode( e );
> > > > >               sendError( statusCode, e );
> > > > >               throw new WebdavException( statusCode );
> > > > >           }
> > > > >           
> > > > >           // 507 - Insufficient storage
> > > > >           // Would be returned as a 
> ServiceAccessException, so 
> > > > > it would
> > > > >           // return an Internal Server Error, which is
> > > > > probably acceptable.
> > > > >       }
> > > > >       
> > > > >       
> > > > >       /**
> > > > >        * Get return status based on exception type.
> > > > >        */
> > > > >       protected int getErrorCode(Exception ex) {
> > > > >           try {
> > > > >               throw ex;
> > > > >           } catch (ObjectNotFoundException e) {
> > > > >               return WebdavStatus.SC_CONFLICT;
> > > > >           } catch (LinkedObjectNotFoundException e) {
> > > > >               return WebdavStatus.SC_NOT_FOUND;
> > > > >           } catch (ObjectAlreadyExistsException e) {
> > > > >               return WebdavStatus.SC_METHOD_NOT_ALLOWED;
> > > > >           } catch (Exception e) {
> > > > >               return super.getErrorCode(e);
> > > > >           }
> > > > >           
> > > > >       }
> > > > >       
> > > > >       
> > > > >       
> > > > >       /**
> > > > >        * Returns true
> > > > >        */
> > > > >       protected boolean methodNeedsTransactionSupport() {
> > > > >           return true;
> > > > >       }
> > > > >       
> > > > >       
> > > > >   }
> > > > >   
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.23      +6 -2      
> > > > > jakarta-slide/src/share/org/apache/slide/util/resources/messag
> > > > > es.properties
> > > > >   
> > > > >   Index: messages.properties
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/share/org/apache/slide/util/resour
> > > > > ces/messages.properties,v
> > > > >   retrieving revision 1.22
> > > > >   retrieving revision 1.23
> > > > >   diff -u -r1.22 -r1.23
> > > > >   --- messages.properties	30 Oct 2004 08:23:14 
> -0000	1.22
> > > > >   +++ messages.properties	6 Dec 2004 08:54:14 
> -0000	1.23
> > > > >   @@ -168,6 +168,10 @@
> > > > >            Revision descriptor properties hashtable is null
> > > > >    
> > > > > 
> > > 
> org.apache.slide.content.NodeRevisionDescriptor.invalidPropertyType=
> > > \
> > > > >            Revision descriptor property has an invalid type
> > > > >   
> > > 
> +org.apache.slide.content.NodeRevisionDescriptor.missingRefTarget=\
> > > > >   +        Revision descriptor for redirect reference is 
> > > > > missing reference target
> > > > >   
> > > > > +org.apache.slide.content.NodeRevisionDescriptor.missingRedire
> > > > > ctLifetime=\
> > > > >   +        Revision descriptor for redirect reference is 
> > > > > missing redirect lifetime
> > > > >    org.apache.slide.content.NodeRevisionDescriptors.nullUri=\
> > > > >            Revision descriptors uri is null
> > > > >    
> > > > > 
> org.apache.slide.content.NodeRevisionDescriptors.incorrectUri=\
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.3       +4 -0      
> > > jakarta-slide/src/conf/webapp/slide.properties
> > > > >   
> > > > >   Index: slide.properties
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file:
> > > /home/cvs/jakarta-slide/src/conf/webapp/slide.properties,v
> > > > >   retrieving revision 1.2
> > > > >   retrieving revision 1.3
> > > > >   diff -u -r1.2 -r1.3
> > > > >   --- slide.properties	1 Mar 2004 11:19:44 
> -0000	1.2
> > > > >   +++ slide.properties	6 Dec 2004 08:54:14 
> -0000	1.3
> > > > >   @@ -18,6 +18,10 @@
> > > > >    # Default: true
> > > > >    org.apache.slide.search=true
> > > > >    
> > > > >   +# Allow redirect reference resources
> > > > >   +# Deafult: true
> > > > >   +org.apache.slide.redirectreferences=true
> > > > >   +
> > > > >    # URL Encoding
> > > > >    # Default: platform default encoding
> > > > >    org.apache.slide.urlEncoding=UTF-8
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.4       +4 -0      
> > > > > jakarta-slide/src/conf/catalina/slide.properties
> > > > >   
> > > > >   Index: slide.properties
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/conf/catalina/slide.properties,v
> > > > >   retrieving revision 1.3
> > > > >   retrieving revision 1.4
> > > > >   diff -u -r1.3 -r1.4
> > > > >   --- slide.properties	1 Mar 2004 11:19:45 
> -0000	1.3
> > > > >   +++ slide.properties	6 Dec 2004 08:54:14 
> -0000	1.4
> > > > >   @@ -18,6 +18,10 @@
> > > > >    # Default: true
> > > > >    org.apache.slide.search=true
> > > > >    
> > > > >   +# Allow redirect reference resources
> > > > >   +# Deafult: true
> > > > >   +org.apache.slide.redirectreferences=true
> > > > >   +
> > > > >    # URL Encoding
> > > > >    # Default: platform default encoding
> > > > >    org.apache.slide.urlEncoding=UTF-8
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.41      +100 -4    
> > > > > jakarta-slide/src/share/org/apache/slide/content/NodeRevisionD
> > > > > escriptor.java
> > > > >   
> > > > >   Index: NodeRevisionDescriptor.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/share/org/apache/slide/content/Nod
> > > > > eRevisionDescriptor.java,v
> > > > >   retrieving revision 1.40
> > > > >   retrieving revision 1.41
> > > > >   diff -u -r1.40 -r1.41
> > > > >   --- NodeRevisionDescriptor.java	29 Nov 2004 18:48:46 
> > > > > -0000	1.40
> > > > >   +++ NodeRevisionDescriptor.java	6 Dec 2004 08:54:14 
> > > > > -0000	1.41
> > > > >   @@ -130,12 +130,42 @@
> > > > >        
> > > > >        
> > > > >        /**
> > > > >   +     * Redirect reference target.
> > > > >   +     */
> > > > >   +    public static final String REFTARGET = "reftarget";
> > > > >   +    
> > > > >   +    
> > > > >   +    /**
> > > > >   +     * Redirect reference lifetime.
> > > > >   +     */
> > > > >   +    public static final String REDIRECT_LIFETIME = 
> > > > > "redirect-lifetime";
> > > > >   +    
> > > > >   +    
> > > > >   +    /**
> > > > >   +     * Temporary redirect reference.
> > > > >   +     */
> > > > >   +    public static final String TEMPORARY_LIFETIME = 
> > > "<temporary/>";
> > > > >   +    
> > > > >   +    
> > > > >   +    /**
> > > > >   +     * Permanent redirect reference.
> > > > >   +     */
> > > > >   +    public static final String PERMANENT_LIFETIME = 
> > > "<permanent/>";
> > > > >   +    
> > > > >   +    
> > > > >   +    /**
> > > > >         * Collection type.
> > > > >         */
> > > > >        public static final String COLLECTION_TYPE =
> > > "<collection/>";
> > > > >        
> > > > >        
> > > > >        /**
> > > > >   +     * Redirect Reference type.
> > > > >   +     */
> > > > >   +    public static final String REDIRECTREF_TYPE = 
> > > "<redirectref/>";
> > > > >   +    
> > > > >   +    
> > > > >   +    /**
> > > > >         * HTTP date format.
> > > > >         */
> > > > >        protected static final SimpleDateFormat format =
> > > > >   @@ -1097,9 +1127,59 @@
> > > > >                return -1L;
> > > > >            }
> > > > >        }
> > > > >   +
> > > > >   +
> > > > >   +    /**
> > > > >   +     * Get the RefTarget property (if any).
> > > > >   +     *
> > > > >   +     * @return String
> > > > >   +     */
> > > > >   +    public String getRefTarget() {
> > > > >   +        NodeProperty refTarget = getProperty(REFTARGET);
> > > > >   +        if (refTarget == null) {
> > > > >   +            return new String();
> > > > >   +        } else {
> > > > >   +            return (String) refTarget.getValue();
> > > > >   +        }
> > > > >   +    }
> > > > >   +    
> > > > >   +         
> > > > >   +    /**
> > > > >   +     * Set RefTarget property.
> > > > >   +     *
> > > > >   +     * @param refTarget  New RefTarget
> > > > >   +     */
> > > > >   +    public void setRefTarget(String refTarget) {
> > > > >   +        setProperty(REFTARGET, refTarget);  // live 
> > > > > property, can not be modified
> > > > >   +    }
> > > > >   +    
> > > > >   +    
> > > > >   +    /**
> > > > >   +     * Get the RedirectLifetime property (if any).
> > > > >   +     *
> > > > >   +     * @return redirect lifetime or <code>null</code>.
> > > > >   +     */
> > > > >   +    public String getRedirectLifetime() {
> > > > >   +        NodeProperty redirectLifetime = 
> > > > > getProperty(REDIRECT_LIFETIME);
> > > > >   +        if (redirectLifetime == null) {
> > > > >   +            return new String();
> > > > >   +        } else {
> > > > >   +            return (String) redirectLifetime.getValue();
> > > > >   +        }
> > > > >   +    }
> > > > >        
> > > > >        
> > > > >        /**
> > > > >   +     * Set RedirectLifetime property.
> > > > >   +     *
> > > > >   +     * @param redirectLifetime  New RedirectLifetime
> > > > >   +     */
> > > > >   +    public void setRedirectLifetime(String 
> redirectLifetime) {
> > > > >   +        setProperty(REDIRECT_LIFETIME, redirectLifetime);  
> > > > > // live property, can not be modified
> > > > >   +    }
> > > > >   +
> > > > >   +    
> > > > >   +    /**
> > > > >         * Set default properties.
> > > > >         */
> > > > >        void setDefaultProperties(Enumeration 
> defaultProperties) {
> > > > >   @@ -1127,6 +1207,9 @@
> > > > >            // By default, a resource is a collection
> > > > >            setResourceType(COLLECTION_TYPE);
> > > > >            setProperty(SOURCE, "");  // live 
> property, can not 
> > > > > be modified
> > > > >   +        // Collection content lengths are usually 0, and 
> > > > > should be non-negative
> > > > >   +        // to support WebFolders, but we use -1 internally 
> > > > > to indicate an unset
> > > > >   +        // content length.
> > > > >            setContentLength(-1);
> > > > >            setLastModified(new Date());
> > > > >            
> > > > >   @@ -1231,6 +1314,19 @@
> > > > >                             
> > > (NodeRevisionDescriptor.class.getName()
> > > > >                                  + ".invalidPropertyType"));
> > > > >                ((NodeProperty) obj).validate();
> > > > >   +            
> > > > >   +            if 
> (REDIRECTREF_TYPE.equals(getResourceType())) {
> > > > >   +                if (getRefTarget() == null)
> > > > >   +                    throw new 
> > > > > ObjectValidationFailedException (Messages.message
> > > > >   +                            
> > > (NodeRevisionDescriptor.class.getName()
> > > > >   +                            + ".missingRefTarget"));
> > > > >   +    
> > > > >   +                if (getRedirectLifetime() == null)
> > > > >   +                    throw new 
> > > > > ObjectValidationFailedException (Messages.message
> > > > >   +                            
> > > (NodeRevisionDescriptor.class.getName()
> > > > >   +                            + ".missingRedirectLifetime"));
> > > > >   +            }
> > > > >   +            
> > > > >            }
> > > > >            
> > > > >        }
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.21      +39 -4     
> > > > > 
> jakarta-slide/src/share/org/apache/slide/util/Configuration.java
> > > > >   
> > > > >   Index: Configuration.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/share/org/apache/slide/util/Config
> > > > > uration.java,v
> > > > >   retrieving revision 1.20
> > > > >   retrieving revision 1.21
> > > > >   diff -u -r1.20 -r1.21
> > > > >   --- Configuration.java	8 Nov 2004 09:25:02 
> -0000	1.20
> > > > >   +++ Configuration.java	6 Dec 2004 08:54:14 
> -0000	1.21
> > > > >   @@ -128,6 +128,16 @@
> > > > >             */
> > > > >            public static final String Events =
> > > > > "org.apache.slide.events";
> > > > >    
> > > > >   +
> > > > >   +        /**
> > > > >   +         * Property specifying that redirect references 
> > > > > are enabled.
> > > > >   +         * <pre>
> > > > >   +         * org.apache.slide.redirectreferences
> > > > >   +         * </pre>
> > > > >   +         */
> > > > >   +        public static final String RedirectReferences = 
> > > > > "org.apache.slide.redirectreferences";
> > > > >   +
> > > > >   +
> > > > >            /**
> > > > >             * Property specifying the encoding for URLs.
> > > > >             * <pre>
> > > > >   @@ -214,11 +224,19 @@
> > > > >         */
> > > > >        private static boolean _binding;
> > > > >    
> > > > >   +    
> > > > >        /**
> > > > >         * True if events should be fired
> > > > >         */
> > > > >        private static boolean _events;
> > > > >    
> > > > >   +
> > > > >   +    /**
> > > > >   +     * True if redirect references are enabled.
> > > > >   +     */
> > > > >   +    private static boolean _redirectReferences;
> > > > >   +
> > > > >   +
> > > > >        /**
> > > > >         * URL encoding.
> > > > >         */
> > > > >   @@ -277,6 +295,7 @@
> > > > >        public static boolean useBinding (Store store) {
> > > > >            return _binding && store.useBinding();
> > > > >        }
> > > > >   +
> > > > >        
> > > > >        /**
> > > > >         * TODO: dump?
> > > > >   @@ -286,6 +305,7 @@
> > > > >            return _binding;
> > > > >        }
> > > > >    
> > > > >   +    
> > > > >        /**
> > > > >         * Returns true if events are enabled by default
> > > > >         */
> > > > >   @@ -295,6 +315,14 @@
> > > > >    
> > > > >        
> > > > >        /**
> > > > >   +     * Returns true if redirect references are enabled.
> > > > >   +     */
> > > > >   +    public static boolean useRedirectReferences () {
> > > > >   +        return _redirectReferences;
> > > > >   +    }
> > > > >   +
> > > > >   +
> > > > >   +    /**
> > > > >         * Returns the used URL encoding.
> > > > >         */
> > > > >        public static String urlEncoding() {
> > > > >   @@ -445,6 +473,13 @@
> > > > >                _events = true;
> > > > >            } else {
> > > > >                _events = false;
> > > > >   +        }
> > > > >   +
> > > > >   +        prop = 
> > > > > _default.getProperty(Property.RedirectReferences, "true");
> > > > >   +        if (prop.equalsIgnoreCase("true") || 
> > > > > prop.equalsIgnoreCase("on")) {
> > > > >   +            _redirectReferences = true;
> > > > >   +        } else {
> > > > >   +            _redirectReferences = false;
> > > > >            }
> > > > >    
> > > > >            prop = 
> > > > > _default.getProperty(Property.PrincipalIdentifiedLocks, 
> > > > > "false");
> > > > >   
> > > > >   
> > > > >   
> > > > >   1.6       +5 -3      
> > > > > jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/r
> > > > > esourcekind/DeltavCompliantUnmappedUrlImpl.java
> > > > >   
> > > > >   Index: DeltavCompliantUnmappedUrlImpl.java
> > > > >   
> > > 
> ===================================================================
> > > > >   RCS file: 
> > > > > /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/web
> > > > > dav/util/resourcekind/DeltavCompliantUnmappedUrlImpl.java,v
> > > > >   retrieving revision 1.5
> > > > >   retrieving revision 1.6
> > > > >   diff -u -r1.5 -r1.6
> > > > >   --- DeltavCompliantUnmappedUrlImpl.java	5 Aug 2004 
> > > > > 14:43:32 -0000	1.5
> > > > >   +++ DeltavCompliantUnmappedUrlImpl.java	6 Dec 2004 
> > > > > 08:54:14 -0000	1.6
> > > > >   @@ -70,6 +70,8 @@
> > > > >                s.add( M_VERSION_CONTROL );
> > > > >            if( isSupportedFeature(F_WORKSPACE) )
> > > > >                s.add( M_MKWORKSPACE );
> > > > >   +        if (isSupportedFeature(F_REDIRECTREFS))
> > > > >   +            s.add( M_MKREDIRECTREF);
> > > > >            return s;
> > > > >        }
> > > > >    
> > > > >   
> > > > >   
> > > > >   
> > > > > 
> > > > > 
> > > 
> --------------------------------------------------------------------
> > > > > -
> > > > > To unsubscribe, e-mail: 
> slide-dev-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: 
> > > > > slide-dev-help@jakarta.apache.org
> > > > > 
> > > > 
> > > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org