19 package org.sleuthkit.autopsy.report;
 
   23 import java.io.IOException;
 
   24 import java.nio.file.Path;
 
   25 import java.nio.file.Paths;
 
   26 import java.util.logging.Level;
 
   28 import org.openide.util.NbBundle;
 
   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");
 
   71             File brandingDir = 
new File(reportsBrandingDir);
 
   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); 
 
  103         if (generatorLogoPath == null) {
 
  112         generatorLogoPath = path;
 
  135         if (curPath != null && !curPath.isEmpty()) {
 
  138             Path driveLetterOrNetwork = Paths.get(curPath).getRoot();            
 
  139             if (driveLetterOrNetwork != null) {
 
  145             Path absolutePath = userConfigDir.resolve(curPath);
 
  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);
 
  170         if (Paths.get(fullPath).startsWith(userConfigDir)) {
 
  172             relativePath = userConfigDir.relativize(relativePath);
 
  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"); 
 
static synchronized String getConfigSetting(String moduleName, String settingName)
String getAgencyLogoPath()
static final String REPORT_TITLE_PROP
String getGeneratorLogoPath()
static final String DEFAULT_GENERATOR_LOGO
void setAgencyLogoPath(String fullPath)
final String reportsBrandingDir
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