You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2020/03/26 11:33:42 UTC
[sling-site] branch master updated: Add "set properties" example
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz 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 0c8bec8 Add "set properties" example
0c8bec8 is described below
commit 0c8bec84abe7bd7a91dc6331403944e94fba8917
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Mar 26 12:33:34 2020 +0100
Add "set properties" example
---
.../documentation/bundles/repository-initialization.md | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/main/jbake/content/documentation/bundles/repository-initialization.md b/src/main/jbake/content/documentation/bundles/repository-initialization.md
index 7c9aca8..678cddc 100644
--- a/src/main/jbake/content/documentation/bundles/repository-initialization.md
+++ b/src/main/jbake/content/documentation/bundles/repository-initialization.md
@@ -202,6 +202,22 @@ The language is self-explaining but please refer to the actual test cases for de
set ACL for bob
allow jcr:read on home(alice), /another/path, home(larry)
end
+
+ # Set node properties, requires
+ # o.a.s.repoinit.parser 1.6.2
+ # o.a.s.jcr.repoinit 1.1.24
+ #
+ # 'set' overwrites any existing value while
+ # 'default' only sets the property if not set yet
+ #
+ # The paths must exist first, see "create path"
+ set properties on /pathA, /path/B
+ set sling:ResourceType{String} to /x/y/z
+ default someInteger{Long} to 42
+ set someFlag{Boolean} to true
+ default someDate{Date} to "2020-03-19T11:39:33.437+05:30"
+ set quotedMix to "quoted", non-quoted, "the last \" one"
+ end
</pre>
## Providing repoinit statements from the Sling provisioning model or other URLs