Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.casemodule.Case Class Reference

Inherits org::sleuthkit::datamodel::SleuthkitCase::ErrorObserver.

Classes

enum  Events
 

Public Member Functions

Image addImage (String imgPath, long imgId, String timeZone) throws CaseActionException
 
Services getServices ()
 
SleuthkitCase getSleuthkitCase ()
 
void closeCase () throws CaseActionException
 
String getName ()
 
String getNumber ()
 
String getExaminer ()
 
String getCaseDirectory ()
 
String getTempDirectory ()
 
String getCacheDirectory ()
 
String getExportDirectory ()
 
String getLogDirectoryPath ()
 
String getCreatedDate ()
 
String getModulesOutputDirAbsPath ()
 
List< ContentgetDataSources () throws TskCoreException
 
Set< TimeZone > getTimeZone ()
 
void receiveError (String context, String errorMessage)
 
void addReport (String localPath, String srcModuleName, String reportName) throws TskCoreException
 
List< ReportgetAllReports () throws TskCoreException
 
boolean hasData ()
 

Static Public Member Functions

static Case getCurrentCase ()
 
static boolean isCaseOpen ()
 
static void create (String caseDir, String caseName, String caseNumber, String examiner) throws CaseActionException
 
static void open (String configFilePath) throws CaseActionException
 
static boolean existsCurrentCase ()
 
static String getAutopsyVersion ()
 
static String getAppName ()
 
static String getModulesOutputDirRelPath ()
 
static PropertyChangeSupport getPropertyChangeSupport ()
 
static synchronized void addPropertyChangeListener (PropertyChangeListener listener)
 
static synchronized void removePropertyChangeListener (PropertyChangeListener listener)
 
static boolean pathExists (String imgPath)
 
static String convertTimeZone (String timezoneID)
 
static void invokeStartupDialog ()
 
static boolean isValidName (String caseName)
 

Static Public Attributes

static final String propStartup = "LBL_StartupDialog"
 

Private Member Functions

 Case (String name, String number, String examiner, String configFilePath, XMLCaseManagement xmlcm, SleuthkitCase db)
 
void init ()
 
void setConfigFilePath (String givenPath)
 
void doDeleteImage ()
 

Static Private Member Functions

static void changeCase (Case newCase)
 
static void checkImagesExist (SleuthkitCase db)
 
static void runAddImageAction ()
 
static void clearTempFolder ()
 
static void checkSubFolders (Case openedCase)
 
static void doCaseChange (Case toChangeTo)
 
static void doCaseNameChange (String newCaseName)
 

Private Attributes

String name
 
String number
 
String examiner
 
String configFilePath
 
final XMLCaseManagement xmlcm
 
final SleuthkitCase db
 
final Services services
 
boolean hasData = false
 

Static Private Attributes

static final String autopsyVer = Version.getVersion()
 
static String appName = null
 
static final PropertyChangeSupport pcs = new PropertyChangeSupport(Case.class)
 
static Case currentCase = null
 
static final Logger logger = Logger.getLogger(Case.class.getName())
 
static final String pdisk = "\\\\.\\physicaldrive"
 
static final String dev = "/dev/"
 

Detailed Description

Stores all information for a given case. Only a single case can currently be open at a time. Use getCurrentCase() to retrieve the object for the current case.

Definition at line 61 of file Case.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.casemodule.Case.Case ( String  name,
String  number,
String  examiner,
String  configFilePath,
XMLCaseManagement  xmlcm,
SleuthkitCase  db 
)
private

Constructor for the Case class

Definition at line 151 of file Case.java.

Member Function Documentation

Image org.sleuthkit.autopsy.casemodule.Case.addImage ( String  imgPath,
long  imgId,
String  timeZone 
) throws CaseActionException

Adds the image to the current case after it has been added to the DB Sends out event and reopens windows if needed.

Parameters
imgPathsthe paths of the image that being added
imgIdthe ID of the image that being added
timeZonethe timeZone of the image where it's added

Definition at line 425 of file Case.java.

References org.sleuthkit.autopsy.casemodule.Case.Events.DATA_SOURCE_ADDED, org.sleuthkit.autopsy.coreutils.MessageNotifyUtil.MessageType.ERROR, org::sleuthkit::datamodel::SleuthkitCase.getImageById(), org.sleuthkit.autopsy.corecomponentinterfaces.CoreComponentControl.openCoreWindows(), and org.sleuthkit.autopsy.coreutils.MessageNotifyUtil.Notify.show().

