1. Is it possible to load files with <Sling-Initial-Content> into a custom
node type? When I try it with foo.png and foo.xml (which contains the
definitions), jcr:data is always 0.
1.1 How can I debug the loading of initial content? I install the bundle
from Eclipse with maven autoInstallBundle but breakpoints e.g. in
org.apache.sling.jcr.contentloader.internal.Loader.registerBundleInternal()
are never met. Debuging servlet calls works fine.
2. WebDav: create custom node types
When adding files with WebDav, I want to put the files into a customized
node type (that inherits from nt:resource). The only way to do is, is
writing a handler like:
public class NodeTypeHandler extends
org.apache.jackrabbit.server.io.DefaultHandler
and add in file webdav-resource-config.xml of bundle
org.apache.sling.jcr.webdav something like
<iomanager>
<iohandler>
<class name="NodeTypeHandler" />
</iohandler>
.....
</iomanager>
<propertymanager>
<propertyhandler>
<class name="NodeTypeHandler " />
</propertyhandler>
.....
</propertymanager>
or is there a easier way? I first thought of a quick hack: adding a listener
to NODE_ADDED and add a mixin to new nodes. But this is somewhat a waste of
resources and also does not allow to have custom node types. Converting node
types is not possible with jackrabbit as far as I know.