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