Commit 1f8d5171 authored by Hélène Ortiz's avatar Hélène Ortiz

Add parameter 'addServerHome' to call method saveFile in

ResourceManager.
parent 1b2c1402
4.0.5 20/04/2020
-----
Add parameter 'addServerHome' to call method saveFile in ResourceManager.
4.0.4 20/04/2020
-----
* New version of NomadCommandSystem in pom.xml dependencies.
......
......@@ -135,7 +135,7 @@
<dependency>
<groupId>fr.ill.ics</groupId>
<artifactId>nomadcommandsystem</artifactId>
<version>4.0.3</version>
<version>4.0.4</version>
</dependency>
<!-- **************************************************************** JFACE ****************************************************************
......
......@@ -276,7 +276,7 @@ public class CommandWorkspace {
if (!fileName.contains(MainWindow.getInstance().getCommandsSelectionPlugin().getXBUPath() + ConfigManager.FILE_SEPARATOR)) {
fileName = MainWindow.getInstance().getCommandsSelectionPlugin().getXBUPath() + ConfigManager.FILE_SEPARATOR + fileName;
}
ResourceManager.getInstance().saveFile(ConfigManager.USER_HOME + ConfigManager.FILE_SEPARATOR + fileName, content.toString(), type);
ResourceManager.getInstance().saveFile(fileName, content.toString(), type, true);
}
textCommandZone.saveContentAsXBUOrPALFile(fileName);
......@@ -343,7 +343,7 @@ public class CommandWorkspace {
if (forLoopsOk) {
String fileName = CommandWindow.USERS_SCAN_DIR + ConfigManager.FILE_SEPARATOR + name + ".xml";
StringBuffer content = getCommandZoneContent(null);
ResourceManager.getInstance().saveFile(ConfigManager.USER_HOME + ConfigManager.FILE_SEPARATOR + fileName, content.toString(), ResourceManager.SCRIPT_FILE);
ResourceManager.getInstance().saveFile(fileName, content.toString(), ResourceManager.SCRIPT_FILE, true);
return name;
}
return null;
......@@ -626,7 +626,7 @@ public class CommandWorkspace {
String fileName = CommandWindow.USERS_SCAN_DIR + ConfigManager.FILE_SEPARATOR + "dummyScan.xml";
StringBuffer content = getCommandZoneContent("dummyScan");
ResourceManager.getInstance().saveFile(ConfigManager.USER_HOME + ConfigManager.FILE_SEPARATOR + fileName, content.toString(), ResourceManager.SCRIPT_FILE);
ResourceManager.getInstance().saveFile(fileName, content.toString(), ResourceManager.SCRIPT_FILE, true);
if (deleteSource) {
eraseCommandZoneContent();
......
......@@ -567,7 +567,7 @@ public class ControllerViewParser extends GenericParser {
fileContent = "<!-- Automatically generated View file : remove this line if modified -->" + GenericParser.LINE_SEPARATOR;
// iterate through CompositeDescriptor creating necessary entries in view file
writeComposite(compositeDescriptor, commandFile);
ResourceManager.getInstance().saveFile(filePath, fileContent, -1);
ResourceManager.getInstance().saveFile(filePath, fileContent, -1, false);
}
private void writeComposite(CompositeDescriptor compositeDescriptor, boolean commandFile) {
......
......@@ -214,7 +214,7 @@ public class PluginConfigParser extends GenericParser {
fileContent = fileContent + "\t<" + TAG_COMMAND + " " + ATTRIBUTE_VIEW + "=\"" + controllerType + ConfigManager.COMMAND_VIEW_PATTERN + "\"/>" + GenericParser.LINE_SEPARATOR;
}
fileContent = fileContent + "</" + TAG_CONTROLLER_PLUGIN_CONFIG + ">" + GenericParser.LINE_SEPARATOR;
ResourceManager.getInstance().saveFile(fileName, fileContent, -1);
ResourceManager.getInstance().saveFile(fileName, fileContent, -1, false);
return fileName;
}
return null;
......
......@@ -302,7 +302,7 @@ public class ParameterSurveyControllerSetupPlugin extends ClientControllerSetupP
String fileName = configDirectory + currentFileName + SettingsUtilities.SETTINGS_EXTENSION;
ResourceManager.getInstance().saveFile(ConfigManager.USER_HOME + ConfigManager.FILE_SEPARATOR + fileName, content.toString(), ResourceManager.SURVEY_FILE);
ResourceManager.getInstance().saveFile(fileName, content.toString(), ResourceManager.SURVEY_FILE, true);
// Reload whole content of the combo to have a sorted list of file names
initConfigurationFiles();
......
......@@ -234,7 +234,7 @@ public abstract class SettingsControllerSetupPlugin extends ControllerSetupPlugi
String directory = SettingsUtilities.getInstance().getMainSettingsDirName() + getPluginTitle() + ConfigManager.FILE_SEPARATOR + parentDirectory;
String fileName = directory + settingsControllerSetupPluginPeer.getCurrentLoadedFileName() + SettingsUtilities.SETTINGS_EXTENSION;
ResourceManager.getInstance().saveFile(ConfigManager.USER_HOME + ConfigManager.FILE_SEPARATOR + fileName, buffer.toString(), ResourceManager.SETTINGS_FILE);
ResourceManager.getInstance().saveFile(fileName, buffer.toString(), ResourceManager.SETTINGS_FILE, true);
// Reload whole content of the combo to have a sorted list of file names
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment