]> WPIA git - gigi.git/blob - src/org/cacert/gigi/pages/Page.java
Add register page with dummy language "de"
[gigi.git] / src / org / cacert / gigi / pages / Page.java
1 package org.cacert.gigi.pages;
2
3 import java.io.IOException;
4
5 import javax.servlet.ServletRequest;
6 import javax.servlet.ServletResponse;
7
8 import org.cacert.gigi.Language;
9
10 public abstract class Page {
11         private String title;
12
13         public Page(String title) {
14                 this.title = title;
15         }
16
17         public abstract void doGet(ServletRequest req, ServletResponse resp)
18                         throws IOException;
19
20         public void doPost(ServletRequest req, ServletResponse resp)
21                         throws IOException {
22                 doGet(req, resp);
23         }
24
25         public String getTitle() {
26                 return title;
27         }
28
29         public void setTitle(String title) {
30                 this.title = title;
31         }
32         public static String translate(ServletRequest req, String string) {
33                 Language l = Language.getInstance("de");
34                 return l.getTranslation(string);
35         }
36
37 }