From d46fc40ecc65077c38de211742b875148ed9076b Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 5 Oct 2015 17:56:27 -0400 Subject: [PATCH] Replace IngestManager.runInteractively() --- .../autopsy/core/RuntimeProperties.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Core/src/org/sleuthkit/autopsy/core/RuntimeProperties.java diff --git a/Core/src/org/sleuthkit/autopsy/core/RuntimeProperties.java b/Core/src/org/sleuthkit/autopsy/core/RuntimeProperties.java new file mode 100644 index 0000000000..c2c74bfff3 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/core/RuntimeProperties.java @@ -0,0 +1,62 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2013-2015 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.core; + +/** + * Application properties that are set once at runtime and are not saved between + * invocations of Autopsy. + */ +public class RuntimeProperties { + + private static boolean coreComponentsActive = true; + private static boolean coreComponentsActiveSet = false; + + /** + * Sets or unsets a flag indicating whether or not the core Autopsy UI + * components and user interactions with those components via menus, message + * boxes, NetBeans progress handles, etc., are enabled. + *

+ * This flag exists as a mechanism to allow use of Autopsy as a platform + * with the core Autopsy user interface disabled, until such time as the + * user interface is made separable and optional. + * + * @param coreComponentsActive True or false. + */ + public static void setCoreComponentsActive(boolean coreComponentsActive) { + if (!coreComponentsActiveSet) { + RuntimeProperties.coreComponentsActive = coreComponentsActive; + coreComponentsActiveSet = true; + } + } + + /** + * Gets a flag indicating whether or not the core Autopsy UI components and + * user interactions with those components via menus, message boxes, + * NetBeans progress handles, etc., are enabled. + *

+ * This flag exists as a mechanism to allow use of Autopsy as a platform + * with the core Autopsy user interface disabled, until such time as the + * user interface is made separable and optional. + * + * @return True or false. + */ + public static boolean coreComponentsAreActive() { + return coreComponentsActive; + } +}