diff options
author | knowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-07-24 16:34:32 +0000 |
---|---|---|
committer | knowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-07-24 16:34:32 +0000 |
commit | 9bdb3a0ea0ee00a0dc7bfa7fb6658859f9024d13 (patch) | |
tree | 77a3cb0d96ebba287949c408db7f37d31f6c08ef /src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid | |
parent | a439dcdd796a5b532480531c7701309beef9e94c (diff) | |
download | pdf-as-3-9bdb3a0ea0ee00a0dc7bfa7fb6658859f9024d13.tar.gz pdf-as-3-9bdb3a0ea0ee00a0dc7bfa7fb6658859f9024d13.tar.bz2 pdf-as-3-9bdb3a0ea0ee00a0dc7bfa7fb6658859f9024d13.zip |
Stable version.
Known problems:
Verification with MOA 1.0.0 signatures
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@151 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid')
3 files changed, 24 insertions, 16 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedIdFormatter.java index 7220857..7e67d0d 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedIdFormatter.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedIdFormatter.java @@ -21,7 +21,10 @@ public class DetachedIdFormatter implements IdFormatter */
public static String SIG_ID_PREFIX = "etsi-bka-1.0"; //$NON-NLS-1$
- public static final String SIG_ID_KEY = "default.bku.algorithm.id";
+ /**
+ * Key value in property file
+ */
+ public static final String SIG_ID_PROPERTY_KEY = "default.bku.algorithm.id";
/**
* The log.
@@ -33,13 +36,13 @@ public class DetachedIdFormatter implements IdFormatter */
public String formatIds(String[] ids)
{
- // read SIG_ID_PREFIX from config file
+ // read id from property file and use it
try {
- SIG_ID_PREFIX = SettingsReader.getInstance().getValueFromKey(SIG_ID_KEY);
+ SIG_ID_PREFIX = SettingsReader.getInstance().getValueFromKey(SIG_ID_PROPERTY_KEY);
} catch (SettingsException e) {
e.printStackTrace();
}
-
+
// ids algorithm:
String join = ""; //$NON-NLS-1$
String base = null;
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 ec6d054..cc28adc 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 @@ -17,23 +17,27 @@ public class DetachedLocRefMOAIdFormatter implements IdFormatter * Default value: etsi-bka-moa-1.0
*/
public static String SIG_ID_PREFIX = "etsi-bka-moa-1.0"; //$NON-NLS-1$
- public static String SIG_ID_KEY = "default.moa.algorithm.id";
+
+ /**
+ * Key value in property file
+ */
+ public static final String SIG_ID_PROPERTY_KEY = "default.moa.algorithm.id";
/**
* @see at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter#formatIds(java.lang.String[])
*/
public String formatIds(String[] ids)
{
- String tmp = null;
-
- try {
- tmp = SettingsReader.getInstance().getValueFromKey(SIG_ID_KEY);
- if(tmp != null)
- SIG_ID_PREFIX = tmp;
- } catch (SettingsException e) {
- e.printStackTrace();
- }
-
+ // read id from property file and use it
+
+ try
+ {
+ SIG_ID_PREFIX = SettingsReader.getInstance().getValueFromKey(SIG_ID_PROPERTY_KEY);
+ } catch (SettingsException e)
+ {
+ e.printStackTrace();
+ }
+
return SIG_ID_PREFIX;
}
}
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..ab322d9 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 @@ -15,7 +15,8 @@ public class OldMOAIdFormatter implements IdFormatter */
public String formatIds(String[] ids)
{
- return null;
+ return "etsi-bka-moa-1.0";
}
}
+
|