You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2023/10/24 18:16:56 UTC
[sling-site] branch master updated: Document ResourceResolver attributes for the JCR provider (#136)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/master by this push:
new 0217dd110 Document ResourceResolver attributes for the JCR provider (#136)
0217dd110 is described below
commit 0217dd110366f74e1ea48d454fec9d5b0dbc056d
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Oct 24 20:16:50 2023 +0200
Document ResourceResolver attributes for the JCR provider (#136)
---
.../jbake/content/documentation/the-sling-engine/resources.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/main/jbake/content/documentation/the-sling-engine/resources.md b/src/main/jbake/content/documentation/the-sling-engine/resources.md
index 5545228c9..3217f42e0 100644
--- a/src/main/jbake/content/documentation/the-sling-engine/resources.md
+++ b/src/main/jbake/content/documentation/the-sling-engine/resources.md
@@ -169,6 +169,14 @@ Metadata Property | Backed by
For binary nodes all properties except `jcr:created` are retrieved from the child node `jcr:content`.
+#### `ResourceResolver` Attributes
+
+The following attributes are exposed from a JCR backed `ResourceResolver` in its [`getAttribute(...)`][10] and [`getAttributeNames(...)`][11] methods (in addition to the default attributes)
+
+Attribute Name | Description
+--- | ---
+`user.name` | The User ID bound to the current `javax.jcr.Session` as exposed by `getUserID()`
+all `javax.jcr.Session` attributes | For Oak based repositories those are described in [Oak Session Attributes][12]
### Bundle-based Resources
@@ -248,3 +256,6 @@ The Sling API provides an easy way to wrap or decorate a resource before returni
[7]: https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/resource/observation/ExternalResourceChangeListener.java
[8]: https://osgi.org/javadoc/r6/cmpn/org/osgi/service/event/EventHandler.html
[9]: http://sling.apache.org/apidocs/sling8/org/apache/sling/api/SlingConstants.html
+ [10]: https://sling.apache.org/apidocs/sling12/org/apache/sling/api/resource/ResourceResolver.html#getAttribute-java.lang.String-
+ [11]: https://sling.apache.org/apidocs/sling12/org/apache/sling/api/resource/ResourceResolver.html#getAttributeNames--
+ [12]: https://jackrabbit.apache.org/oak/docs/differences.html#session-attributes