Merge pull request #2840 from esaunders/2712_eam_shared_config

Added support for EAM properties file to shared configuration.
This commit is contained in:
Richard Cordovano 2017-06-13 13:51:14 -04:00 committed by GitHub
commit 7623f99c7d

View File

@ -79,6 +79,7 @@ public class SharedConfiguration {
private static final String HASHDB_CONFIG_FILE_NAME = "hashLookup.settings"; //NON-NLS private static final String HASHDB_CONFIG_FILE_NAME = "hashLookup.settings"; //NON-NLS
private static final String HASHDB_CONFIG_FILE_NAME_LEGACY = "hashsets.xml"; //NON-NLS private static final String HASHDB_CONFIG_FILE_NAME_LEGACY = "hashsets.xml"; //NON-NLS
public static final String FILE_EXPORTER_SETTINGS_FILE = "fileexporter.settings"; //NON-NLS public static final String FILE_EXPORTER_SETTINGS_FILE = "fileexporter.settings"; //NON-NLS
private static final String ENTERPRISE_ARTIFACTS_MANAGER_PROPERTIES_FILE = "EnterpriseArtifactManager.properties"; //NON-NLS
private static final String SHARED_CONFIG_VERSIONS = "SharedConfigVersions.txt"; //NON-NLS private static final String SHARED_CONFIG_VERSIONS = "SharedConfigVersions.txt"; //NON-NLS
// Folders // Folders
@ -205,6 +206,7 @@ public class SharedConfiguration {
uploadMultiUserAndGeneralSettings(remoteFolder); uploadMultiUserAndGeneralSettings(remoteFolder);
uploadHashDbSettings(remoteFolder); uploadHashDbSettings(remoteFolder);
uploadFileExporterSettings(remoteFolder); uploadFileExporterSettings(remoteFolder);
uploadEnterpriseArtifactsManagerSettings(remoteFolder);
try { try {
Files.deleteIfExists(uploadInProgress.toPath()); Files.deleteIfExists(uploadInProgress.toPath());
@ -269,6 +271,7 @@ public class SharedConfiguration {
downloadFileExtMismatchSettings(remoteFolder); downloadFileExtMismatchSettings(remoteFolder);
downloadAndroidTriageSettings(remoteFolder); downloadAndroidTriageSettings(remoteFolder);
downloadFileExporterSettings(remoteFolder); downloadFileExporterSettings(remoteFolder);
downloadEnterpriseArtifactsManagerSettings(remoteFolder);
// Download general settings, then restore the current // Download general settings, then restore the current
// values for the unshared fields // values for the unshared fields
@ -774,6 +777,30 @@ public class SharedConfiguration {
copyToLocalFolder(FILE_EXPORTER_SETTINGS_FILE, fileExporterFolder.getAbsolutePath(), remoteFolder, true); copyToLocalFolder(FILE_EXPORTER_SETTINGS_FILE, fileExporterFolder.getAbsolutePath(), remoteFolder, true);
} }
/**
* Upload Enterprise Artifacts Manager settings.
*
* @param remoteFolder Shared settings folder
*
* @throws SharedConfigurationException
*/
private void uploadEnterpriseArtifactsManagerSettings(File remoteFolder) throws SharedConfigurationException {
publishTask("Uploading Enterprise Artifacts Manager configuration");
copyToRemoteFolder(ENTERPRISE_ARTIFACTS_MANAGER_PROPERTIES_FILE, moduleDirPath, remoteFolder, true);
}
/**
* Download Enterprise Artifacts Manager settings.
*
* @param remoteFolder Shared settings folder
*
* @throws SharedConfigurationException
*/
private void downloadEnterpriseArtifactsManagerSettings(File remoteFolder) throws SharedConfigurationException {
publishTask("Downloading Enterprise Artifacts Manager configuration");
copyToLocalFolder(ENTERPRISE_ARTIFACTS_MANAGER_PROPERTIES_FILE, moduleDirPath, remoteFolder, true);
}
/** /**
* Upload multi-user settings and other general Autopsy settings * Upload multi-user settings and other general Autopsy settings
* *