/**
   * Normally called by the 'Yes' button listener of the virtual entry dialog. This method opens the
   * New Entry dialog in simple mode (or Change Classes dialog). If the user selects one or more
   * object classes they are added to the entry and displayed in the table editor.
   */
  public void processVirtualEntry() {

    ChangeObjectClassWin userData = null;
    if (dataSource.getSchemaOps() == null) {
      JOptionPane.showMessageDialog(
          owner,
          CBIntText.get(
              "Because there is no schema currently published by the\ndirectory, changing an entry's object class is unavailable."),
          CBIntText.get("No Schema"),
          JOptionPane.INFORMATION_MESSAGE);
      return;
    } else {
      shutVirtualEntryDialog(); // TE: kill the prompt window.
      userData =
          new ChangeObjectClassWin(dataSource, currentEntry.getDN(), null, this, owner, true);
      userData.setSize(400, 250);
      CBUtility.center(userData, owner); // TE: centres window.
      userData.setVisible(true);

      while (userData.isVisible()) // TE: don't do anything until the New Entry window is closed.
      {
        try {
          wait();
        } catch (Exception e) {
          userData.dispose();
        }
      }
    }

    if (userData.newObjectClasses
        != null) // TE: if the user has selected one or more object classes - add them to the entry
                 // in the directory.
    {
      try {
        DXOps dxOps = new DXOps(dataSource.getLdapContext());
        dxOps.addAttribute(currentEntry.getDN(), userData.newObjectClasses);
        dataSource.getEntry(
            currentEntry
                .getDN()); // TE: hack??  forces the entry to be read again - otherwise we don't
                           // display the naming value.
      } catch (NamingException e) {
        CBUtility.error(
            TableAttributeEditor.this,
            CBIntText.get(
                "Unable to add new object classes to {0}.",
                new String[] {currentEntry.getDN().toString()}),
            e);
      }
    }
  }