19 package com.basistech.df.cybertriage.autopsy.incidentoptions;
21 import com.fasterxml.jackson.databind.ObjectMapper;
23 import java.io.IOException;
24 import java.nio.file.Paths;
25 import java.util.logging.Level;
49 if (ctSettings != null) {
52 settingsFile.getParentFile().mkdirs();
54 objectMapper.writeValue(settingsFile, ctSettings);
56 }
catch (IOException ex) {
57 logger.log(Level.WARNING,
"There was an error writing CyberTriage settings to file: " + settingsFile.getAbsolutePath(), ex);
68 if (settingsFile.isFile()) {
70 settings = objectMapper.readValue(settingsFile,
CTSettings.class);
71 }
catch (IOException ex) {
72 logger.log(Level.WARNING,
"There was an error reading CyberTriage settings to file: " + settingsFile.getAbsolutePath(), ex);
76 return settings == null
static final String CT_SETTINGS_FILENAME
static final Logger logger
final ObjectMapper objectMapper
static final String CT_SETTINGS_DIR
static final CTSettingsPersistence instance
synchronized boolean saveCTSettings(CTSettings ctSettings)
static CTSettingsPersistence getInstance()
synchronized static Logger getLogger(String name)
synchronized CTSettings loadCTSettings()