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

[jira] Commented: (JCR-2360) JcrUtils.getRepository(...) for simple repository access

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

Jukka Zitting commented on JCR-2360:
------------------------------------

> let each factory interpret org.apache.jackrabbit.repository.uri 

This is now implemented with the new jcr2dav component and the jackrabbit-core changes in revision 897836.

Any new RepositoryFactory implementations that want to work with JcrUtils.getRepository(String uri) should implement similar processing for the org.apache.jackrabbit.repository.uri configuration parameter.

> JcrUtils.getRepository(...) for simple repository access
> --------------------------------------------------------
>
>                 Key: JCR-2360
>                 URL: https://issues.apache.org/jira/browse/JCR-2360
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-jcr-commons
>            Reporter: Jukka Zitting
>            Assignee: Jukka Zitting
>            Priority: Minor
>             Fix For: 2.0-beta1
>
>         Attachments: JCR-2360.patch
>
>
> As discussed on the mailing list, it would be nice to have a trivially simple way (one line of code) to connect to a repository. The RepositoryFactory interface in JCR 2.0 defines a way for clients to get a repository reference without a direct implementation dependency, but a client still needs extra code to handle the Service Provider lookup and the iteration through all the available repository factories.
> To simplify client code I'd like to introduce a JcrUtils.getRepository(Map<String, String>) method that takes care of the tasks mentioned above:
>     Map<String, String> parameters = ...; // repository settings
>     Repository repository = JcrUtils.getRepository(parameters);
> As a further simplification, I'd also like to introduce a JcrUtils.getRepository(String) method that builds the parameter map based on a given "repository URI".
>     Repository repository = JcrUtils.getRepository("file:///path/to/repository");
>     Repository repository = JcrUtils.getRepository("http://localhost:8080/server");
> The set of supported URI types is still to be defined.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.