Hi, On Tue, Sep 8, 2009 at 15:31, Gamba<[email protected]> wrote: > I saw that JackrabbitNodeTypeManager is deprecated in 1.6.0. > Have I use NodeTypeManagerImpl to register my own node-types? > > What String must I use for the content-type: > > NodeTypeManagerImpl manager = (NodeTypeManagerImpl) > session.getWorkspace().getNodeTypeManager(); > > if (!manager.hasNodeType("hmg:folder") && !manager.hasNodeType("hmg:file")) > { > manager.registerNodeTypes(is, "1"); > // with 1.5 the number "1" was ... > JackrabbitNodeTypeManager.TEXT_X_JCR_CND > }
As noted on the deprecation javadoc: "This interface will be replaced by the standard JCR 2.0 API in Apache Jackrabbit 2.0." This is because in JCR 1.0, the NodeTypeManager interface only allowed for node type discovery. JCR 2.0 [1] (and hence Jackrabbit 2.0) will introduce standardized node type registration and unregistration [2]. This will not include a direct API for XML or CND node type file import, but this will be part of the jackrabbit-spi-commons library. Nonetheless, it will still be supported in 1.x it will still be supported, it's only deprecated. See also JCR-2161 [3]. [1] http://jcp.org/en/jsr/detail?id=283 [2] https://jsr-283.dev.java.net/source/browse/jsr-283/src/java/javax/jcr/nodetype/NodeTypeManager.java?view=markup [3] https://issues.apache.org/jira/browse/JCR-2161 Regards, Alex -- Alexander Klimetschek [email protected]
