]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/output/template/IterableDataset.java
Implement a Template-Foreach (and use in "new email certificate")
[gigi.git] / src / org / cacert / gigi / output / template / IterableDataset.java
diff --git a/src/org/cacert/gigi/output/template/IterableDataset.java b/src/org/cacert/gigi/output/template/IterableDataset.java
new file mode 100644 (file)
index 0000000..d908fcc
--- /dev/null
@@ -0,0 +1,19 @@
+package org.cacert.gigi.output.template;
+
+import java.util.Map;
+
+/**
+ * Represents some kind of data, that may be iterated over in a template.
+ */
+public interface IterableDataset {
+       /**
+        * Moves to the next Dataset.
+        * 
+        * @param vars
+        *            the variables used in this template. They need to be updated
+        *            for each line.
+        * @return true, iff there was a data-line "installed". False of this set is
+        *         already empty.
+        */
+       public boolean next(Map<String, Object> vars);
+}