19 package org.sleuthkit.autopsy.report;
23 import java.io.IOException;
24 import java.util.logging.Level;
26 import org.openide.util.NbBundle;
44 private static final String
DEFAULT_GENERATOR_LOGO =
"/org/sleuthkit/autopsy/report/images/default_generator_logo.png";
46 .getMessage(
ReportBranding.class,
"ReportBranding.defaultReportTitle.text");
48 .getMessage(
ReportBranding.class,
"ReportBranding.defaultReportFooter.text");
68 File brandingDir =
new File(reportsBrandingDir);
69 if (!brandingDir.exists()) {
70 if (!brandingDir.mkdirs()) {
71 logger.log(Level.SEVERE,
"Error creating report branding dir for the case, will use defaults");
91 }
catch (IOException ex) {
92 logger.log(Level.SEVERE,
"Error extracting report branding resource for generator logo ", ex);
100 if (generatorLogoPath == null) {
109 generatorLogoPath = path;
114 String curPath = null;
123 if (curPath != null &&
new File(curPath).canRead() ==
false) {
125 logger.log(Level.INFO,
"Custom report branding for agency logo is not valid: " + curPath);
141 String curTitle = null;
144 if (curTitle == null || curTitle.isEmpty()) {
146 logger.log(Level.INFO,
"Using default report branding for report title");
161 String curFooter = null;
164 if (curFooter == null) {
166 logger.log(Level.INFO,
"Using default report branding for report footer");
static synchronized String getConfigSetting(String moduleName, String settingName)
String reportsBrandingDir
String getAgencyLogoPath()
static final String REPORT_TITLE_PROP
String getGeneratorLogoPath()
static final String DEFAULT_GENERATOR_LOGO
static String getReportsDirectory()
static final String REPORT_FOOTER_PROP
static String generatorLogoPath
static final String DEFAULT_REPORT_TITLE
void setReportFooter(String footer)
void setGeneratorLogoPath(String path)
String getReportsBrandingDir()
static synchronized void setConfigSetting(String moduleName, String settingName, String settingVal)
static final String DEFAULT_REPORT_FOOTER
static final String AGENCY_LOGO_PATH_PROP
void extractDefaultGeneratorLogo()
void setReportTitle(String title)
static final String MODULE_NAME
synchronized static Logger getLogger(String name)
static final Logger logger
String defaultGeneratorLogoPath
void setAgencyLogoPath(String path)