From 66c58144632a5e2d9d23301fe7cfbe77511b33eb Mon Sep 17 00:00:00 2001 From: knowcenter Date: Tue, 17 Jul 2007 15:22:50 +0000 Subject: git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@134 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../knowcenter/wag/egov/egiz/sig/ConnectorFactory.java | 2 +- .../knowcenter/wag/egov/egiz/sig/SignatureObject.java | 9 +++++++++ .../egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java | 3 --- .../wag/egov/egiz/sig/sigid/OldMOAIdFormatter.java | 17 ++++++++++++++++- 4 files changed, 26 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/knowcenter/wag/egov') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/ConnectorFactory.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/ConnectorFactory.java index 6ce7b03..510104d 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/ConnectorFactory.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/ConnectorFactory.java @@ -332,7 +332,7 @@ public abstract class ConnectorFactory { moa_sig_id_visible = SettingsReader.getInstance().getValueFromKey(MOA_SIG_ID_VISIBLE_KEY); - if(!moa_sig_id_visible.equals("true"))// || moa_sig_id_visible == null) + if(!moa_sig_id_visible.equals("true") || moa_sig_id_visible == null) return_result = false; } catch (SettingsException e) diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java index 62944e4..a9fad94 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java @@ -1606,6 +1606,15 @@ public class SignatureObject implements Serializable setValueBruteForce(SignatureTypes.SIG_ID, null); continue; } +// else +// { +// try { +// setValueBruteForce(SignatureTypes.SIG_ID, +// SettingsReader.getInstance().getValueFromKey("default.moa.signature.id")); +// } catch (SettingsException e) { +// e.printStackTrace(); +// } +// } char[] placeholder_chars = new char[sfd.placeholder_length]; for (int i = 0; i < placeholder_chars.length; i++) 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 c12c6c1..ab2774d 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 @@ -12,9 +12,6 @@ import at.knowcenter.wag.egov.egiz.exceptions.SettingsException; */ public class DetachedLocRefMOAIdFormatter implements IdFormatter { - /** - * The SIG_ID prefix. - */ public static final String MOA_SIG_ID_KEY = "default.moa.signature.id"; /** 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 05f5db8..f45fbbe 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 @@ -3,6 +3,9 @@ */ package at.knowcenter.wag.egov.egiz.sig.sigid; +import at.knowcenter.wag.egov.egiz.cfg.SettingsReader; +import at.knowcenter.wag.egov.egiz.exceptions.SettingsException; + /** * @author wprinz * @@ -10,12 +13,24 @@ package at.knowcenter.wag.egov.egiz.sig.sigid; public class OldMOAIdFormatter implements IdFormatter { + public static final String MOA_SIG_ID_KEY = "default.moa.signature.id"; + /** * @see at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter#formatIds(java.lang.String[]) */ public String formatIds(String[] ids) { - return null; + String sig_id_prefix = null; + + try + { + sig_id_prefix = SettingsReader.getInstance().getValueFromKey(MOA_SIG_ID_KEY); + } catch (SettingsException e) + { + e.printStackTrace(); + } + + return sig_id_prefix; } } -- cgit v1.2.3