Supporting CRUDPage edited by Carsten ZiegelerChanges (2)
Full ContentThe current Sling resource API only allows reading of resources - with the PersistableValueMap we have a simple mechanism to support updates, however this approach comes with some problems (see below). This is a concept how to fully implement CRUD via the resource API. As a first step we angle the problem from the users via: the API to be used by Sling applications. User APIReadThe support for read is sufficient, we don't need to change that much. DeleteWe add a delete method to the Resource interface, so deleting a resource is a two way step: first getting the resource from the resource resolver and then deleting it. The change is persisted immediately (see below). CreateWe add a new method create(String absolutePath, ValueMap properties) to the resource resolver, where the value map is optional. This will create the resource at the given path and add the provided properties. The change is persisted immediately (see below) UpdateTBD Persisting ChangesIn general, a call to one of the methods, modifying a resource as outlined are persisted immediately. However, transactions will be supported as well. TBD Transaction handling Resource ProvidersA resource provider is mounted into the resource tree. In general, the providers are processed ordered by service ranking, highest first. A service provider gets a service property specifying the sub tree it is claiming to use. For example, a service provider might be mounted at /a/some/path. Everything below this path is processed by this resource resolver. However another resource provider might claim /a/some/path/and/down. So the longest matching path wins. Access ControlIt's the task of a resource resolver to check if the current user is able/allowed to access a resource. If this is not possible, the corresponding action is denied.
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Sling > Supporting CRUD confluence
- [CONF] Apache Sling > Supporting CRUD confluence
- [CONF] Apache Sling > Supporting CRUD confluence
- [CONF] Apache Sling > Supporting CRUD confluence
- [CONF] Apache Sling > Supporting CRUD confluence
- [CONF] Apache Sling > Supporting CRUD confluence
- [CONF] Apache Sling > Supporting CRUD confluence
- [CONF] Apache Sling > Supporting CRUD Anonymous (Confluence)
- [CONF] Apache Sling > Supporting CRUD Daniel Klco (Confluence)
