]> WPIA git - gigi.git/blob - src/org/cacert/gigi/pages/wot/MyPoints.java
ADD: Assurancedisplay
[gigi.git] / src / org / cacert / gigi / pages / wot / MyPoints.java
1 package org.cacert.gigi.pages.wot;
2
3 import java.io.IOException;
4 import java.sql.SQLException;
5 import java.util.HashMap;
6
7 import javax.servlet.http.HttpServletRequest;
8 import javax.servlet.http.HttpServletResponse;
9
10 import org.cacert.gigi.GigiApiException;
11 import org.cacert.gigi.output.AssurancesDisplay;
12 import org.cacert.gigi.pages.Page;
13
14 public class MyPoints extends Page {
15
16     public static final String PATH = "/wot/mypoints";
17
18     private AssurancesDisplay display = new AssurancesDisplay("asArr");
19
20     public MyPoints(String title) {
21         super(title);
22     }
23
24     @Override
25     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
26         HashMap<String, Object> vars = new HashMap<String, Object>();
27         vars.put("pointlist", display);
28         try {
29             vars.put("asArr", getUser(req).getReceivedAssurances());
30         } catch (SQLException e) {
31             new GigiApiException(e).format(resp.getWriter(), getLanguage(req));
32             return;
33         }
34         getDefaultTemplate().output(resp.getWriter(), getLanguage(req), vars);
35     }
36
37 }