/**
   * Fires an asynchronous call to update the passed group.
   *
   * @param data The object to update.
   * @param asynch Pass <code>true</code> to save data asynchronously, <code>false</code> otherwise.
   */
  void fireAdminSaving(AdminObject data, boolean asynch) {
    SecurityContext c = ctx;
    if (MetadataViewerAgent.isAdministrator()) c = getAdminContext();

    MetadataLoader loader;
    GroupData group = data.getGroup();

    switch (data.getIndex()) {
      case AdminObject.UPDATE_GROUP:
        loaderID++;
        loader =
            new GroupEditor(
                component, c, group, data.getPermissions(), loaderID, GroupEditor.UPDATE);
        loaders.put(loaderID, loader);
        loader.load();
        state = MetadataViewer.SAVING;
        break;
      case AdminObject.UPDATE_EXPERIMENTER:
        loaderID++;
        loader = new AdminEditor(component, c, data.getGroup(), data.getExperimenters(), loaderID);
        loaders.put(loaderID, loader);
        loader.load();
        state = MetadataViewer.SAVING;
    }
  }
 /**
  * Fires an asynchronous call to modify the default group of the logged in experimenter.
  *
  * @param group
  */
 void fireChangeGroup(GroupData group) {
   SecurityContext c = ctx;
   if (MetadataViewerAgent.isAdministrator()) c = getAdminContext();
   MetadataLoader loader = new GroupEditor(component, c, group, loaderID, GroupEditor.CHANGE);
   loader.load();
 }