mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-20 03:24:55 +00:00
host dao main dao
This commit is contained in:
parent
92ec7b2e42
commit
296c7605d8
61
Core/src/org/sleuthkit/autopsy/mainui/datamodel/HostDAO.java
Normal file
61
Core/src/org/sleuthkit/autopsy/mainui/datamodel/HostDAO.java
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2022 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.mainui.datamodel;
|
||||
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.util.Set;
|
||||
import org.sleuthkit.autopsy.mainui.datamodel.events.DAOEvent;
|
||||
import org.sleuthkit.autopsy.mainui.datamodel.events.TreeEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* Dao for hosts.
|
||||
*/
|
||||
public class HostDAO extends AbstractDAO {
|
||||
|
||||
private static HostDAO instance = null;
|
||||
|
||||
public static HostDAO getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new HostDAO();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
void clearCaches() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<? extends DAOEvent> processEvent(PropertyChangeEvent evt) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<? extends DAOEvent> handleIngestComplete() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<? extends TreeEvent> shouldRefreshTree() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
}
|
@ -171,6 +171,8 @@ public class MainDAO extends AbstractDAO {
|
||||
private final CommAccountsDAO commAccountsDAO = CommAccountsDAO.getInstance();
|
||||
private final CreditCardDAO creditCardDAO = CreditCardDAO.getInstance();
|
||||
private final EmailsDAO emailsDAO = EmailsDAO.getInstance();
|
||||
private final HostDAO hostDAO = HostDAO.getInstance();
|
||||
private final PersonDAO personDAO = PersonDAO.getInstance();
|
||||
|
||||
// NOTE: whenever adding a new sub-dao, it should be added to this list for event updates.
|
||||
private final List<AbstractDAO> allDAOs = ImmutableList.of(
|
||||
@ -182,7 +184,9 @@ public class MainDAO extends AbstractDAO {
|
||||
osAccountsDAO,
|
||||
commAccountsDAO,
|
||||
creditCardDAO,
|
||||
emailsDAO);
|
||||
emailsDAO,
|
||||
hostDAO,
|
||||
personDAO);
|
||||
|
||||
/**
|
||||
* Registers listeners with autopsy event publishers and starts internal
|
||||
@ -254,6 +258,15 @@ public class MainDAO extends AbstractDAO {
|
||||
return creditCardDAO;
|
||||
}
|
||||
|
||||
public HostDAO getHostDAO() {
|
||||
return hostDAO;
|
||||
}
|
||||
|
||||
public PersonDAO getPersonDAO() {
|
||||
return personDAO;
|
||||
}
|
||||
|
||||
|
||||
public PropertyChangeManager getResultEventsManager() {
|
||||
return this.resultEventsManager;
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2022 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.mainui.datamodel;
|
||||
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.util.Set;
|
||||
import org.sleuthkit.autopsy.mainui.datamodel.events.DAOEvent;
|
||||
import org.sleuthkit.autopsy.mainui.datamodel.events.TreeEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* Dao for hosts.
|
||||
*/
|
||||
public class PersonDAO extends AbstractDAO {
|
||||
|
||||
private static HostDAO instance = null;
|
||||
|
||||
public static PersonDAO getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new PersonDAO();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
void clearCaches() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<? extends DAOEvent> processEvent(PropertyChangeEvent evt) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<? extends DAOEvent> handleIngestComplete() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<? extends TreeEvent> shouldRefreshTree() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user