[
https://issues.apache.org/jira/browse/SLING-11467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642393#comment-17642393
]
Joerg Hoh commented on SLING-11467:
-----------------------------------
[~darshan.mahor] If implemented, this could turn out to be a major problem,
because there is no JCR API to change the node type. That means we would have
to implement it like this
* move /content/test/testchild to /content/test/testchild_temp (along with all
of its subnodes)
* create /content/test/testchild(sling:Folder)
* move /content/test/testchild_temp/* to /content/test/testchild
* remove /content/test/testchild_temp
Depending on the amount of content to move this could easily take minutes. Not
to mention all the actions depending on it (e.g. index-updates plus invocation
of observation listeners already registered).
On top we would have to deal with the situation that there might be problems
with NodeType constraints, which we had to deal with and which could also cause
this action to fail.
That seems quite risky to me to provide this feature to users.
[~angela] are you aware of any Jackrabbit extension which could allow us to
(try to) change the nodetype of a node more easily?
> support to update existing paths via repoinit statement
> -------------------------------------------------------
>
> Key: SLING-11467
> URL: https://issues.apache.org/jira/browse/SLING-11467
> Project: Sling
> Issue Type: Improvement
> Components: Repoinit
> Reporter: Darshan Mahor
> Priority: Major
>
> As of now we can't update the path if it already exists in repository[1] via
> repoinit statements like update primary type etc. This request is to support
> the mechanism via which we can modify/update the existing paths with the
> update/modification provided in repoinit statement. e.g. lets suppose we have
> a path in repostiory /content/test/testchild(nt:folder) and we want to
> modify it to /content/test/testchild(sling:Folder).
>
> [1].
> [https://github.com/apache/sling-org-apache-sling-jcr-repoinit/blob/master/src/main/java/org/apache/sling/jcr/repoinit/impl/AclVisitor.java#L189]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)