static synchronized void org.sleuthkit.autopsy.casemodule.Case.addPropertyChangeListener ( PropertyChangeListener  listener)
static
void org.sleuthkit.autopsy.casemodule.Case.addReport ( String  localPath,
String  srcModuleName,
String  reportName 
) throws TskCoreException

Adds a report to the case.

Parameters
[in]localPathThe path of the report file, must be in the case directory or one of its subdirectories.
[in]sourceModuleNameThe name of the module that created the report.
[in]reportNameThe report name, may be empty.
Returns
A Report data transfer object (DTO) for the new row.
Exceptions
TskCoreException

Definition at line 1165 of file Case.java.

References org::sleuthkit::datamodel::SleuthkitCase.addReport(), org.sleuthkit.autopsy.casemodule.Case.pcs, and org.sleuthkit.autopsy.casemodule.Case.Events.REPORT_ADDED.

Referenced by org.sleuthkit.autopsy.externalresults.ExternalResultsImporter.importReports(), and org.sleuthkit.autopsy.timeline.actions.SaveSnapshot.SaveSnapshot().

static void org.sleuthkit.autopsy.casemodule.Case.changeCase ( Case  newCase)
staticprivate
static void org.sleuthkit.autopsy.casemodule.Case.checkImagesExist ( SleuthkitCase  db)
staticprivate

Ensure that all image paths point to valid image files

Definition at line 389 of file Case.java.

static void org.sleuthkit.autopsy.casemodule.Case.checkSubFolders ( Case  openedCase)
staticprivate

Check for existence of certain case sub dirs and create them if needed.

Parameters
openedCase

Definition at line 1067 of file Case.java.

References org.sleuthkit.autopsy.casemodule.Case.getModulesOutputDirAbsPath().

static void org.sleuthkit.autopsy.casemodule.Case.clearTempFolder ( )
staticprivate
void org.sleuthkit.autopsy.casemodule.Case.closeCase ( ) throws CaseActionException

Closes this case. This methods close the xml and clear all the fields.

Definition at line 499 of file Case.java.

References org::sleuthkit::datamodel::SleuthkitCase.close(), and org.sleuthkit.autopsy.casemodule.services.Services.close().

Referenced by org.sleuthkit.autopsy.corecomponents.Installer.close().

static String org.sleuthkit.autopsy.casemodule.Case.convertTimeZone ( String  timezoneID)
static

Convert the Java timezone ID to the "formatted" string that can be accepted by the C/C++ code. Example: "America/New_York" converted to "EST5EDT", etc

Parameters
timezoneID
Returns

Definition at line 906 of file Case.java.

static void org.sleuthkit.autopsy.casemodule.Case.create ( String  caseDir,
String  caseName,
String  caseNumber,
String  examiner 
) throws CaseActionException
static

Creates a new case (create the XML config file and database)

Parameters
caseDirThe directory to store case data in. Will be created if it doesn't already exist. If it exists, it should have all of the needed sub dirs that createCaseDirectory() will create.
caseNamethe name of case
caseNumberthe case number
examinerthe examiner for this case

Two-stage initialization to avoid leaking reference to "this" in constructor.

Definition at line 277 of file Case.java.

References org.sleuthkit.autopsy.casemodule.Case.init(), and org::sleuthkit::datamodel::SleuthkitCase.newCase().

static void org.sleuthkit.autopsy.casemodule.Case.doCaseChange ( Case  toChangeTo)
staticprivate
static void org.sleuthkit.autopsy.casemodule.Case.doCaseNameChange ( String  newCaseName)
staticprivate

Definition at line 1132 of file Case.java.

References org.sleuthkit.autopsy.casemodule.Case.getAppName().

void org.sleuthkit.autopsy.casemodule.Case.doDeleteImage ( )
private
static boolean org.sleuthkit.autopsy.casemodule.Case.existsCurrentCase ( )
static
List<Report> org.sleuthkit.autopsy.casemodule.Case.getAllReports ( ) throws TskCoreException
static String org.sleuthkit.autopsy.casemodule.Case.getAppName ( )
static

Gets the application name

Returns
appName

Definition at line 658 of file Case.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.doCaseChange(), and org.sleuthkit.autopsy.casemodule.Case.doCaseNameChange().

static String org.sleuthkit.autopsy.casemodule.Case.getAutopsyVersion ( )
static

Returns the current version of Autopsy

Returns
autopsyVer

Definition at line 649 of file Case.java.

String org.sleuthkit.autopsy.casemodule.Case.getCacheDirectory ( )

Gets the full path to the cache directory of this case

