You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2011/08/18 11:01:29 UTC

[jira] [Created] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
---------------------------------------------------------------------------------------------------------

                 Key: JCR-3056
                 URL: https://issues.apache.org/jira/browse/JCR-3056
             Project: Jackrabbit Content Repository
          Issue Type: New Feature
          Components: jackrabbit-jcr-commons
    Affects Versions: 2.3.0
            Reporter: angela
            Assignee: Michael Dürig
             Fix For: 2.3.0


it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086903#comment-13086903 ] 

angela commented on JCR-3056:
-----------------------------

michi, what do you think?

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086943#comment-13086943 ] 

Michael Dürig commented on JCR-3056:
------------------------------------

What other options are there? It seems a bit alien for jackrabbit-core. Putting it directly into jackrabbit-api doesn't seem right to me.

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087015#comment-13087015 ] 

Jukka Zitting commented on JCR-3056:
------------------------------------

OK, +1 from me then.

It would be great however if all the code in jcr-commons that depends on API extensions in jackrabbit-api was put under a separate package like org.apache.jackrabbit.commons.jackrabbit (for example, use o.a.j.commons.jackrabbit.user instead of o.a.j.commons.security.user), so that a simple grep over a client codebase is enough to tell whether the optional jackrabbit-api dependency is really required.

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086926#comment-13086926 ] 

Jukka Zitting commented on JCR-3056:
------------------------------------

Do we expect the JSON query format to be widely used (i.e. by more clients than the object model) with the UserManager API? In that case I'd simply support it directly in the API by exposing a findAuthorizables(String query) method.

Otherwise, if we don't expect the JSON format to be widely used, is the jcr-commons component then the right place for this code?


> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Updated] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela updated JCR-3056:
------------------------

    Attachment: JCR-3056.patch

proposed patch that adds an optional dependency to jackrabbit-api.

i had a quick discussion with jukka about this, since we
currently have not possibility to expose utilities related to jackrabbit extensions to the jcr-api (except for adding them to jackrabbit-core directly, which is cumbersome). 
the proposed way to deal with is, was to make the dependency optional for all those that want to make use of jcr-commons but only want to have a jcr-dependency.

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088739#comment-13088739 ] 

Jukka Zitting commented on JCR-3056:
------------------------------------

Updated OSGi metadata accordingly in revision 1160280.

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086932#comment-13086932 ] 

Michael Dürig commented on JCR-3056:
------------------------------------

So the question is whether to add findAuthorizables(String query) to the API and put the code into jackrabbit-core or to put the code somewhere else (i.e jcr-commons). I'd go for the second since it seems more modular to me. If it turns out (which I doubt) that there is really a need for a findAuthorizables(String query) method in the API we can still add that later on. 

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086947#comment-13086947 ] 

Michael Dürig commented on JCR-3056:
------------------------------------

Well that was the case up to now. Maybe Angela can jump in here. 

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086922#comment-13086922 ] 

Michael Dürig commented on JCR-3056:
------------------------------------

It might be easier but I think the current way is cleaner. The API exposes an object model of the query (introduced with JCR-2800). This patch adds a specific language bindings. 

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Updated] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela updated JCR-3056:
------------------------

    Status: Patch Available  (was: Open)

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086911#comment-13086911 ] 

Jukka Zitting commented on JCR-3056:
------------------------------------

Wouldn't it actually be easier, instead of having such a query mapper utility, to simply support this JSON query format directly in the API?

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086951#comment-13086951 ] 

angela commented on JCR-3056:
-----------------------------

i think it nicely fits into jcr-commons which already provides quite some utilities for json-formatting jcr-specific content.
notably the spi2davex and it's server-side implementation make heavy use of json-serialization of jcr items and it IMO
looks perfectly logic to add similar functionality for users, access control and other jackrabbit specific extensions
of the JCR API... 

... in addition having that optional dependency to jackrabbit-api would finally allow us to provide utilities for 
jackrabbit-api which up to now was put into jackrabbit-core or into project specific utilities.

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Updated] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela updated JCR-3056:
------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087017#comment-13087017 ] 

angela commented on JCR-3056:
-----------------------------

> It would be great however if all the code in jcr-commons that depends on API extensions in jackrabbit-api was put under a separate package

fine with me. i will change the package name accordingly.

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086946#comment-13086946 ] 

Jukka Zitting commented on JCR-3056:
------------------------------------

Why do we need it in Jackrabbit? Assuming the purpose of this code is to support Ajax clients, the code should simply reside with the servlet that processes requests sent by those clients.

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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

       

[jira] [Commented] (JCR-3056) jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086941#comment-13086941 ] 

Jukka Zitting commented on JCR-3056:
------------------------------------

Fair point. I'm just trying to establish how important and/or widely used this feature (JSON query format) is and how many clients really are using it. This sounds rather like a specific integration scenario (i.e. a single backend servlet for Ajax clients) than a generic use case, especially since we already do have the query builder API for Java clients. I'm therefore a bit reluctant to have this in jcr-commons.

> jcr-commons: Add utility to translate a string to a AuthorizableQuery and execute it on the user manager 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3056
>                 URL: https://issues.apache.org/jira/browse/JCR-3056
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.3.0
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 2.3.0
>
>         Attachments: JCR-3056.patch
>
>
> it would be convenient if jackrabbit-jcr-commons would provide a utility to generate authorizable
> queries from a string.

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