I'm trying to figure out a way to add custom nodetypes using a CND file to my Sling WebApp. I downloaded the WAR file and got it running but since all the code is already compiled (as .class files), I can't add code to read the CND file and add the custom nodetypes.
On a separate note, I do have Jackrabbit running and with it, I can use the JackrabbitNodeTypeManager or other ways to code reading a CND file and adding nodetypes. This works on my local repository that is not running on a server.
I want to be able to add new nodetypes to the Sling Web Application in a similar way. So I'll boil my questions down to:
- Is there a way to code the addition of new nodetypes in the Sling WebApp?
- How can I connect my Jackrabbit repository (local) to the Sling Web Application (on server) so that I can possibly explore adding custom nodetypes this way (as I'm doing on my Jackrabbit repo locally at the moment)?
I understand that Sling is a framework that uses Jackrabbit as a repo and provides REST-like services to work with the repository, but I imagine there's a way to add these custom nodetypes just like Jackrabbit allows.
Thanks.
Repository repository = new TransientRepository(); Session session = repository.login(new SimpleCredentials("username", "password".toCharArray()));
. I've been following the Jackrabbit First Hops tutorial for the latter. – HikeTakerByRequest