활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi Ronnie,
You can use the delete method https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceResolver.html#delete-o...
Alternatively, you can use - https://docs.adobe.com/content/docs/en/spec/jcr/1.0/7.1.6_Removing_Nodes_and_Properties.html
javax.jcr.Node jcrNode = jcrsession.getNode("/sites/mySite");
jcrNode.remove();
jcrsession.save();
Regards,
Manpreet
Hi Ronnie,
Please check below link which has examples of deleting nodes, hope this will help you.
https://www.tabnine.com/code/java/methods/org.apache.sling.api.resource.ResourceResolver/delete
Hi Ronnie,
You can use the delete method https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceResolver.html#delete-o...
Alternatively, you can use - https://docs.adobe.com/content/docs/en/spec/jcr/1.0/7.1.6_Removing_Nodes_and_Properties.html
javax.jcr.Node jcrNode = jcrsession.getNode("/sites/mySite");
jcrNode.remove();
jcrsession.save();
Regards,
Manpreet
Hi @Ronnie09 ,
You need to used Node api for adding and removing .
Using Node API
Adapt the resource to Node
Node node = resource.adaptTo(Node.class);
Then remove a node using function removenode(java.lang.String relPath, java.lang.String primaryNodeTypeName)"
Kr,
Sanjay