Returns
cacheDirectoryPath

Definition at line 723 of file Case.java.

Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getFile().

String org.sleuthkit.autopsy.casemodule.Case.getCaseDirectory ( )
String org.sleuthkit.autopsy.casemodule.Case.getCreatedDate ( )

get the created date of this case

Returns
case creation date

Definition at line 762 of file Case.java.

static Case org.sleuthkit.autopsy.casemodule.Case.getCurrentCase ( )
static

Gets the currently opened case, if there is one.

Returns
the current open case
Exceptions
IllegalStateExceptionif there is no case open.

Definition at line 176 of file Case.java.

Referenced by org.sleuthkit.autopsy.actions.OpenLogFolderAction.actionPerformed(), org.sleuthkit.autopsy.directorytree.ExternalViewerAction.actionPerformed(), org.sleuthkit.autopsy.actions.AddBlackboardArtifactTagAction.addTag(), org.sleuthkit.autopsy.actions.AddContentTagAction.addTag(), org.sleuthkit.autopsy.corecomponents.DataContentTopComponent.canClose(), org.sleuthkit.autopsy.corecomponents.DataResultTopComponent.canClose(), org.sleuthkit.autopsy.corecomponents.DataResultPanel.canClose(), org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.canClose(), org.sleuthkit.autopsy.report.ReportGenerator.TableReportsWorker.checkIfTagHasImage(), org.sleuthkit.autopsy.corecomponents.Installer.close(), org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.componentOpened(), org.sleuthkit.autopsy.datamodel.Reports.ReportNodeFactory.createKeys(), org.sleuthkit.autopsy.datamodel.Tags.TagNameNodeFactory.createKeys(), org.sleuthkit.autopsy.datamodel.Tags.ContentTagNodeFactory.createKeys(), org.sleuthkit.autopsy.datamodel.Tags.BlackboardArtifactTagNodeFactory.createKeys(), org.sleuthkit.autopsy.timeline.explorernodes.EventRootNode.EventNodeChildFactory.createNodeForKey(), org.sleuthkit.autopsy.actions.DeleteContentTagAction.doAction(), org.sleuthkit.autopsy.actions.DeleteBlackboardArtifactTagAction.doAction(), org.sleuthkit.autopsy.timeline.events.db.EventsRepository.DBPopulationWorker.doInBackground(), org.sleuthkit.autopsy.timeline.events.db.EventsRepository.EventsRepository(), org.sleuthkit.autopsy.directorytree.ExtractAction.extractFile(), org.sleuthkit.autopsy.directorytree.ExtractAction.extractFiles(), org.sleuthkit.autopsy.externalresults.ExternalResultsImporter.findFileInCaseDatabase(), org.sleuthkit.autopsy.ingest.IngestServices.getCurrentCase(), org.sleuthkit.autopsy.ingest.IngestServices.getCurrentSleuthkitCaseDb(), org.sleuthkit.autopsy.coreutils.ImageUtils.getFile(), org.sleuthkit.autopsy.report.ReportGenerator.FileReportsWorker.getFiles(), org.sleuthkit.autopsy.corecomponents.FXVideoPanel.getJFile(), org.sleuthkit.autopsy.corecomponents.GstVideoPanel.getJFile(), org.sleuthkit.autopsy.externalresults.ExternalResultsImporter.getPathRelativeToCaseFolder(), org.sleuthkit.autopsy.actions.GetTagNameAndCommentDialog.GetTagNameAndCommentDialog(), org.sleuthkit.autopsy.actions.GetTagNameDialog.GetTagNameDialog(), org.sleuthkit.autopsy.externalresults.ExternalResultsImporter.importArtifacts(), org.sleuthkit.autopsy.externalresults.ExternalResultsImporter.importDerivedFiles(), org.sleuthkit.autopsy.externalresults.ExternalResultsImporter.importReports(), org.sleuthkit.autopsy.keywordsearch.SolrSearchService.indexArtifact(), org.sleuthkit.autopsy.report.ReportGenerator.TableReportsWorker.makeBlackboardArtifactTagsTables(), org.sleuthkit.autopsy.report.ReportGenerator.TableReportsWorker.makeContentTagsTables(), org.sleuthkit.autopsy.actions.GetTagNameDialog.okButtonActionPerformed(), org.sleuthkit.autopsy.timeline.OpenTimelineAction.performAction(), org.sleuthkit.autopsy.report.ArtifactSelectionDialog.populateList(), org.sleuthkit.autopsy.timeline.actions.SaveSnapshot.SaveSnapshot(), org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode.setDisplayName(), org.sleuthkit.autopsy.ingest.IngestMonitor.MonitorAction.setMonitorDir(), org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.startUp(), org.sleuthkit.autopsy.examples.SampleExecutableDataSourceIngestModule.startUp(), org.sleuthkit.autopsy.datamodel.Tags.TagNameNode.updateDisplayName(), org.sleuthkit.autopsy.datamodel.Tags.ContentTagTypeNode.updateDisplayName(), and org.sleuthkit.autopsy.datamodel.Tags.BlackboardArtifactTagTypeNode.updateDisplayName().

