aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedIdFormatter.java13
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java11
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java12
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/HotfixIdFormatter.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/IdFormatter.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/OldMOAIdFormatter.java2
6 files changed, 29 insertions, 13 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 1b24a98..6d83a9f 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
@@ -34,7 +34,7 @@ public class DetachedIdFormatter implements IdFormatter
/**
* @see at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter#formatIds(java.lang.String[])
*/
- public String formatIds(String[] ids)
+ public String formatIds(String[] ids, String algorithmParams)
{
// read id from property file and use it
try {
@@ -67,8 +67,15 @@ public class DetachedIdFormatter implements IdFormatter
join += "-" + cur_id; //$NON-NLS-1$
}
String idstr = base + "@" + join.substring(1); //$NON-NLS-1$
- String final_ids = SIG_ID_PREFIX + "@" + idstr;
- return final_ids;
+
+ // dferbas
+ StringBuilder final_ids = new StringBuilder(SIG_ID_PREFIX);
+ //String final_ids = SIG_ID_PREFIX + "@" + idstr;
+ if (algorithmParams != null && algorithmParams.length() > 0) {
+ final_ids.append(":").append(algorithmParams);
+ }
+ final_ids.append("@").append(idstr);
+ return final_ids.toString();
}
}
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 14fb41e..7d66a4e 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
@@ -31,7 +31,7 @@ public class DetachedLocRefMOAIdFormatter implements IdFormatter
/**
* @see at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter#formatIds(java.lang.String[])
*/
- public String formatIds(String[] ids)
+ public String formatIds(String[] ids, String algorithmParams)
{
// read id from property file and use it
@@ -47,8 +47,11 @@ public class DetachedLocRefMOAIdFormatter implements IdFormatter
logger_.error(e.getMessage(), e);
}
-
-
- return SIG_ID_PREFIX;
+ // dferbas
+ if (algorithmParams != null && algorithmParams.length() > 0) {
+ return SIG_ID_PREFIX + ":" + algorithmParams;
+ } else {
+ return SIG_ID_PREFIX;
+ }
}
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java
index 8b9b606..c15367f 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java
@@ -35,7 +35,7 @@ public class DetachedMOCIdFormatter implements IdFormatter {
/**
* @see at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter#formatIds(java.lang.String[])
*/
- public String formatIds(String[] ids) {
+ public String formatIds(String[] ids, String algorithmParams) {
// read id from property file and use it
String prefix = null;
try {
@@ -45,8 +45,14 @@ public class DetachedMOCIdFormatter implements IdFormatter {
}
prefix = StringUtils.defaultIfEmpty(this.algorithmId, prefix);
- StringBuffer formattedIds = new StringBuffer(prefix).append("@").append(ids[0]);
- return formattedIds.toString();
+ // dferbas
+ StringBuilder formattedIds = new StringBuilder(prefix);
+ if (algorithmParams != null && algorithmParams.length() > 0) {
+ formattedIds.append(":").append(algorithmParams);
+ }
+ formattedIds.append("@").append(ids[0]);
+ return formattedIds.toString();
+
}
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/HotfixIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/HotfixIdFormatter.java
index ac86b4f..36c52af 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/HotfixIdFormatter.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/HotfixIdFormatter.java
@@ -25,7 +25,7 @@ public class HotfixIdFormatter implements IdFormatter
/**
* @see at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter#formatIds(java.lang.String[])
*/
- public String formatIds(String[] ids)
+ public String formatIds(String[] ids, String algorithmParams)
{
// ids algorithm:
String join = ""; //$NON-NLS-1$
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/IdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/IdFormatter.java
index e86e352..6f6a50a 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/IdFormatter.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/IdFormatter.java
@@ -9,6 +9,6 @@ package at.knowcenter.wag.egov.egiz.sig.sigid;
*/
public interface IdFormatter
{
- public String formatIds (String [] ids);
+ public String formatIds (String [] ids, String algorithmParams);
}
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 bf1bd48..25dea0f 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
@@ -13,7 +13,7 @@ public class OldMOAIdFormatter implements IdFormatter
/**
* @see at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter#formatIds(java.lang.String[])
*/
- public String formatIds(String[] ids)
+ public String formatIds(String[] ids, String algorithmParams)
{
return null;//"etsi-bka-moa-1.0";
}