Added checkConfig
This commit is contained in:
parent
5e2b90c1d4
commit
7fcfc6a6ec
|
@ -117,17 +117,27 @@ public class Geoportal_PDF_Exporter {
|
|||
*/
|
||||
private PDFExporterConfig readPDFExporterConfigsFromGR() {
|
||||
|
||||
PDFExporterConfigProvider credits = new PDFExporterConfigProvider();
|
||||
PDFExporterConfig paths = null;
|
||||
PDFExporterConfigProvider exporterProvider = new PDFExporterConfigProvider();
|
||||
PDFExporterConfig exporterConfig = null;
|
||||
try {
|
||||
|
||||
paths = credits.readConfigsFromGR();
|
||||
exporterConfig = exporterProvider.readConfigsFromGR();
|
||||
|
||||
} catch (Exception ex) {
|
||||
LOG.warn("no pdf credits found");
|
||||
}
|
||||
|
||||
return paths;
|
||||
return exporterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check config.
|
||||
*
|
||||
* @return true, if the PDFExporterConfig (means the proper GR see {@link PDFExporterConfigProvider}) exists, false otherwise.
|
||||
*/
|
||||
public boolean checkConfig() {
|
||||
PDFExporterConfig exporterConfig = readPDFExporterConfigsFromGR();
|
||||
return exporterConfig != null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue