|
| Cookies (HttpServletRequest request, HttpServletResponse response) |
|
Cookie | get (String name) |
|
String | getValue (String name) |
|
void | set (String name, String value, String path, int age) |
|
void | encrypt (String name, String value, String path, int age) |
|
String | decrypt (String name) |
|
void | delete (String name, String path) |
|
- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 33 of file Cookies.java.
◆ Cookies()
org.turro.marker.Cookies.Cookies |
( |
HttpServletRequest |
request, |
|
|
HttpServletResponse |
response |
|
) |
| |
Definition at line 38 of file Cookies.java.
39 this.request = request;
40 this.response = response;
◆ decrypt()
String org.turro.marker.Cookies.decrypt |
( |
String |
name | ) |
|
Definition at line 65 of file Cookies.java.
67 byte[] v = CookieUtil.decryptCookieValue(
get(name));
68 return new String(ElephantContext.decrypt(v));
69 }
catch (Exception ex) {
70 Logger.getLogger(
Cookies.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
Cookies(HttpServletRequest request, HttpServletResponse response)
◆ delete()
void org.turro.marker.Cookies.delete |
( |
String |
name, |
|
|
String |
path |
|
) |
| |
Definition at line 75 of file Cookies.java.
76 CookieUtil.deleteCookie(response, name, path);
◆ encrypt()
void org.turro.marker.Cookies.encrypt |
( |
String |
name, |
|
|
String |
value, |
|
|
String |
path, |
|
|
int |
age |
|
) |
| |
Definition at line 56 of file Cookies.java.
58 byte[] b = ElephantContext.encrypt(value.getBytes());
59 CookieUtil.encryptCookie(response, name, b, path, age);
60 }
catch (Exception ex) {
61 Logger.getLogger(
Cookies.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ get()
Cookie org.turro.marker.Cookies.get |
( |
String |
name | ) |
|
Definition at line 43 of file Cookies.java.
44 return CookieUtil.getCookie(request, name);
◆ getValue()
String org.turro.marker.Cookies.getValue |
( |
String |
name | ) |
|
Definition at line 47 of file Cookies.java.
49 return c !=
null ? c.getValue() :
null;
◆ set()
void org.turro.marker.Cookies.set |
( |
String |
name, |
|
|
String |
value, |
|
|
String |
path, |
|
|
int |
age |
|
) |
| |
Definition at line 52 of file Cookies.java.
53 CookieUtil.setCookie(response, name, value, path, age);
The documentation for this class was generated from the following file: