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

Jean-Noël Rouvignac
19.03.2016 17ec2cfa9d04e6942a694ab5c3778ac26f17bb35
opendj-server-legacy/src/main/java/org/opends/server/tasks/ExportTask.java
@@ -58,10 +58,8 @@
 */
public class ExportTask extends Task
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** Stores mapping between configuration attribute name and its label. */
  private static Map<String,LocalizableMessage> argDisplayMap = new HashMap<>();
  static {
@@ -97,19 +95,16 @@
  private LDIFExportConfig exportConfig;
  /** {@inheritDoc} */
  @Override
  public LocalizableMessage getDisplayName() {
    return INFO_TASK_EXPORT_NAME.get();
  }
  /** {@inheritDoc} */
  @Override
  public LocalizableMessage getAttributeDisplayName(String name) {
    return argDisplayMap.get(name);
  }
  /** {@inheritDoc} */
  @Override
  public void initializeTask() throws DirectoryException
  {
@@ -127,7 +122,6 @@
      }
    }
    Entry taskEntry = getTaskEntry();
    AttributeType typeWrapColumn = getAttributeType(ATTR_TASK_EXPORT_WRAP_COLUMN);
@@ -185,7 +179,6 @@
    return TaskUtils.getSingleValueString(attrs);
  }
  /** {@inheritDoc} */
  @Override
  public void interruptTask(TaskState interruptState, LocalizableMessage interruptReason)
  {
@@ -199,13 +192,11 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public boolean isInterruptable() {
    return true;
  }
  /** {@inheritDoc} */
  @Override
  protected TaskState runTask()
  {
@@ -308,7 +299,6 @@
      }
    }
    ArrayList<DN> includeBranches;
    if (!includeBranchStrings.isEmpty())
    {
@@ -341,7 +331,6 @@
      includeBranches = defaultIncludeBranches;
    }
    // Create the LDIF export configuration to use when reading the LDIF.
    ExistingFileBehavior existingBehavior;
    if (appendToLDIF)
@@ -369,12 +358,10 @@
    // FIXME -- Should this be conditional?
    exportConfig.setInvokeExportPlugins(true);
    // Get the set of base DNs for the backend as an array.
    DN[] baseDNs = new DN[defaultIncludeBranches.size()];
    defaultIncludeBranches.toArray(baseDNs);
    // From here we must make sure we close the export config.
    try
    {
@@ -395,7 +382,6 @@
        return TaskState.STOPPED_BY_ERROR;
      }
      // From here we must make sure we release the shared backend lock.
      try
      {