/**
  * In order for versions older than 3.2.1 to be properly upgraded, the plugin assmebly files that
  * have the form :
  *
  * <pre>
  * <plugin internal name>-assembly.zip
  * </pre>
  *
  * must be copied to the old archive form :
  *
  * <pre>
  * <plugin internal name>.jar
  * </pre>
  *
  * This method loops through all of the plugin assembly archives and copies them to the old
  * format.
  */
 private void copyPluginAssemblies() throws IOException {
   FileWrapper pluginsDir = _fileWrapperFactory.create(releaseDirectory, "plugin");
   String[] pluginsList = pluginsDir.list();
   for (String plugin : pluginsList) {
     String oldFormat = plugin.replace("-assembly", "").replace(".zip", ".jar");
     FileWrapper pluginAssemblyArchiveFile = _fileWrapperFactory.create(pluginsDir, plugin);
     FileWrapper oldFormatArchiveFile = _fileWrapperFactory.create(pluginsDir, oldFormat);
     if (log.isInfoEnabled()) {
       log.info("Copying assembly file ( " + plugin + " ) to old format: " + oldFormat);
     }
     _iou.copyFile(pluginAssemblyArchiveFile, oldFormatArchiveFile);
   }
 }
 /** Save preferences to disk. */
 public void savePrefs() {
   if (!_initialized) {
     throw new IllegalStateException("initialize() must be called first");
   }
   try {
     XMLBeanWriter wtr = new XMLBeanWriter(_prefs);
     wtr.save(fileWrapperFactory.create(_userSettingsFolder, USER_PREFS_FILE_NAME));
   } catch (Exception ex) {
     s_log.error("Error occurred writing to preferences file: " + USER_PREFS_FILE_NAME, ex);
   }
 }