Autopsy
4.20.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Classes | |
class | StringObjMap |
Public Member Functions | |
EnvConfig | getEnvConfig (File envConfigFile) throws IOException, IllegalStateException |
EnvConfig | getEnvConfigFromSysProps () throws IOException, IllegalStateException |
IntegrationTestConfig | getIntegrationTestConfig () throws IOException, IllegalStateException |
List< TestSuiteConfig > | getTestSuiteConfig (File rootDirectory, File configFile) |
List< TestSuiteConfig > | getTestSuiteConfigs (File fileOrDirectory) |
Private Member Functions | |
Map< String, Object > | getOrCreate (Map< String, Object > parent, String key) |
Map< String, Object > | getSysPropsMap () |
EnvConfig | validate (File envConfigFile, EnvConfig config) throws IllegalStateException |
List< TestSuiteConfig > | validate (File rootDirectory, File file, List< TestSuiteConfig > testSuites) |
TestSuiteConfig | validate (File rootDirectory, File file, int index, TestSuiteConfig config) |
Static Private Attributes | |
static final String | CONFIG_FILE_KEY = "configFile" |
static final String | INTEGRATION_TEST_NAMESPACE = "integration-test" |
static final String | JSON_EXT = "json" |
static final Logger | logger = Logger.getLogger(ConfigDeserializer.class.getName()) |
static final ObjectMapper | mapper = new ObjectMapper() |
Handles deserializing configuration items.
Definition at line 48 of file ConfigDeserializer.java.
EnvConfig org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfig | ( | File | envConfigFile | ) | throws IOException, IllegalStateException |
Deserializes the specified json file into an EnvConfig object.
envConfigFile | The file location for the environmental config. |
IOException | |
IllegalStateException | If the file cannot be validated. |
Definition at line 198 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.validate().
Referenced by org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfigFromSysProps().
EnvConfig org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfigFromSysProps | ( | ) | throws IOException, IllegalStateException |
Deserializes the specified json file into an EnvConfig object using System.Property specified values. This is affected by build.xml test-init target and values specified in this file.
IOException | |
IllegalStateException | If the env config file cannot be found but the property has been specified or the env config object cannot be validated. |
Definition at line 72 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfig(), org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getOrCreate(), org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getSysPropsMap(), and org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.validate().
Referenced by org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getIntegrationTestConfig().
IntegrationTestConfig org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getIntegrationTestConfig | ( | ) | throws IOException, IllegalStateException |
Deserializes the json config specified at the given path into the java equivalent IntegrationTestConfig object. This uses information in env config to determine test suite locations.
IOException | If there is an error loading the config. |
IllegalStateException | If the config cannot be validated. |
Definition at line 180 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.PathUtil.getAbsolutePath(), org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfigFromSysProps(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getRootTestSuitesPath(), org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getTestSuiteConfigs(), and org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getWorkingDirectory().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests().
|
private |
Retrieves the Map<String, Object> that will be found at parent.get(key) or create a new Map at that key and return that.
parent | The parent map. |
key | The key to fetch. |
Definition at line 145 of file ConfigDeserializer.java.
Referenced by org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfigFromSysProps(), and org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getSysPropsMap().
|
private |
Creates a Map<String, Object> representing the values in System Properties. Properties will be stored in nested maps for property keys separated by periods. For instance, the property 'keyA.childA.childB' will be located in returnObj.get("keyA").get("childA").get("childB").
Definition at line 102 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getOrCreate().
Referenced by org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfigFromSysProps().
List<TestSuiteConfig> org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getTestSuiteConfig | ( | File | rootDirectory, |
File | configFile | ||
) |
Derives a list of test suite config's specified in the configFile. The root directory is the same or an ancestor directory of this configFile used for the relative output path.
rootDirectory | The ancestor directory of configFile. |
configFile | The configFile to read. |
Definition at line 238 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.validate().
Referenced by org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getTestSuiteConfigs().
List<TestSuiteConfig> org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getTestSuiteConfigs | ( | File | fileOrDirectory | ) |
Finds all test suite config json files within this directory and sub directories or if a file is specified, just that file is loaded.
fileOrDirectory | The parent directory of test suite configurations or the configuration file itself. |
Definition at line 270 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getTestSuiteConfig().
Referenced by org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getIntegrationTestConfig().
|
private |
Validates the environment configuration file.
envConfigFile | The file location of the config (used for setting working directory if not specified). |
config | The environmental config that was deserialized. |
IllegalStateException | If could not be validated. |
Definition at line 212 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.setWorkingDirectory().
Referenced by org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfig(), org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getEnvConfigFromSysProps(), org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getTestSuiteConfig(), and org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.validate().
|
private |
Validates the list of test suite configurations.
rootDirectory | The root directory for configurations (relativeOutputPath is set by determining relative path from root directory to file). |
file | The file containing the configuration. |
testSuites | The list of test suite objects discovered. |
Definition at line 295 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.validate().
|
private |
Validates a single test suite by returning it or null if invalid. The relative output path is also determined based on the relative path from rootDirectory to file.
rootDirectory | The root directory for configurations (relativeOutputPath is set by determining relative path from root directory to file). |
file | The file containing the configuration. |
index | The index within a list of test suites which this item exists. |
config | The test suite confi. |
Definition at line 316 of file ConfigDeserializer.java.
References org.sleuthkit.autopsy.integrationtesting.config.TestSuiteConfig.getCaseTypes(), org.sleuthkit.autopsy.integrationtesting.config.TestSuiteConfig.getDataSources(), org.sleuthkit.autopsy.integrationtesting.config.TestSuiteConfig.getIntegrationTests(), org.sleuthkit.autopsy.integrationtesting.config.TestSuiteConfig.getName(), org.sleuthkit.autopsy.integrationtesting.config.TestSuiteConfig.getRelativeOutputPath(), org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.JSON_EXT, and org.sleuthkit.autopsy.integrationtesting.config.TestSuiteConfig.setRelativeOutputPath().
|
staticprivate |
Definition at line 57 of file ConfigDeserializer.java.
|
staticprivate |
Definition at line 59 of file ConfigDeserializer.java.
|
staticprivate |
Definition at line 50 of file ConfigDeserializer.java.
Referenced by org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.validate().
|
staticprivate |
Definition at line 51 of file ConfigDeserializer.java.
|
staticprivate |
Definition at line 52 of file ConfigDeserializer.java.
Copyright © 2012-2022 Basis Technology. Generated on: Tue Aug 1 2023
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.