Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
CaseNodeDataCollector.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2019-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  */
19 package org.sleuthkit.autopsy.casemodule.multiusercases;
20 
21 import java.util.ArrayList;
22 import java.util.List;
23 import java.util.logging.Level;
31 
36 final public class CaseNodeDataCollector {
37 
38  private static final Logger logger = Logger.getLogger(CaseNodeDataCollector.class.getName());
39 
53  public static List<CaseNodeData> getNodeData() throws CoordinationServiceException, InterruptedException {
54  final List<CaseNodeData> nodeDataList = new ArrayList<>();
55  final CoordinationService coordinationService = CoordinationService.getInstance();
56  final List<String> nodePaths = coordinationService.getNodeList(CoordinationService.CategoryNode.CASES);
57  for (String nodePath : nodePaths) {
58  /*
59  * Skip the case name, case resources, and case auto ingest log
60  * coordination service nodes. They are not used to store case data.
61  */
62  if (isCaseNameNodePath(nodePath) || isCaseResourcesNodePath(nodePath) || isCaseAutoIngestLogNodePath(nodePath)) {
63  continue;
64  }
65 
66  /*
67  * Get the case node data from the case directory coordination service node.
68  */
69  try {
70  final CaseNodeData nodeData = CaseNodeData.readCaseNodeData(nodePath);
71  nodeDataList.add(nodeData);
72  } catch (CaseNodeDataException | InterruptedException ex) {
73  logger.log(Level.WARNING, String.format("Error reading case node data from %s", nodePath), ex);
74  }
75 
76  }
77  return nodeDataList;
78  }
79 
84  }
85 
86 }
synchronized static Logger getLogger(String name)
Definition: Logger.java:124

Copyright © 2012-2022 Basis Technology. Generated on: Tue Jun 27 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.