List<Content> org.sleuthkit.autopsy.casemodule.Case.getDataSources ( ) throws TskCoreException

Get the data model Content objects in the root of this case's hierarchy.

Returns
a list of the root objects
Exceptions
org.sleuthkit.datamodel.TskCoreException

Definition at line 806 of file Case.java.

References org::sleuthkit::datamodel::SleuthkitCase.getRootObjects().

String org.sleuthkit.autopsy.casemodule.Case.getExaminer ( )

Gets the Examiner name

Returns
examiner

Definition at line 688 of file Case.java.

String org.sleuthkit.autopsy.casemodule.Case.getExportDirectory ( )

Gets the full path to the export directory of this case

Returns
export DirectoryPath

Definition at line 736 of file Case.java.

Referenced by org.sleuthkit.autopsy.directorytree.ExtractAction.extractFile(), and org.sleuthkit.autopsy.directorytree.ExtractAction.extractFiles().

String org.sleuthkit.autopsy.casemodule.Case.getLogDirectoryPath ( )

Gets the full path to the log directory for this case.

Returns
The log directory path.

Definition at line 749 of file Case.java.

Referenced by org.sleuthkit.autopsy.actions.OpenLogFolderAction.actionPerformed(), and org.sleuthkit.autopsy.casemodule.Case.changeCase().

String org.sleuthkit.autopsy.casemodule.Case.getModulesOutputDirAbsPath ( )

Get absolute module output directory path where modules should save their permanent data The directory is a subdirectory of this case dir.

Returns
absolute path to the module output dir

Definition at line 776 of file Case.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.checkSubFolders(), org.sleuthkit.autopsy.recentactivity.RAImageIngestModule.getRAOutputPath(), org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.startUp(), and org.sleuthkit.autopsy.examples.SampleExecutableDataSourceIngestModule.startUp().

static String org.sleuthkit.autopsy.casemodule.Case.getModulesOutputDirRelPath ( )
static

Get relative (with respect to case dir) module output directory path where modules should save their permanent data The directory is a subdirectory of this case dir.

Returns
relative path to the module output dir

Definition at line 787 of file Case.java.

Referenced by org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.startUp().

String org.sleuthkit.autopsy.casemodule.Case.getName ( )
String org.sleuthkit.autopsy.casemodule.Case.getNumber ( )

Gets the case number

Returns
number

Definition at line 679 of file Case.java.

static PropertyChangeSupport org.sleuthkit.autopsy.casemodule.Case.getPropertyChangeSupport ( )
static

get the PropertyChangeSupport of this class

Returns
PropertyChangeSupport

Definition at line 796 of file Case.java.

Services org.sleuthkit.autopsy.casemodule.Case.getServices ( )
SleuthkitCase org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase ( )
String org.sleuthkit.autopsy.casemodule.Case.getTempDirectory ( )
Set<TimeZone> org.sleuthkit.autopsy.casemodule.Case.getTimeZone ( )

Gets the time zone(s) of the image(s) in this case.

Returns
time zones the set of time zones

Definition at line 817 of file Case.java.

References org::sleuthkit::datamodel::Content.getDataSource(), and org::sleuthkit::datamodel::Image.getTimeZone().

boolean org.sleuthkit.autopsy.casemodule.Case.hasData ( )

Returns if the case has data in it yet.

Returns

Definition at line 1184 of file Case.java.

void org.sleuthkit.autopsy.casemodule.Case.init ( )
private

Does initialization that would leak a reference to this if done in the constructor.

Definition at line 165 of file Case.java.

References org::sleuthkit::datamodel::SleuthkitCase.addErrorObserver().

Referenced by org.sleuthkit.autopsy.casemodule.Case.create(), and org.sleuthkit.autopsy.casemodule.Case.open().

static void org.sleuthkit.autopsy.casemodule.Case.invokeStartupDialog ( )
static
static boolean org.sleuthkit.autopsy.casemodule.Case.isCaseOpen ( )
static
static boolean org.sleuthkit.autopsy.casemodule.Case.isValidName ( String  caseName)
static

