Autopsy  4.18.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor Class Reference

Inherits OptionProcessor.

Public Member Functions

String getDefaultArgument ()
 
boolean isRunFromCommandLine ()
 

Protected Member Functions

Set< Option > getOptions ()
 
void process (Env env, Map< Option, String[]> values) throws CommandException
 

Private Member Functions

void handleError (String errorMessage) throws CommandException
 

Private Attributes

final Option addDataSourceCommandOption = Option.withoutArgument('a', "addDataSource")
 
final Option caseBaseDirOption = Option.requiredArgument('o', "caseBaseDir")
 
final Option caseDirOption = Option.requiredArgument('d', "caseDir")
 
final Option caseNameOption = Option.requiredArgument('n', "caseName")
 
final Option caseTypeOption = Option.requiredArgument('t', "caseType")
 
final List< CommandLineCommand > commands = new ArrayList<>()
 
final Option createCaseCommandOption = Option.withoutArgument('c', "createCase")
 
final Option dataSourceObjectIdOption = Option.requiredArgument('i', "dataSourceObjectId")
 
final Option dataSourcePathOption = Option.requiredArgument('s', "dataSourcePath")
 
final Option defaultArgument = Option.defaultArguments()
 
String defaultArgumentValue = null
 
final Option generateReportsOption = Option.optionalArgument('g', "generateReports")
 
final Option listAllDataSourcesCommandOption = Option.withoutArgument('l', "listAllDataSources")
 
boolean runFromCommandLine = false
 
final Option runIngestCommandOption = Option.optionalArgument('r', "runIngest")
 

Static Private Attributes

static final Logger logger = Logger.getLogger(CommandLineOptionProcessor.class.getName())
 

Detailed Description

This class can be used to add command line options to Autopsy

Definition at line 41 of file CommandLineOptionProcessor.java.

Member Function Documentation

String org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.getDefaultArgument ( )

Return the value of the default argument.

Returns
The default argument value or null if one was not set.

Definition at line 339 of file CommandLineOptionProcessor.java.

Referenced by org.sleuthkit.autopsy.casemodule.StartupWindowProvider.getDefaultArgument().

Set<Option> org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.getOptions ( )
protected

Definition at line 67 of file CommandLineOptionProcessor.java.

void org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.handleError ( String  errorMessage) throws CommandException
private

Send the error message to the log file and create the exception.

Parameters
errorMessage
Exceptions
CommandException

Definition at line 359 of file CommandLineOptionProcessor.java.

boolean org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.isRunFromCommandLine ( )

Returns whether Autopsy should be running in command line mode or not.

Returns
true if running in command line mode, false otherwise.

Definition at line 330 of file CommandLineOptionProcessor.java.

Referenced by org.sleuthkit.autopsy.casemodule.StartupWindowProvider.isRunningFromCommandLine().

void org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.process ( Env  env,
Map< Option, String[]>  values 
) throws CommandException
protected

Member Data Documentation

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.addDataSourceCommandOption = Option.withoutArgument('a', "addDataSource")
private

Definition at line 50 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.caseBaseDirOption = Option.requiredArgument('o', "caseBaseDir")
private

Definition at line 46 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.caseDirOption = Option.requiredArgument('d', "caseDir")
private

Definition at line 51 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.caseNameOption = Option.requiredArgument('n', "caseName")
private

Definition at line 44 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.caseTypeOption = Option.requiredArgument('t', "caseType")
private

Definition at line 45 of file CommandLineOptionProcessor.java.

final List<CommandLineCommand> org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.commands = new ArrayList<>()
private

Definition at line 59 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.createCaseCommandOption = Option.withoutArgument('c', "createCase")
private

Definition at line 47 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.dataSourceObjectIdOption = Option.requiredArgument('i', "dataSourceObjectId")
private

Definition at line 49 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.dataSourcePathOption = Option.requiredArgument('s', "dataSourcePath")
private

Definition at line 48 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.defaultArgument = Option.defaultArguments()
private

Definition at line 55 of file CommandLineOptionProcessor.java.

String org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.defaultArgumentValue = null
private

Definition at line 64 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.generateReportsOption = Option.optionalArgument('g', "generateReports")
private

Definition at line 54 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.listAllDataSourcesCommandOption = Option.withoutArgument('l', "listAllDataSources")
private

Definition at line 53 of file CommandLineOptionProcessor.java.

final Logger org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.logger = Logger.getLogger(CommandLineOptionProcessor.class.getName())
staticprivate

Definition at line 43 of file CommandLineOptionProcessor.java.

boolean org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.runFromCommandLine = false
private

Definition at line 57 of file CommandLineOptionProcessor.java.

final Option org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor.runIngestCommandOption = Option.optionalArgument('r', "runIngest")
private

Definition at line 52 of file CommandLineOptionProcessor.java.


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

Copyright © 2012-2021 Basis Technology. Generated on: Thu Jul 8 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.