You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2006/04/19 13:52:53 UTC

[jira] Created: (JCR-405) PROPPATCH doesn't respect document order

PROPPATCH doesn't respect document order
----------------------------------------

         Key: JCR-405
         URL: http://issues.apache.org/jira/browse/JCR-405
     Project: Jackrabbit
        Type: Bug

  Components: webdav  
    Reporter: Julian Reschke
    Priority: Minor


PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.

I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).

In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (JCR-405) PROPPATCH doesn't respect document order

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-405?page=all ]
     
angela resolved JCR-405:
------------------------

    Fix Version: 1.0.1
     Resolution: Fixed

Committed revision: 397835  

The following modifications were made to the original patch:

- with jcr package two implementations were missing -> added changed impl for alterProperties
   and moved the handling of the old-alterProperties method to AbstractResource.

- calling the list entries 'item' shadowed an instance field in the 'jcr' package.
  since 'item' could be misleading due to the fact the jsr170 defines Items, i renamed the variables.

- removed comment on outdated todo (and todo ;)

otherwise it was fine (although removal of extra catch for exception not related to property modification e.g. lock was not part of this issue :)). thanks for the careful work.

regards
angela


> PROPPATCH doesn't respect document order
> ----------------------------------------
>
>          Key: JCR-405
>          URL: http://issues.apache.org/jira/browse/JCR-405
>      Project: Jackrabbit
>         Type: Bug

>   Components: webdav
>     Reporter: Julian Reschke
>     Assignee: angela
>     Priority: Minor
>      Fix For: 1.0.1
>  Attachments: diffs.txt
>
> PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.
> I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).
> In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-405) PROPPATCH doesn't respect document order

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-405?page=comments#action_12376045 ] 

angela commented on JCR-405:
----------------------------

looks good.
i will perform some tests and commit the modifications.

> PROPPATCH doesn't respect document order
> ----------------------------------------
>
>          Key: JCR-405
>          URL: http://issues.apache.org/jira/browse/JCR-405
>      Project: Jackrabbit
>         Type: Bug

>   Components: webdav
>     Reporter: Julian Reschke
>     Assignee: angela
>     Priority: Minor
>  Attachments: diffs.txt
>
> PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.
> I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).
> In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (JCR-405) PROPPATCH doesn't respect document order

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-405?page=all ]

angela reassigned JCR-405:
--------------------------

    Assign To: angela

> PROPPATCH doesn't respect document order
> ----------------------------------------
>
>          Key: JCR-405
>          URL: http://issues.apache.org/jira/browse/JCR-405
>      Project: Jackrabbit
>         Type: Bug

>   Components: webdav
>     Reporter: Julian Reschke
>     Assignee: angela
>     Priority: Minor
>  Attachments: diffs.txt
>
> PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.
> I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).
> In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-405) PROPPATCH doesn't respect document order

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-405?page=comments#action_12376010 ] 

Julian Reschke commented on JCR-405:
------------------------------------

Sorry, forgot to mention that this change is *not* well tested yet (I've verified in the debugger that the code executes as designed, but I currently don't have a setup with a repository where property modifications are actually supported).


> PROPPATCH doesn't respect document order
> ----------------------------------------
>
>          Key: JCR-405
>          URL: http://issues.apache.org/jira/browse/JCR-405
>      Project: Jackrabbit
>         Type: Bug

>   Components: webdav
>     Reporter: Julian Reschke
>     Priority: Minor
>  Attachments: diffs.txt
>
> PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.
> I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).
> In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-405) PROPPATCH doesn't respect document order

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-405?page=comments#action_12375578 ] 

Julian Reschke commented on JCR-405:
------------------------------------

Indeed... What's the strategy for API changes?

Anyway, I'm currently preparing a patch a long the lines of Angela's proposal (adding new methods, deprecating the old ones). Should be ready early next week.



> PROPPATCH doesn't respect document order
> ----------------------------------------
>
>          Key: JCR-405
>          URL: http://issues.apache.org/jira/browse/JCR-405
>      Project: Jackrabbit
>         Type: Bug

>   Components: webdav
>     Reporter: Julian Reschke
>     Priority: Minor

>
> PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.
> I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).
> In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-405) PROPPATCH doesn't respect document order

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-405?page=comments#action_12375133 ] 

angela commented on JCR-405:
----------------------------

(second try, sorry if the first comment made it anyway to jira)

this would required the following api methods to be change or - perhaps better - deprecated/replaced:

- DavResource#alterProperties
  > method signature
  > ev. mark deprecated and add improved alterProperties method

- DavServerRequest#getPropPatchRemoveProperties
- DavServerRequest#getPropPatchSetProperties
  > merged to a single method that returns list of sets and removals
  > ev. rather mark those methods deprecated and add improved method.

is there a policy how to handle api changes between releases?
i had a lot of troubles with jdom and compatibility issues and would wish to avoid such annoyance within jcr-server.

regards
angela

> PROPPATCH doesn't respect document order
> ----------------------------------------
>
>          Key: JCR-405
>          URL: http://issues.apache.org/jira/browse/JCR-405
>      Project: Jackrabbit
>         Type: Bug

>   Components: webdav
>     Reporter: Julian Reschke
>     Priority: Minor

>
> PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.
> I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).
> In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JCR-405) PROPPATCH doesn't respect document order

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-405?page=all ]

Julian Reschke updated JCR-405:
-------------------------------

    Attachment: diffs.txt

OK,

the attached patch:

- deprecates the old alterProperties method,
- introduces a new method with List parameter as discussed,
- implements the deprecated methods in terms of the new call (so we don't have two differing implementations of basically the same thing),
- uses the new method in AbstractWebdavServlet.

Best regards, Julian


> PROPPATCH doesn't respect document order
> ----------------------------------------
>
>          Key: JCR-405
>          URL: http://issues.apache.org/jira/browse/JCR-405
>      Project: Jackrabbit
>         Type: Bug

>   Components: webdav
>     Reporter: Julian Reschke
>     Priority: Minor
>  Attachments: diffs.txt
>
> PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.
> I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).
> In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JCR-405) PROPPATCH doesn't respect document order

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-405?page=all ]

Jukka Zitting updated JCR-405:
------------------------------

    Version: 1.0

Merged for 1.0.1 in revision 409587.

About the API change: I'm accepting this in the patch release as the main API in this case is the WebDAV PROPPATCH method, whose implementation is corrected by this change. For now I consider the classes in jcr-server internal, so a Java signature change is allowed. We may want to reconsider this approach if a number of people are extending or otherwise depending on the code.

> PROPPATCH doesn't respect document order
> ----------------------------------------
>
>          Key: JCR-405
>          URL: http://issues.apache.org/jira/browse/JCR-405
>      Project: Jackrabbit
>         Type: Bug

>   Components: webdav
>     Versions: 1.0
>     Reporter: Julian Reschke
>     Assignee: angela
>     Priority: Minor
>      Fix For: 1.0.1
>  Attachments: diffs.txt
>
> PROPPATCH is currently implemented in terms of DavResource.alterProperties(...), which takes a set of properties to be set and a set of properties to be removed. This is not sufficient to model WebDAV's method semantics, as the order in which set/remove instructions appear is supposed to be relevant.
> I have submitted a patch to the Litmus mailing list checking this (see <http://mailman.webdav.org/pipermail/litmus/2006-April/000196.html>).
> In jcr-server, alterProperties probably should be changed to take an (ordered) list of set/remove instructions instead. The simplest approach for that would probably be to use a List containing either DavProperty (set) or DavPropertyName (remove) objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira