BrightSide Workbench Full Report + Source Code
org.turro.marker.Cookies Class Reference

Public Member Functions

 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)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 33 of file Cookies.java.

Constructor & Destructor Documentation

◆ Cookies()

org.turro.marker.Cookies.Cookies ( HttpServletRequest  request,
HttpServletResponse  response 
)

Definition at line 38 of file Cookies.java.

38  {
39  this.request = request;
40  this.response = response;
41  }

Member Function Documentation

◆ decrypt()

String org.turro.marker.Cookies.decrypt ( String  name)

Definition at line 65 of file Cookies.java.

65  {
66  try {
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);
71  }
72  return null;
73  }
Cookies(HttpServletRequest request, HttpServletResponse response)
Definition: Cookies.java:38
Here is the call graph for this function:

◆ delete()

void org.turro.marker.Cookies.delete ( String  name,
String  path 
)

Definition at line 75 of file Cookies.java.

75  {
76  CookieUtil.deleteCookie(response, name, path);
77  }
Here is the call graph for this function:

◆ encrypt()

void org.turro.marker.Cookies.encrypt ( String  name,
String  value,
String  path,
int  age 
)

Definition at line 56 of file Cookies.java.

56  {
57  try {
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);
62  }
63  }
Here is the call graph for this function:

◆ get()

Cookie org.turro.marker.Cookies.get ( String  name)

Definition at line 43 of file Cookies.java.

43  {
44  return CookieUtil.getCookie(request, name);
45  }
Here is the call graph for this function:

◆ getValue()

String org.turro.marker.Cookies.getValue ( String  name)

Definition at line 47 of file Cookies.java.

47  {
48  Cookie c = get(name);
49  return c != null ? c.getValue() : null;
50  }

◆ set()

void org.turro.marker.Cookies.set ( String  name,
String  value,
String  path,
int  age 
)

Definition at line 52 of file Cookies.java.

52  {
53  CookieUtil.setCookie(response, name, value, path, age);
54  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: