On 7/13/06, Christoph Kiehl <[EMAIL PROTECTED]> wrote:
Stefan Guggisberg wrote:
>> Very nice! Didn't know that. How am I supposed to use the
>> NodeTypeRegistry? I
>> could use Workspace.getNodeTypeManager() cast it to
>> NodeTypeManagerImpl and call
>> getNodeTypeRegistry. But is there a better way to get the
>> NodeTypeRegistry
>> without knowing about NodeTypeManagerImpl?
>
> see e.g.
> http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/5929/focus=5978
I'm already using JackrabbitNodeTypeManager to register nodetypes in CND-Format.
But JackrabbitNodeTypeManager doesn't expose the other methods of
NodeTypeRegistry for removing oder reregistering a nodetype. Are there any plans
to expose these methods as well? Reregistering could be done with an InputStream
as well, and removing by name should be possible. I would prefer to work with
objects instead of InputStreams, but this requires to expose more
classes/interfaces (NodeTypeDef, NodeDef, PropDef).
What do you think?
for the time being i'd suggest you use NodeTypeRegistry directly, i.e.:
Workspace wsp = session.getWorkspace();
NodeTypeManager ntMgr = wsp.getNodeTypeManager();
NodeTypeRegistry ntReg =
((NodeTypeManagerImpl) ntMgr).getNodeTypeRegistry();
cheers
stefan
Cheers,
Christoph