]> WPIA git - gigi.git/blob - src/club/wpia/gigi/pages/AboutPage.java
upd: rename package name and all references to it
[gigi.git] / src / club / wpia / gigi / pages / AboutPage.java
1 package club.wpia.gigi.pages;
2
3 import java.io.IOException;
4 import java.io.PrintWriter;
5 import java.util.HashMap;
6
7 import javax.servlet.http.HttpServletRequest;
8 import javax.servlet.http.HttpServletResponse;
9
10 import club.wpia.gigi.util.AuthorizationContext;
11
12 public class AboutPage extends Page {
13
14     public AboutPage() {
15         super("About");
16     }
17
18     @Override
19     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
20         PrintWriter out = resp.getWriter();
21         HashMap<String, Object> o = new HashMap<>();
22         String version = Package.getPackage("club.wpia.gigi").getImplementationVersion();
23         if (version == null) {
24             version = "development";
25         }
26         o.put("version", version);
27         getDefaultTemplate().output(out, getLanguage(req), o);
28     }
29
30     @Override
31     public boolean isPermitted(AuthorizationContext ac) {
32         return true;
33     }
34 }