docs: public NodeTypeIterator registerNodeTypes( Collection<NodeTypeDefinition> templates,
                                                 boolean allowUpdates )
          throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, AccessDeniedException, RepositoryException {
  
          session.checkLive();
          try {
              session.checkWorkspacePermission(session.workspaceName(), ModeShapePermissions.REGISTER_TYPE);
          } catch (AccessControlException ace) {
              throw new AccessDeniedException(ace);
          }
          List<JcrNodeType> jcrNodeTypes = repositoryTypeManager.registerNodeTypes(templates, !allowUpdates, false, true);
          this.schemata = null; //clear the cached schemata to make sure it is reloaded
          return new JcrNodeTypeIterator(jcrNodeTypes);
      }