Autopsy  4.1
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 2011-2017 Basis Technology Corp.
6  * Contact: carrier <at> sleuthkit <dot> org
7  * Copyright 2012 42six Solutions.
8  * Contact: aebadirad <at> 42six <dot> com
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22 package org.sleuthkit.autopsy.casemodule.services;
23 
24 import java.io.Closeable;
25 import java.io.IOException;
26 import java.util.ArrayList;
27 import java.util.List;
28 import org.openide.util.Lookup;
31 
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 
50  public Services(SleuthkitCase caseDb) {
51  fileManager = new FileManager(caseDb);
52  services.add(fileManager);
53 
54  tagsManager = new TagsManager(caseDb);
55  services.add(tagsManager);
56 
57  keywordSearchService = Lookup.getDefault().lookup(KeywordSearchService.class);
58  services.add(keywordSearchService);
59 
60  blackboard = new Blackboard(caseDb);
61  services.add(blackboard);
62  }
63 
70  return fileManager;
71  }
72 
79  return tagsManager;
80  }
81 
88  return keywordSearchService;
89  }
90 
97  return blackboard;
98  }
99 
105  @Override
106  public void close() throws IOException {
107  for (Closeable service : services) {
108  service.close();
109  }
110  }
111 
112 }
final KeywordSearchService keywordSearchService
Definition: Services.java:41

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