Added section from Eugene on report setting persistence.

Fixed typo.
This commit is contained in:
Ann Priestman 2019-09-25 08:15:46 -04:00
parent 7a387a4866
commit fd937a7fd3
2 changed files with 45 additions and 2 deletions

View File

@ -37,7 +37,7 @@ The table below shows a summary of the command line operations. You can run one
<tr><td><b>Generate Reports</b></td><td><pre>--generateReports</pre></td><td>&nbsp;</td><td><pre>--generateReports</pre></td></tr> <tr><td><b>Generate Reports</b></td><td><pre>--generateReports</pre></td><td>&nbsp;</td><td><pre>--generateReports</pre></td></tr>
<tr><td><b>Create List of Data Sources</b></td><td><pre>--listAllDataSources</pre></td><td>&nbps;</td><td></td><pre>--listAllDataSources</pre></tr> <tr><td><b>Create List of Data Sources</b></td><td><pre>--listAllDataSources</pre></td><td>&nbsp;</td><td></td><pre>--listAllDataSources</pre></tr>
</table> </table>

View File

@ -58,7 +58,7 @@ As when generating table module reports, Autopsy will iterate through a list of
\subsection report_create_module_general Creating a General Report Module \subsection report_create_module_general Creating a General Report Module
If you implement GeneralReportModule, the overriden methods will be: If you implement GeneralReportModule, the overridden methods will be:
- org.sleuthkit.autopsy.report.GeneralReportModule.generateReport(String reportPath, ReportProgressPanel progressPanel) - org.sleuthkit.autopsy.report.GeneralReportModule.generateReport(String reportPath, ReportProgressPanel progressPanel)
- org.sleuthkit.autopsy.report.GeneralReportModule.getConfigurationPanel() - org.sleuthkit.autopsy.report.GeneralReportModule.getConfigurationPanel()
@ -125,4 +125,47 @@ Report modules developed using Jython are installed in Autopsy by placing them i
directory. A window into the python_modules directory can be opened through the Autopsy's Tools -> Python Plugins menu item. directory. A window into the python_modules directory can be opened through the Autopsy's Tools -> Python Plugins menu item.
Create a folder in this directory and create or place your Python scripts in this folder. Create a folder in this directory and create or place your Python scripts in this folder.
\subsection report_create_module_persistence Persisting your Report Module Configuration
Both Java and Python report modules can have their configurations persisted to disk. In order to do so, the report module must do
two things:
<ol>
<li> The report module must have a class that defines the configuration for the module (for example, org.sleuthkit.autopsy.report.modules.html.HTMLReportModuleSettings). This class
must implement the ReportModuleSettings interface. Note that the ReportModuleSettings interface extends Serializable, therefore the report
settings class must contain serialVersionUID variable:
\code
class HTMLReportModuleSettings implements ReportModuleSettings {
private static final long serialVersionUID = 1L;
HTMLReportModuleSettings() {
}
@Override
public long getVersionNumber() {
return serialVersionUID;
}
}
\endcode
<li>The report module implementation class (e.g. ReportHTML) must implement the following methods of the ReportModule interface:
- getDefaultConfiguration()
- getConfiguration()
- setConfiguration(ReportModuleSettings settings)
</ol>
The use case scenario for this API when the configuration of a report module is occurring is as follows (using HTMLReport as example):
<ol>
<li>User clicks "Generate Reports" button in the Autopsy UI.
<li>Report Configuration UI attempts to load the persisted reporting configuration from disk.
<li>For each existing report module, if a persisted ReportModuleSettings (i.e. HTMLReportModuleSettings) configuration exists, Configuration UI calls HTMLReport.setConfiguration() with the persisted settings; Otherwise the Configuration UI calls HTMLReport.getDefaultConfiguration(), then HTMLReport.setConfiguration().
<li>Configuration UI calls HTMLReport.getConfigurationPanel(). The report module loads the settings into its configuration panel and returns the panel.
<li>Configuration UI presents the panel to the user.
<li>User interacts with the panel to modify the current settings of the report module.
<li>Configuration UI calls HTMLReport.getConfiguration() and obtains the latest report module configuration.
<li>Configuration UI persists the module settings.
</ol>
*/ */