Changing/Removing a node type

Changing a node type

If you want to replace the existing node type definition, you should pass ExtendedNodeTypeManager.REPLACE_IF_EXISTS as a second parameter for the ExtendedNodeTypeManager.registerNodeType method.

ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()

InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
nodeTypeManager.registerNodeTypes(is,ExtendedNodeTypeManager.REPLACE_IF_EXISTS );

Removing a node type


Node type is possible to remove only when the repository does not contain nodes of this type.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus