[
https://issues.apache.org/jira/browse/SLING-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14936540#comment-14936540
]
ASF GitHub Bot commented on SLING-4750:
---------------------------------------
GitHub user trekawek opened a pull request:
https://github.com/apache/sling/pull/103
SLING-4750 New Resource Provider API
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/trekawek/sling SLING-4750
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/103.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #103
----
commit f8902eb88ef7af187413a6fefcc709b4b6ed7c55
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-07T15:32:30Z
SLING-4750 Basic operations for the new API.
commit badb4bb2a23f6b4db9610fefecd75b1c0a056514
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-10T14:30:53Z
SLING-4750 Main code compiles.
commit 1929a7ea7768e23dbb24a429fb04a49b3c183fdb
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-11T13:03:45Z
Unit tests green.
commit 9cea56cab0dfff2a89bf0eb07af6e1f4644bc952
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-16T13:43:14Z
SLING-4750 Introduced StatefulResourceProvider.
commit 73c184fd77613414ac97446b7d6242e38f106377
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-17T08:36:10Z
SLING-4750 Tests green.
commit a04530f97e2e3c1a1ad1bf2b702b2d87c9fa6543
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-17T09:43:47Z
SLING-4750 Added legacy resource provider bridge.
commit 1ef0c39028244fa6927692134351d82d618ae2da
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-17T13:50:49Z
SLING-4750 Small fixes.
commit b64e2ef0f1c7a927736a4983e974b8bf97293b87
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-17T15:53:10Z
SLING-4750 Moved tests.
commit 6178b30d14f9cb3d982526c40953d724adbe220d
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-17T15:53:29Z
SLING-4750 Use fresh provider list in the clone().
commit 6531bb567ecb7225f7ebc32e807764f141cbb1b7
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-17T16:00:35Z
SLING-4750 Fixed children iterator.
commit 374137c3ccf3565b1236dbe81133bb42dec3640f
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-17T16:08:06Z
SLING-4750 Renamed package for the params implementation.
commit 793c2fd67d0b94cfea6cf838567ef1789fc902aa
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-22T08:57:46Z
Merge branch 'trunk' into SLING-4750
commit 96fe0afef173716befe888e4d021fa0a8bff1d33
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-22T08:58:40Z
Merge branch 'trunk' into SLING-4750
commit ed5ac98fd366c57eaf4afef90a9f4bfb518dd7d0
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-22T09:21:43Z
SLING-4750 Fixed typo in the SecureResourceProvider class name.
commit f7a45885fa58ef455881b9e8dca7aaba2d1150c4
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-22T09:45:52Z
SLING-4750 Check if the resource access security is not null.
commit a0a80513f660a8d04275a8486eb22d4752cec72f
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-22T11:00:43Z
SLING-4750 JcrResourceProvider should be AUTH_REQUIRED.
commit 22fcb97b4f169fed7403cc06194c0a58cab0d8cb
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-22T11:00:58Z
SLING-4750 Try to parse the query immediately.
commit c60298d7b0b443be868e26ab0d0b56a1d5e5410e
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-22T14:41:56Z
SLING-4750 Fixes related to the resource provider registration and
lifecycle.
commit cce437c0846d2559a438a32c08dbdf4f52901483
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-23T08:31:28Z
SLING-4750 Check factory preconditions every time there is a new resource
provider.
commit 0ee8d468950dbe21457bb45b1b58e86d286f8ce7
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-23T09:20:03Z
Updated .gitignore.
commit 08af0e112fa2101a4ca2015087e6d724adeb8c9b
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-28T08:17:59Z
SLING-4750 Removed clone() from the resource providers.
commit abc8a6ddcf3774e5dae74864c435cbd7b6839373
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-28T08:47:04Z
SLING-4750 Added comments to the stateful resource providers.
commit 4ba310c0e790edd3db074ed3a24184308a675edc
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-28T09:58:52Z
SLING-4750 Use the parent in the JcrResourceProvider#getResource()
commit 9791df50ec200fcda025a7e296a1f1cd58e4b350
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-28T10:38:13Z
Merge branch 'trunk' into SLING-4750
Conflicts:
launchpad/builder/src/main/provisioning/sling.txt
commit 82aa30813fbec62ef98d9feb76f3bcd8a4e23706
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-28T12:31:02Z
Merge branch 'trunk' into SLING-4750
commit 33ded422aec5a20a17a468545e33de666778be57
Author: Tomek Rekawek <[email protected]>
Date: 2015-09-29T14:22:29Z
Merge branch 'trunk' into SLING-4750
----
> New Resource Provider API
> -------------------------
>
> Key: SLING-4750
> URL: https://issues.apache.org/jira/browse/SLING-4750
> Project: Sling
> Issue Type: Improvement
> Components: API, JCR, ResourceResolver
> Reporter: Carsten Ziegeler
> Assignee: Tomek Rękawek
> Fix For: API 2.10.0, Resource Resolver 1.2.8
>
>
> Mail thread from the mailing list:
> http://mail-archives.apache.org/mod_mbox/sling-dev/201505.mbox/%3C555983ED.1080800%40apache.org%3E
> Starting mail:
> The resource provider API has grown a lot over time and when we started
> with it we didn't really think about potential extensions of the api.
> Today, each time we add a new feature, we come up with a new marker
> interface. There is also the distinction between a resource provider
> (singleton/stateless) and the factory (creating stateful providers).
> Although the api is not intended to be used by the average resource api
> user (it's an extension), we put it in the same package. And there are
> more minor things.
> Therefore I think it's time to start a new API that is more future proof
> and solves the known problems. I've created a draft prototype at [1].
> During the performance analysis by Joel he found out that getParent
> calls to a resource a pretty expensive as in the end these are string
> based. Therefore, e.g. the JCR implementation can't simply call
> getParent on a node and wrap it in a resource. Therefore I think we
> should add a getParent(Resource) method to the resource resolver and
> have a better way to handle this in a resource provider.
> Instead of having a resource provider and a resource provider factory,
> we define a single ResourceProvider which is a singleton. If this
> provider needs authentication and/or needs to keep state per user, the
> PROPERTY_AUTHENTICATE needs to be set to true and in this case the
> authenticate method is called. This one returns a data object which is
> passed in to each and every method. If auth is not required, the method
> is not called and null is passed in as the data object.
> For authentication, providers do not support login administrative
> anymore, just users and service users.
> A provider is mounted at a single root - no more support for mounting it
> at different path at the same time; and a provider always owns the root.
> So if a provider does not return a resource for a given path, no other
> provider is asked. This allows for improved implementations and resource
> resolving. If we decided that we need this for compatibility we can
> solve it differently.
> Instead of using marker interface, we define the ResourceProvider as an
> abstract class. This allows us to add new methods without breaking
> existing providers.
> Each method gets a ResolveContext, containing the resource resolver,
> the previously mentioned state data object and other things, e.g. the
> parameter support recently added to the resource resolving. In the
> future we can pass in additional data without breaking the interface.
> Apart from that the resource provider is similar to the aggregation of
> the already existing marker interfaces. There are two exceptions,
> observation and query which I'll handle in different emails.
> [1]
> https://svn.apache.org/repos/asf/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)