mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
17.11.2009 013494192c189ce5bd101f198c4d33230374d4b8
opends/src/guitools/org/opends/guitools/controlpanel/task/Task.java
@@ -45,6 +45,9 @@
import org.opends.admin.ads.util.ConnectionUtils;
import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo;
import org.opends.guitools.controlpanel.datamodel.ServerDescriptor;
import org.opends.guitools.controlpanel.event.ConfigurationElementCreatedEvent;
import org.opends.guitools.controlpanel.event.
 ConfigurationElementCreatedListener;
import org.opends.guitools.controlpanel.event.PrintStreamListener;
import org.opends.guitools.controlpanel.ui.ColorAndFontConstants;
import org.opends.guitools.controlpanel.ui.ProgressDialog;
@@ -150,21 +153,17 @@
     */
    JAVA_SETTINGS_UPDATE,
    /**
     * Creating a new attribute in the schema.
     * Creating a new element in the schema.
     */
    NEW_ATTRIBUTE,
    NEW_SCHEMA_ELEMENT,
    /**
     * Creating a new objectclass in the schema.
     * Deleting an schema element.
     */
    NEW_OBJECTCLASS,
    DELETE_SCHEMA_ELEMENT,
    /**
     * Deleting an attribute in the schema.
     * Modify an schema element.
     */
    DELETE_ATTRIBUTE,
    /**
     * Deleting an objectclass in the schema.
     */
    DELETE_OBJECTCLASS,
    MODIFY_SCHEMA_ELEMENT,
    /**
     * Modifying an entry.
     */
@@ -269,6 +268,9 @@
  private ProgressDialog progressDialog;
  private ArrayList<ConfigurationElementCreatedListener> confListeners =
    new ArrayList<ConfigurationElementCreatedListener>();
  private static int MAX_BINARY_LENGTH_TO_DISPLAY = 1024;
  /**
@@ -424,6 +426,40 @@
  public abstract Message getTaskDescription();
  /**
   * Adds a configuration element created listener.
   * @param listener the listener.
   */
  public void addConfigurationElementCreatedListener(
      ConfigurationElementCreatedListener listener)
  {
    confListeners.add(listener);
  }
  /**
   * Removes a configuration element created listener.
   * @param listener the listener.
   */
  public void removeConfigurationElementCreatedListener(
      ConfigurationElementCreatedListener listener)
  {
    confListeners.remove(listener);
  }
  /**
   * Notifies the configuration element created listener that a new object has
   * been created.
   * @param configObject the created object.
   */
  protected void notifyConfigurationElementCreated(Object configObject)
  {
    for (ConfigurationElementCreatedListener listener : confListeners)
    {
      listener.elementCreated(
          new ConfigurationElementCreatedEvent(this, configObject));
    }
  }
  /**
   * Returns a String representation of a value.  In general this is called
   * to display the command-line equivalent when we do a modification in an
   * entry.  But since some attributes must be obfuscated (like the user