Go to the documentation of this file.
19package org.sleuthkit.autopsy.communications;
21import com.google.common.collect.ImmutableSet;
22import com.google.common.eventbus.EventBus;
23import java.util.HashSet;
25import org.sleuthkit.datamodel.AccountDeviceInstance;
30class PinnedAccountModel {
38 private final Set<AccountDeviceInstance> pinnedAccountDevices =
new HashSet<>();
40 private final EventBus eventBus =
new EventBus();
42 void registerhandler(Object handler) {
43 eventBus.register(handler);
46 void unregisterhandler(Object handler) {
47 eventBus.unregister(handler);
50 boolean isAccountPinned(AccountDeviceInstance account) {
51 return pinnedAccountDevices.contains(account);
61 void unpinAccount(Set<AccountDeviceInstance> accountDeviceInstances) {
62 pinnedAccountDevices.removeAll(accountDeviceInstances);
72 void pinAccount(Set<AccountDeviceInstance> accountDeviceInstances) {
73 pinnedAccountDevices.addAll(accountDeviceInstances);
83 return pinnedAccountDevices.isEmpty();
87 pinnedAccountDevices.clear();
90 ImmutableSet<AccountDeviceInstance> getPinnedAccounts() {
91 return ImmutableSet.copyOf(pinnedAccountDevices);
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.