Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
AutopsyService.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2016-2019 Basis Technology Corp.
5 * Contact: carrier <at> sleuthkit <dot> org
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package org.sleuthkit.autopsy.appservices;
20
21import org.sleuthkit.autopsy.casemodule.Case;
22import org.sleuthkit.autopsy.progress.ProgressIndicator;
23
29public interface AutopsyService {
30
37
38// Status getStatus() {
39//
40// }
41// default void openAppResources(ApplicationContext context) throws AutopsyServiceException {
42// /*
43// * Autopsy services may not have application-level resources.
44// */
45// }
58 /*
59 * Autopsy services may not have case-level resources.
60 */
61 }
62
74 /*
75 * Autopsy services may not have case-level resources.
76 */
77 }
78
79// default void closeAppResources(ApplicationContext context) throws AutopsyServiceException {
80// /*
81// * Autopsy services may not have case-level resources.
82// */
83// }
88 public static class CaseContext {
89
90 private final Case theCase;
92 private volatile boolean cancelRequested;
93 private final boolean isNewCase;
94
106
117 this.theCase = theCase;
118 this.progressIndicator = progressIndicator;
119 this.cancelRequested = false;
120 this.isNewCase = isNewCase;
121 }
122
129 public Case getCase() {
130 return this.theCase;
131 }
132
142 return this.progressIndicator;
143 }
144
149 public void requestCancel() {
150 this.cancelRequested = true;
151 }
152
160 public boolean cancelRequested() {
161 return this.cancelRequested;
162 }
163
170 public boolean isNewCase() {
171 return this.isNewCase;
172 }
173 }
174
178 public static class AutopsyServiceException extends Exception {
179
180 private static final long serialVersionUID = 1L;
181
188 public AutopsyServiceException(String message) {
189 super(message);
190 }
191
199 public AutopsyServiceException(String message, Throwable cause) {
200 super(message, cause);
201 }
202 }
203}
CaseContext(Case theCase, ProgressIndicator progressIndicator, boolean isNewCase)
CaseContext(Case theCase, ProgressIndicator progressIndicator)
default void closeCaseResources(CaseContext context)
default void openCaseResources(CaseContext context)

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.