[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-12-20 Thread angela (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173299#comment-13173299
 ] 

angela commented on JCR-3005:
-

looks fine. thanks

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Fix For: 2.3.6
>
> Attachments: 
> 0001-JCR-3005-Make-it-possible-to-get-multiple-nodes-in-o.patch, 
> getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-11-22 Thread Christian Stocker (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155151#comment-13155151
 ] 

Christian Stocker commented on JCR-3005:


so, some testing:

{code}
curl http://localhost:8080/server/default/jcr:root/foo.0.json?:include=bar
{code}

works (but doesn't return the /foo node),

{code}
curl http://localhost:8080/server/default/jcr:root/.0.json?:include=/foo/bar
{code}
as well

But I can't get it to work with POST
{code}
curl -d :include=bar http://localhost:8081/server/default/jcr:root/foo.0.json
{code}
returns a

{code}


http://www.day.com/jcr/webdav/1.0";>
org.apache.jackrabbit.spi.commons.conversion.IllegalNameException
Prefix must not be empty


{code}

How is a POST request supposed to work?

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-11-15 Thread Lukas Kahwe Smith (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150855#comment-13150855
 ] 

Lukas Kahwe Smith commented on JCR-3005:


how are things looking with this ticket? I tried briefly with a 2.3.2 dev build 
using "-DJCR-3305=true" and couldn't get it to work. Should I try again?
This patch is the last one required to get PHPCR working with Jackrabbit.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-07 Thread Jukka Zitting (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122671#comment-13122671
 ] 

Jukka Zitting commented on JCR-3005:


OK, I'm working on a solution based on the proposed include/exclude patterns.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Fix For: 2.3.1
>
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread angela (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121991#comment-13121991
 ] 

angela commented on JCR-3005:
-

> One way we could achieve that would be to introduce extra ":include" and 
> ":exclude" patterns for the normal batch-read functionality. 
> Such patterns direct which parts of the subtree rooted at the identified 
> resources should be included in or excluded from the JSON response.

that would make much more sense to me.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Fix For: 2.3.1
>
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread Jukka Zitting (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121982#comment-13121982
 ] 

Jukka Zitting commented on JCR-3005:


> simply retrieving the workspace name from the locator wasn't my intention.

I'm just using the locator to check whether the request is targeting a 
workspace resource or not. Is there a better way to do that? The other 
alternative I considered was using instanceof WorkspaceResource, but that 
didn't seem any cleaner. Ideally I think we should allow the resource itself to 
process the HTTP request, but that would require quite a bit of refactoring of 
the current codebase.

> request ANY dav resource and get back the json-serialization of some other 
> resources.

In the HTTP sense the resource is the one identified by the full URI (e.g. 
.../default?:path=/node1&path=/node2) instead of just the path part 
(.../default), so I don't see a fundamental disconnect here. From the 
perspective of a clean URI space though it would of course be nicer if the 
multi-read case was better rooted to a single root resource.

One way we could achieve that would be to introduce extra ":include" and 
":exclude" patterns for the normal batch-read functionality. Such patterns 
direct which parts of the subtree rooted at the identified resources should be 
included in or excluded from the JSON response. For example:

$ curl 
http://localhost:8080/server/default/jcr:root/path.json?:include=node1&:include=node2
{...,"node1":{...},"node2":{...}}

or

$ curl 
http://localhost:8080/server/default/jcr:root/.json?:include=path&:exclude=path/node2
{...,"path":{"node1":{...},"node3":{...}}}

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Fix For: 2.3.1
>
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread angela (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121953#comment-13121953
 ] 

angela commented on JCR-3005:
-

what i meant was: the request target should be the workspace resource. simply 
retrieving the workspace name from the locator wasn't my intention.
it still looks wrong to me that you request ANY dav resource and get back the 
json-serialization of some other resources.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Fix For: 2.3.1
>
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread Jukka Zitting (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121912#comment-13121912
 ] 

Jukka Zitting commented on JCR-3005:


In revision 1179606 I restored support for POST requests accessing this same 
functionality. I looked at implementing a more generic POST-to-GET conversion, 
but that probably needs a bit more thought.

I also added some javadoc documentation about this multi-read feature.

I guess the only thing still needed is a test case. Anything else we should 
still change?

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Fix For: 2.3.1
>
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread angela (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121806#comment-13121806
 ] 

angela commented on JCR-3005:
-

> It's easier to work on incrementally improving this when the code is already 
> in svn.

that's true... but on the other hand i wouldn't want to have strange features 
to be released
which we then have to stick with for compatibility reasons.

can you please make sure that this feature is not released next week unless we 
found a consensus?
thanks.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread Jukka Zitting (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121805#comment-13121805
 ] 

Jukka Zitting commented on JCR-3005:


> Instead of implementing parts of the JSON serialization in the getSimple() 
> method, it would be cleaner to add a method like JsonWriter.write(Node[] 
> nodes, int depth) 

Done in revision 1179541.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread Jukka Zitting (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121804#comment-13121804
 ] 

Jukka Zitting commented on JCR-3005:


> commit a patch before having your comments/questions sorted out

It's easier to work on incrementally improving this when the code is already in 
svn. This way we can better isolate individual improvements to separate 
patches/commits instead of working just on a one big patch.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
>Assignee: Jukka Zitting
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread angela (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121797#comment-13121797
 ] 

angela commented on JCR-3005:
-

jukka, i am a little bit surprised that you commit a patch before having your 
comments/questions sorted out.
i would opt for reverting that until we reach some sort of consensus about this 
issue.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread angela (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121795#comment-13121795
 ] 

angela commented on JCR-3005:
-

to me the patch looks awkward.
the response should somehow be in relation to the requested resource... to 
return the json representation of other possible unrelated resources looks odd 
to me.

why don't you handle that with a specific REPORT request to the workspace 
resource?
that' would make more sense to me.

angela

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread Christian Stocker (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121793#comment-13121793
 ] 

Christian Stocker commented on JCR-3005:


- GET instead of POST. I decided against that, since the URL can grow very 
large if you ask for many nodes

The other parts I can look into, but I'm not the java expert, so if anyone else 
feels inclined to do that, feel free. I'm fine with everything.

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-10-06 Thread Jukka Zitting (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121792#comment-13121792
 ] 

Jukka Zitting commented on JCR-3005:


Looks good, thanks! I committed the patch as-is in revision 1179531 and changed 
it slightly in revision 1179532 to allow exceptions from the getMultiple method 
instead of just logging them (BTW, we use SLF4J for logging).

Some comments on the implementation:

* Wouldn't it make more sense for this to be a GET request rather than a POST? 
Something like: curl 
'http://localhost:8080/server/workspace/jcr:root/node2.0.json?:get=/node1&:get=/node2'

* Instead of implementing parts of the JSON serialization in the getSimple() 
method, it would be cleaner to add a method like JsonWriter.write(Node[] nodes, 
int depth)

* The return statement inside the conditional in doPost() increases the 
complexity of the already tricky flow of that method. Can we refactor the code 
slightly to make the flow more obvious?


> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
> Attachments: getSessions.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-06-27 Thread Christian Stocker (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055661#comment-13055661
 ] 

Christian Stocker commented on JCR-3005:


I agree with Lukas, something like
{"nodes":{"/node1":{"value1":"data1"},"/node2":{"value1":"data2"}}}

shout allow for forward compatibility and make it easy for clients to parse, we 
could leave out the jcr:path value then.

I'll try to adjust to patch soon



> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
> Attachments: patch_commit_d0596cade79b.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (JCR-3005) Make it possible to get multiple nodes in one call via davex

2011-06-27 Thread Lukas Kahwe Smith (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055424#comment-13055424
 ] 

Lukas Kahwe Smith commented on JCR-3005:


* I think it would be a nice touch and probably fairly cheap to add some 
metadata to the result, "total_nodes" would be one obvious one. not sure if it 
makes sense to add other metadata like duplicates, missing or stuff like that, 
at any rate it would be good to prepare the structure returned for this so that 
we can add anything else that makes sense later without BC breaks
* I think it should only be once, actually I think the nodes should be a hash 
map with path: node pairs
* Missing nodes should just be ignored (see also 
http://java.net/jira/browse/JSR_333-38)
* If any nodes can be found, imho they should be returned, errors should if at 
all be returned as part of the metadata (see above)
* Like I said, I would prefer a hash map including the path to identify the 
node in the nodes list

> Make it possible to get multiple nodes in one call via davex
> 
>
> Key: JCR-3005
> URL: https://issues.apache.org/jira/browse/JCR-3005
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-jcr-server
>Reporter: Christian Stocker
> Attachments: patch_commit_d0596cade79b.patch
>
>
> I'm working on this currently

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira