* type permission}.
* @throws RepositoryException if any other error occurs
*/
public void unregisterNodeTypes( Collection<String> nodeTypeNames )
throws NoSuchNodeTypeException, InvalidNodeTypeDefinitionException, RepositoryException {
NameFactory nameFactory = context().getValueFactories().getNameFactory();
try {
session.checkWorkspacePermission(session.workspaceName(), ModeShapePermissions.REGISTER_TYPE);
} catch (AccessControlException ace) {
throw new AccessDeniedException(ace);
}
Collection<Name> names = new ArrayList<Name>(nodeTypeNames.size());
for (String name : nodeTypeNames) {
names.add(nameFactory.create(name));
}
// Unregister the node types, but perform a check to see if any of the node types are currently being used.
// Unregistering a node type that is being used will likely cause the system to become unstable.
boolean failIfNodeTypesAreUsed = true;