19package org.sleuthkit.autopsy.report;
21import org.sleuthkit.autopsy.report.infrastructure.ReportGenerator;
23import java.io.IOException;
24import java.nio.file.Path;
25import java.nio.file.Paths;
26import java.util.logging.Level;
27import org.sleuthkit.autopsy.coreutils.Logger;
28import org.openide.util.NbBundle;
29import org.sleuthkit.autopsy.coreutils.ModuleSettings;
30import org.sleuthkit.autopsy.coreutils.PlatformUtil;
46 private static final String
DEFAULT_GENERATOR_LOGO =
"/org/sleuthkit/autopsy/report/images/default_generator_logo.png";
48 .getMessage(
ReportBranding.class,
"ReportBranding.defaultReportTitle.text");
50 .getMessage(
ReportBranding.class,
"ReportBranding.defaultReportFooter.text");
72 if (!brandingDir.exists()) {
73 if (!brandingDir.mkdirs()) {
74 logger.log(Level.SEVERE,
"Error creating report branding dir for the case, will use defaults");
94 }
catch (IOException ex) {
95 logger.log(Level.SEVERE,
"Error extracting report branding resource for generator logo ", ex);
135 if (curPath !=
null && !curPath.isEmpty()) {
138 Path driveLetterOrNetwork = Paths.get(curPath).getRoot();
139 if (driveLetterOrNetwork !=
null) {
146 curPath = absolutePath.toString();
147 if (
new File(curPath).canRead() ==
false) {
149 logger.log(Level.INFO,
"Custom report branding for agency logo is not valid: {0}", curPath);
168 Path relativePath = Paths.get(fullPath);
182 if (curTitle ==
null || curTitle.isEmpty()) {
184 logger.log(Level.INFO,
"Using default report branding for report title");
201 if (curFooter ==
null) {
203 logger.log(Level.INFO,
"Using default report branding for report footer");
synchronized static Logger getLogger(String name)
static synchronized void setConfigSetting(String moduleName, String settingName, String settingVal)
static synchronized String getConfigSetting(String moduleName, String settingName)
static final String REPORT_FOOTER_PROP
static final Logger logger
final String reportsBrandingDir
void extractDefaultGeneratorLogo()
String defaultGeneratorLogoPath
static final String DEFAULT_REPORT_FOOTER
void setReportTitle(String title)
void setReportFooter(String footer)
String getGeneratorLogoPath()
String getAgencyLogoPath()
static final String REPORT_TITLE_PROP
static final String DEFAULT_GENERATOR_LOGO
static String generatorLogoPath
static final String AGENCY_LOGO_PATH_PROP
static final String DEFAULT_REPORT_TITLE
void setGeneratorLogoPath(String path)
static final String MODULE_NAME
void setAgencyLogoPath(String fullPath)
String getReportsBrandingDir()
static String getReportsDirectory()