Autopsy  3.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 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;
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 
43  public Services(SleuthkitCase tskCase) {
44  fileManager = new FileManager(tskCase);
45  services.add(fileManager);
46 
47  tagsManager = new TagsManager(tskCase);
48  services.add(tagsManager);
49 
50  keywordSearchService = Lookup.getDefault().lookup(KeywordSearchService.class);
51  services.add(keywordSearchService);
52  }
53 
55  return fileManager;
56  }
57 
59  return tagsManager;
60  }
61 
63  return keywordSearchService;
64  }
65 
66  @Override
67  public void close() throws IOException {
68  for (Closeable service : services) {
69  service.close();
70  }
71  }
72 
73 }
final KeywordSearchService keywordSearchService
Definition: Services.java:41

Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.