What happens in case some repository paths are missing also a property value already have some value
Hi,
we are having Repository Initializer from Sling to perform some initial setup of eg paths and permissions:
This is how I have
{
"scripts": [
"create path (sling:Folder) /content/dam/brands/ceccatocluster",
"create path (nt:unstructured) /content/dam/brands/ceccatocluster/jcr:content",
"create path (cq:Page) /content/brands/ceccatocluster",
"create path (nt:unstructured) /content/brands/ceccatocluster/jcr:content",
"create group CeccatoCluster-template with path /home/groups/brandsv2",
"set ACL for CeccatoCluster-template \r\n allow jcr:all on /conf/brandsv2/ceccatocluster \r\nend",
"add CeccatoCluster-template to group template-authors",
"create group CeccatoCluster-content with path /home/groups/brandsv2",
"set ACL for CeccatoCluster-content \r\n allow jcr:all on /content/brands/ceccatocluster \r\nend",
"set ACL for CeccatoCluster-content \r\n allow jcr:all on /content/dam/brands/ceccatocluster \r\nend",
"add CeccatoCluster-content to group contributor",
"add CeccatoCluster-content to group workflow-users",
"set properties on /content/brands/ceccatocluster/jcr:content \r\n set cq:allowedTemplates{String[]} to \"/conf/brandsv2/ceccatocluster/settings/wcm/templates/(?!xf-).*\" \r\n set cq:conf{String} to /conf/brandsv2/ceccatocluster \r\n set cq:deviceGroups{String[]} to /etc/mobile/groups/archetype \r\n set cq:redirectTarget{String} to /content/brands/ceccatocluster/en \r\n set cq:template{String} to /conf/brandsv2/ceccatocluster/settings/wcm/templates/content-page \r\n set jcr:title{String} to \"Ceccato Cluster\" \r\n set scene7Enabled{Boolean} to true \r\n set sling:configRef{String} to /conf/brandsv2/ceccatocluster \r\n set sling:redirect{Boolean} to true \r\n set sling:redirectStatus{Long} to 302 \r\n set sling:resourceType{String} to brandsv2/components/structure/page \r\nend"
]
}
what happens if in case some repository paths are missing, in case some of the properties already have some value (single value / multi value), etc.
is there anyway to check if the property has this value set this, if the path is missing what to do in order to not effect repositoy initializer.
Please share some inputs how we can improve the config files.
Thanks,
Vani.
