aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-09-29 11:08:22 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-09-29 11:08:22 +0200
commit9edd8e334faadcc5e9ef90ad5cbb97024c7a9e02 (patch)
tree7ea5788df432765e94c2a4f9a126ec15e9871eb4 /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl
parenta572806e76282c250980a56bfd903c843e873f2a (diff)
downloadpdf-as-4-9edd8e334faadcc5e9ef90ad5cbb97024c7a9e02.tar.gz
pdf-as-4-9edd8e334faadcc5e9ef90ad5cbb97024c7a9e02.tar.bz2
pdf-as-4-9edd8e334faadcc5e9ef90ad5cbb97024c7a9e02.zip
allow external configuration of PDF-AS
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java7
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java4
2 files changed, 8 insertions, 3 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
index dcf1887a..7fe39ff7 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
@@ -94,12 +94,17 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants {
private static final Logger logger = LoggerFactory
.getLogger(PdfAsImpl.class);
- private Settings settings;
+ private ISettings settings;
public PdfAsImpl(File cfgFile) {
logger.info("Initializing PDF-AS with config: " + cfgFile.getPath());
this.settings = new Settings(cfgFile);
}
+
+ public PdfAsImpl(ISettings cfgObject) {
+ logger.info("Initializing PDF-AS with config: " + cfgObject.getClass().getName());
+ this.settings = cfgObject;
+ }
private void verifySignParameter(SignParameter parameter)
throws PdfAsException {
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java
index a553fcd3..60c5683a 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java
@@ -37,9 +37,9 @@ public class ConfigurationImpl implements ISettings, Configuration {
protected Properties overwrittenProperties = new Properties();
- protected Settings settings;
+ protected ISettings settings;
- public ConfigurationImpl(Settings settings) {
+ public ConfigurationImpl(ISettings settings) {
this.settings = settings;
}