Checks if a String is a valid case name

Parameters
caseNamethe candidate String
Returns
true if the candidate String is a valid case name

Definition at line 1040 of file Case.java.

static void org.sleuthkit.autopsy.casemodule.Case.open ( String  configFilePath) throws CaseActionException
static

Opens the existing case (open the XML config file)

Parameters
configFilePaththe path of the configuration file that's opened
Exceptions
CaseActionException

Two-stage initialization to avoid leaking reference to "this" in constructor.

Definition at line 318 of file Case.java.

References org::sleuthkit::datamodel::SleuthkitCase.getBackupDatabasePath(), org.sleuthkit.autopsy.casemodule.Case.init(), and org::sleuthkit::datamodel::SleuthkitCase.openCase().

Referenced by org.sleuthkit.autopsy.casemodule.CaseOpenAction.actionPerformed(), and org.sleuthkit.autopsy.corecomponents.Installer.restored().

static boolean org.sleuthkit.autopsy.casemodule.Case.pathExists ( String  imgPath)
static

Check if image from the given image path exists.

Parameters
imgPaththe image path
Returns
isExist whether the path exists

Definition at line 848 of file Case.java.

Referenced by org.sleuthkit.autopsy.casemodule.ImageFilePanel.validatePanel().

void org.sleuthkit.autopsy.casemodule.Case.receiveError ( String  context,
String  errorMessage 
)
static synchronized void org.sleuthkit.autopsy.casemodule.Case.removePropertyChangeListener ( PropertyChangeListener  listener)
static
static void org.sleuthkit.autopsy.casemodule.Case.runAddImageAction ( )
staticprivate

Call if there are no images in the case. Displays a dialog offering to add one.

Definition at line 1023 of file Case.java.

References org.sleuthkit.autopsy.casemodule.AddImageAction.actionPerformed().

void org.sleuthkit.autopsy.casemodule.Case.setConfigFilePath ( String  givenPath)
private

Uses the given path to store it as the configuration file path

Parameters
givenPaththe given config file path

Definition at line 631 of file Case.java.

Member Data Documentation

String org.sleuthkit.autopsy.casemodule.Case.appName = null
staticprivate

Definition at line 64 of file Case.java.

final String org.sleuthkit.autopsy.casemodule.Case.autopsyVer = Version.getVersion()
staticprivate

Definition at line 63 of file Case.java.

String org.sleuthkit.autopsy.casemodule.Case.configFilePath
private

Definition at line 135 of file Case.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.changeCase().

Case org.sleuthkit.autopsy.casemodule.Case.currentCase = null
staticprivate

Definition at line 139 of file Case.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.changeCase().

final SleuthkitCase org.sleuthkit.autopsy.casemodule.Case.db
private

Definition at line 137 of file Case.java.

final String org.sleuthkit.autopsy.casemodule.Case.dev = "/dev/"
staticprivate

Definition at line 855 of file Case.java.

String org.sleuthkit.autopsy.casemodule.Case.examiner
private

Definition at line 134 of file Case.java.

boolean org.sleuthkit.autopsy.casemodule.Case.hasData = false
private
final Logger org.sleuthkit.autopsy.casemodule.Case.logger = Logger.getLogger(Case.class.getName())
staticprivate

Definition at line 141 of file Case.java.

String org.sleuthkit.autopsy.casemodule.Case.name
private

Definition at line 130 of file Case.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.changeCase().

String org.sleuthkit.autopsy.casemodule.Case.number
private

Definition at line 133 of file Case.java.

final PropertyChangeSupport org.sleuthkit.autopsy.casemodule.Case.pcs = new PropertyChangeSupport(Case.class)
staticprivate

Definition at line 72 of file Case.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.addReport().

final String org.sleuthkit.autopsy.casemodule.Case.pdisk = "\\\\.\\physicaldrive"
staticprivate

Does the given string refer to a physical drive?

Definition at line 854 of file Case.java.

final String org.sleuthkit.autopsy.casemodule.Case.propStartup = "LBL_StartupDialog"
static

Name for the property that determines whether to show the dialog at startup

Definition at line 70 of file Case.java.

final Services org.sleuthkit.autopsy.casemodule.Case.services
private

Definition at line 140 of file Case.java.

final XMLCaseManagement org.sleuthkit.autopsy.casemodule.Case.xmlcm
private

Definition at line 136 of file Case.java.


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

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.