Autopsy  4.13.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content > Class Template Referenceabstract

Inherits Detachable< T >.

Classes

class  NoSuchEventBusException
 
class  PageChangeEvent
 
class  PageCountChangeEvent
 
class  PageSizeChangeEvent
 
class  PagingSupport
 
class  RefreshKeysEvent
 

Public Member Functions

 BaseChildFactory (String nodeName)
 
 BaseChildFactory (String nodeName, Predicate< T > filter)
 

Static Public Member Functions

static void post (String nodeName, Object event) throws NoSuchEventBusException
 
static void register (String nodeName, Object subscriber)
 

Protected Member Functions

void addNotify ()
 
boolean createKeys (List< T > toPopulate)
 
abstract List< T > makeKeys ()
 
abstract void onAdd ()
 
abstract void onRemove ()
 
void removeNotify ()
 

Private Attributes

Predicate< T > filter
 
boolean isPageChangeEvent
 
boolean isPageSizeChangeEvent
 
final PagingSupport pagingSupport
 

Static Private Attributes

static final Logger logger = Logger.getLogger(BaseChildFactory.class.getName())
 
static Map< String, EventBus > nodeNameToEventBusMap = new ConcurrentHashMap<>()
 

Detailed Description

Abstract child factory that provides paging and filtering functionality to subclasses.

Parameters
<T>

Definition at line 45 of file BaseChildFactory.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.BaseChildFactory ( String  nodeName)

Initialize a no-op filter that always returns true.

Definition at line 104 of file BaseChildFactory.java.

org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.BaseChildFactory ( String  nodeName,
Predicate< T >  filter 
)

Definition at line 111 of file BaseChildFactory.java.

Member Function Documentation

void org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.addNotify ( )
protected

Definition at line 120 of file BaseChildFactory.java.

boolean org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.createKeys ( List< T >  toPopulate)
protected

For page change events and page size change events we simply return the previously calculated set of keys, otherwise we make a new set of keys.

Definition at line 148 of file BaseChildFactory.java.

abstract List<T> org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.makeKeys ( )
abstractprotected

Subclasses implement this to construct a collection of keys.

Returns

Referenced by org.sleuthkit.autopsy.datamodel.BaseChildFactory< FileTypesKey >.createKeys().

abstract void org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.onAdd ( )
abstractprotected

Subclasses implement this to initialize any required resources.

Referenced by org.sleuthkit.autopsy.datamodel.BaseChildFactory< FileTypesKey >.addNotify().

abstract void org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.onRemove ( )
abstractprotected

Subclasses implement this to clean up any resources they acquired in onAdd()

Referenced by org.sleuthkit.autopsy.datamodel.BaseChildFactory< FileTypesKey >.removeNotify().

static void org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.post ( String  nodeName,
Object  event 
) throws NoSuchEventBusException
static

Post the given event for the given node name.

Parameters
nodeNameThe name of the node.
eventThe event to post.
Exceptions
org.sleuthkit.autopsy.datamodel.BaseChildFactory.NoSuchEventBusException

Definition at line 96 of file BaseChildFactory.java.

static void org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.register ( String  nodeName,
Object  subscriber 
)
static

Register the given subscriber for the given node name. Will create the event bus for the given node name if it does not exist.

Parameters
nodeNameThe name of the node.
subscriberThe subscriber to register.

Definition at line 78 of file BaseChildFactory.java.

Referenced by org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.PagingSupport.initialize().

void org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.removeNotify ( )
protected

Definition at line 125 of file BaseChildFactory.java.

Member Data Documentation

Predicate<T> org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.filter
private
boolean org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.isPageChangeEvent
private

Definition at line 50 of file BaseChildFactory.java.

boolean org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.isPageSizeChangeEvent
private

Definition at line 51 of file BaseChildFactory.java.

final Logger org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.logger = Logger.getLogger(BaseChildFactory.class.getName())
staticprivate

Definition at line 47 of file BaseChildFactory.java.

Map<String, EventBus> org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.nodeNameToEventBusMap = new ConcurrentHashMap<>()
staticprivate

This static map is used to facilitate communication between the UI and the child factory.

Definition at line 59 of file BaseChildFactory.java.

final PagingSupport org.sleuthkit.autopsy.datamodel.BaseChildFactory< T extends Content >.pagingSupport
private

Definition at line 53 of file BaseChildFactory.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2019 Basis Technology. Generated on: Tue Jan 7 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.