From 5c20905703db89e08814257725639db385cc80e7 Mon Sep 17 00:00:00 2001 From: knowcenter Date: Tue, 17 Jul 2007 17:38:35 +0000 Subject: SIG_ID(Kennzeichnung) value when using MOA works in commandline (Enveloped, v1.0.0) and in Web (detached, v1.1.0) case see config file: moa.sign.id.active=true/false git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@136 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java | 10 +++++++++- .../knowcenter/wag/egov/egiz/sig/sigid/OldMOAIdFormatter.java | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java index ab2774d..c1d831e 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java @@ -5,6 +5,7 @@ package at.knowcenter.wag.egov.egiz.sig.sigid; import at.knowcenter.wag.egov.egiz.cfg.SettingsReader; import at.knowcenter.wag.egov.egiz.exceptions.SettingsException; +import at.knowcenter.wag.egov.egiz.sig.ConnectorFactory; /** * @author wprinz @@ -23,7 +24,14 @@ public class DetachedLocRefMOAIdFormatter implements IdFormatter try { - sig_id_prefix = SettingsReader.getInstance().getValueFromKey(MOA_SIG_ID_KEY); + //FIXME make better + //connector is hard coded since this method is called only when using MOA! + boolean sig_id_visible = ConnectorFactory.needsSIG_ID("moa"); + + if (sig_id_visible) + { + sig_id_prefix = SettingsReader.getInstance().getValueFromKey(MOA_SIG_ID_KEY); + } } catch (SettingsException e) { e.printStackTrace(); diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/OldMOAIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/OldMOAIdFormatter.java index f45fbbe..d4bd166 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/OldMOAIdFormatter.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/OldMOAIdFormatter.java @@ -5,6 +5,7 @@ package at.knowcenter.wag.egov.egiz.sig.sigid; import at.knowcenter.wag.egov.egiz.cfg.SettingsReader; import at.knowcenter.wag.egov.egiz.exceptions.SettingsException; +import at.knowcenter.wag.egov.egiz.sig.ConnectorFactory; /** * @author wprinz @@ -24,7 +25,14 @@ public class OldMOAIdFormatter implements IdFormatter try { - sig_id_prefix = SettingsReader.getInstance().getValueFromKey(MOA_SIG_ID_KEY); + // FIXME make better + //connector is hard coded since this method is called only when using MOA! + boolean sig_id_visible = ConnectorFactory.needsSIG_ID("moa"); + + if (sig_id_visible) + { + sig_id_prefix = SettingsReader.getInstance().getValueFromKey(MOA_SIG_ID_KEY); + } } catch (SettingsException e) { e.printStackTrace(); -- cgit v1.2.3