sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitin Gupta (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (SLING-9171) Support for settings properties on paths created via repoinit create path
Date Mon, 23 Mar 2020 09:49:00 GMT

    [ https://issues.apache.org/jira/browse/SLING-9171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17064669#comment-17064669
] 

Nitin Gupta edited comment on SLING-9171 at 3/23/20, 9:48 AM:
--------------------------------------------------------------

Thanks [~bdelacretaz] for the suggestion.

In most of the cases, we would not want the developer to use a  statement like:
 set sling:ResourceType to /x/y/z
 and then later change it to some other value say, 
{code:java}
set sling:ResourceType to /p/q/r{code}
as this can potentially lead to backward incompatibility.

So, I think 
{code:java}
default someInteger{Integer} to 42{code}
is something that the product would want to use most of the times in order to remain safe
from the fear of overwriting during upgrade.
 
 
 Just thinking out loud, having something like:
{code:java}
set properties on /pathA, /path/B
 set sling:ResourceType to /x/y/z
 overwrite someInteger{Integer} to 42
end
{code}
is also not much intuitive.

So, I'll go with your suggestion for *_default_* token at individual property level.

 

Thanks!

 


was (Author: nitigupt):
Thanks [~bdelacretaz] for the suggestion.

In most of the cases, we would not want the developer to use a  statement like:
 set sling:ResourceType to /x/y/z
 and then later change it to some other value say, 
{code:java}
set sling:ResourceType to /p/q/r{code}
as this can potentially lead to backward incompatibility.

So, I think 
 default someInteger

{Integer} to 42
 is something that the product would want to use most of the times in order to remain safe
from the fear of overwriting during upgrade.
 
 
 Just thinking out loud, having something like:
{code:java}
set properties on /pathA, /path/B
 set sling:ResourceType to /x/y/z
 set cq:allowedTemplates to /d/e/f/, m/n/ 
 overwrite someInteger{Integer} to 42 
 overwrite someFlag{Boolean} to true 
 overwrite title to "This is the default title"
end{code}
 
{code:java}
 {code}
is also not much intuitive.

So, I'll go with your suggestion for *_default_* token at individual property level.

 

Thanks!

 

> Support for settings properties on paths created via repoinit create path
> -------------------------------------------------------------------------
>
>                 Key: SLING-9171
>                 URL: https://issues.apache.org/jira/browse/SLING-9171
>             Project: Sling
>          Issue Type: Improvement
>          Components: Repoinit
>            Reporter: Nitin Gupta
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Apart from jcr:primaryType and mixin, there is a requirement to add custom properties
to the nodes valuemap via repoinit. This is a gap currently.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message