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 2019/12/05 15:01:31 UTC

[sling-site] branch master updated: add clarification on how to get binary properties from a resource

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 aa22a1a  add clarification on how to get binary properties from a resource
aa22a1a is described below

commit aa22a1a76d89994e9ee7b2ff3145468991114c50
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Dec 5 16:01:11 2019 +0100

    add clarification on how to get binary properties from a resource
---
 .../jbake/content/documentation/the-sling-engine/resources.md     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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 8008333..44586e4 100644
--- a/src/main/jbake/content/documentation/the-sling-engine/resources.md
+++ b/src/main/jbake/content/documentation/the-sling-engine/resources.md
@@ -8,11 +8,11 @@ tags=core,resources
 
 ## What is a Resource
 
-The Resource is one of the central parts of Sling. Extending from JCR's *Everything is Content*, Sling assumes *Everthing is a Resource*. Thus Sling is maintaining a virtual tree of resources, which is a merger of the actual contents in the JCR Repository and resources provided by so called resource providers. By doing this Sling fits very well in the paradigma of the REST architecture.
+The Resource is one of the central parts of Sling. Extending from JCR's *Everything is Content*, Sling assumes *Everthing is a Resource*. Thus Sling is maintaining a virtual tree of resources, which is a merger of the actual contents by so called resource providers (one of them usually the JCR Resource Provider). By doing this Sling fits very well in the paradigma of the REST architecture.
 
 ### Resource Properties
 
-Resources have a number of essentiall properties:
+Resources have a number of essential properties:
 
 | Property | Description |
 |---|---|
@@ -25,6 +25,10 @@ Resources have a number of essentiall properties:
 
 For a complete description of the `Resource` interface, please refer to the [`Resource`][2] JavaDoc.
 
+The properties are either exposed via the `ValueMap` or `ModifiableValueMap` adaptable or by calling `Resource.getValueMap()`.
+
+To get the main binary property from a given resource one can adapt it to an `InputStream`. Most resource providers return the underlying wrapper binary in that case.
+
 ### Resource Types
 
 The exact method of setting the resource type for a Resource depends on the actual Resource Provider. For the four main Resource Provider