docs: @Override
      public NodeType registerNodeType( NodeTypeDefinition template,
                                        boolean allowUpdate )
          throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, AccessDeniedException, RepositoryException {
  
          session.checkLive();
          try {
              session.checkWorkspacePermission(session.workspaceName(), ModeShapePermissions.REGISTER_TYPE);
          } catch (AccessControlException ace) {
              throw new AccessDeniedException(ace);
          }
          JcrNodeType jcrNodeType = this.repositoryTypeManager.registerNodeType(template, !allowUpdate);
          this.schemata = null; //clear the cached schemata to make sure it is reloaded
          return jcrNodeType;
      }