aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/SimpleIdFormatter.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/SimpleIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/SimpleIdFormatter.java
new file mode 100644
index 0000000..50da463
--- /dev/null
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/SimpleIdFormatter.java
@@ -0,0 +1,25 @@
+package at.knowcenter.wag.egov.egiz.sig.sigid;
+
+/**
+ * {@link IdFormatter} implementation that uses specified algorithmid but not additional parameters.<br>
+ * usage A-Trust bku
+ * @author dferbas
+ *
+ */
+public class SimpleIdFormatter implements IdFormatter {
+ private String algorithmId;
+
+ public SimpleIdFormatter(String algorithmId) {
+ this.algorithmId = algorithmId;
+ }
+
+ public String formatIds(String[] ids, String algorithmParams) {
+ // dferbas
+ if (algorithmParams != null && algorithmParams.length() > 0) {
+ return this.algorithmId + ":" + algorithmParams;
+ } else {
+ return this.algorithmId;
+ }
+ }
+
+}