Autopsy  4.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Services.java
Go to the documentation of this file.
1 /*
2  *
3  * Autopsy Forensic Browser
4  *
5  * Copyright 2012-2015 Basis Technology Corp.
6  *
7  * Copyright 2012 42six Solutions.
8  * Contact: aebadirad <at> 42six <dot> com
9  * Project Contact/Architect: carrier <at> sleuthkit <dot> org
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 package org.sleuthkit.autopsy.casemodule.services;
24 
25 import java.io.Closeable;
26 import java.io.IOException;
27 import java.util.ArrayList;
28 import java.util.List;
29 import org.openide.util.Lookup;
31 import org.sleuthkit.datamodel.SleuthkitCase;
32 
36 public class Services implements Closeable {
37 
38  private final List<Closeable> services = new ArrayList<>();
39  private final FileManager fileManager;
40  private final TagsManager tagsManager;
42  private final Blackboard blackboard;
43 
44  public Services(SleuthkitCase tskCase) {
45  fileManager = new FileManager(tskCase);
46  services.add(fileManager);
47 
48  tagsManager = new TagsManager(tskCase);
49  services.add(tagsManager);
50 
51  keywordSearchService = Lookup.getDefault().lookup(KeywordSearchService.class);
52  services.add(keywordSearchService);
53 
54  blackboard = new Blackboard();
55  services.add(blackboard);
56  }
57 
59  return fileManager;
60  }
61 
63  return tagsManager;
64  }
65 
67  return keywordSearchService;
68  }
69 
71  return blackboard;
72  }
73 
74  @Override
75  public void close() throws IOException {
76  for (Closeable service : services) {
77  service.close();
78  }
79  }
80 
81 }
final KeywordSearchService keywordSearchService
Definition: Services.java:41

Copyright © 2012-2015 Basis Technology. Generated on: Wed Apr 6 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.