commit | author | age
|
b7475d
|
1 |
/* |
8931b7
|
2 |
|
U |
3 |
Dateiverwaltung - File management in your browser |
|
4 |
Copyright (C) 2017 Ulrich Hilger, http://uhilger.de |
|
5 |
|
|
6 |
This program is free software: you can redistribute it and/or modify |
|
7 |
it under the terms of the GNU Affero General Public License as |
|
8 |
published by the Free Software Foundation, either version 3 of the |
|
9 |
License, or (at your option) any later version. |
|
10 |
|
|
11 |
This program is distributed in the hope that it will be useful, |
|
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
GNU Affero General Public License for more details. |
|
15 |
|
|
16 |
You should have received a copy of the GNU Affero General Public License |
|
17 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
18 |
|
|
19 |
*/ |
b7475d
|
20 |
|
U |
21 |
package de.uhilger.filecms.api; |
|
22 |
|
|
23 |
import de.uhilger.transit.web.RequestKontext; |
|
24 |
import de.uhilger.transit.web.WebKontext; |
|
25 |
import javax.servlet.ServletContext; |
|
26 |
import javax.servlet.http.HttpServletRequest; |
|
27 |
|
|
28 |
/** |
|
29 |
* |
|
30 |
*/ |
|
31 |
public abstract class Api implements WebKontext, RequestKontext { |
|
32 |
|
|
33 |
/** Zeiger zum Servlet-Kontext dieser Anwendung */ |
|
34 |
private ServletContext ctx; |
|
35 |
|
8931b7
|
36 |
/** Zeiger zum Request, der zur Ausfuehrung fuehrte */ |
b7475d
|
37 |
private HttpServletRequest request; |
U |
38 |
|
|
39 |
|
|
40 |
/* ------------- Implementierung WebKontext ------------- */ |
|
41 |
|
|
42 |
@Override |
|
43 |
public ServletContext getServletContext() { |
|
44 |
return ctx; |
|
45 |
} |
|
46 |
|
|
47 |
@Override |
|
48 |
public void setServletContext(ServletContext servletContext) { |
|
49 |
this.ctx = servletContext; |
|
50 |
} |
|
51 |
|
|
52 |
/* ------------- Implementierung RequestKontext ------------- */ |
|
53 |
|
|
54 |
@Override |
|
55 |
public HttpServletRequest getRequest() { |
|
56 |
return request; |
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
public void setRequest(HttpServletRequest r) { |
|
61 |
this.request = r; |
|
62 |
} |
|
63 |
|
|
64 |
} |