Justin Edelson  wrote
> I just found a serious problem with this implementation - it is no
> longer possible to create nodes via the post servlet as ModifyOperation
> for a non-default workspace.
> 
> Specifically, I'm looking at the ModifyOperation, line 96:
> Session session = request.getResourceResolver().adaptTo(Session.class);
> 
> This could be switched to:
> request.getResource().getResourceResolver().adaptTo(Session.class);
> 
> But it can't be switched to:
> request.getResource().adaptTo(Node.class).getSession();
> 
> because the resource is a synthetic resource.
> 
> I'm not sure what we should do. Thoughts?
> 
Hi,

actually I'm not sure either :) It seems that this whole workspace thing
is more complicated than we (I) thought and that we already made
assumptions here and there how it might work.

I think the script resolver is now fine :) (it's not 100% tested but in
general it should be fine...)

Event handling for resources and the resource resolver supporting the
{wspName}:{path} notation looks pretty good for me as well.

Now, I see two possible solutions:

a) we tweak my latest changes and allow again to provide the workspace
name in the authentication info (as I left most of the stuff in, this is
fairly easy to do). But we need to think about what this actually means
in terms of how the returned resource resolver behaves (adaptTo,
resolving resources without a workspace prefix etc.)

b) Continue the path of having a "global" resource resolver which always
resolves against the default workspace unless a prefix is given. In this
case we run into problems as mentioned above and have to fix all
occurrances here and there.

While I would really prefer b) I fear the better and more compatible
solution is a).

WDYT?
Carsten
-- 
Carsten Ziegeler
[email protected]

Reply via email to