]> WPIA git - gigi.git/blob - src/org/cacert/gigi/output/template/Scope.java
add: api for Test-memberid-lookup (addresses #4)
[gigi.git] / src / org / cacert / gigi / output / template / Scope.java
1 package org.cacert.gigi.output.template;
2
3 import java.io.PrintWriter;
4 import java.util.HashMap;
5 import java.util.Map;
6
7 import org.cacert.gigi.localisation.Language;
8
9 public class Scope implements Outputable {
10
11     private Map<String, Object> vars;
12
13     private Outputable out;
14
15     public Scope(Outputable out, Map<String, Object> vars) {
16         this.out = out;
17         this.vars = vars;
18     }
19
20     @Override
21     public void output(PrintWriter out, Language l, Map<String, Object> vars) {
22         HashMap<String, Object> map = new HashMap<>();
23         map.putAll(vars);
24         map.putAll(this.vars);
25         this.out.output(out, l, map);
26     }
27
28 }