BrightSide Workbench Full Report + Source Code
org.turro.elephant.context.AbstractSessionObject< E > Class Template Referenceabstract
Inheritance diagram for org.turro.elephant.context.AbstractSessionObject< E >:

Static Public Member Functions

static< E > E get (String key, Supplier< E > supplier)
 
static< E > E get (HttpServletRequest request, HttpServletResponse response, String key, Supplier< E > supplier)
 
static< E > E get (IConstructor constructor, String key, Supplier< E > supplier)
 
static void remove (String key)
 
static void remove (HttpServletRequest request, HttpServletResponse response, String key)
 
static void remove (IConstructor constructor, String key)
 

Detailed Description

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

Definition at line 29 of file AbstractSessionObject.java.

Member Function Documentation

◆ get() [1/3]

static <E> E org.turro.elephant.context.AbstractSessionObject< E >.get ( HttpServletRequest  request,
HttpServletResponse  response,
String  key,
Supplier< E >  supplier 
)
static

Definition at line 37 of file AbstractSessionObject.java.

37  {
38  return get(ElephantContext.getConstructor(request, response), key, supplier);
39  }
Here is the call graph for this function:

◆ get() [2/3]

static <E> E org.turro.elephant.context.AbstractSessionObject< E >.get ( IConstructor  constructor,
String  key,
Supplier< E >  supplier 
)
static

Definition at line 41 of file AbstractSessionObject.java.

41  {
42  if(constructor != null && !constructor.isHeadless()) {
43  E object = (E) constructor.getSessionAttribute(key);
44  if(object == null) {
45  object = supplier.get();
46  constructor.setSessionAttribute(key, object);
47  }
48  return object;
49  }
50  return supplier.get();
51  }
Here is the call graph for this function:

◆ get() [3/3]

static <E> E org.turro.elephant.context.AbstractSessionObject< E >.get ( String  key,
Supplier< E >  supplier 
)
static

Definition at line 33 of file AbstractSessionObject.java.

33  {
34  return get(Application.getApplication().getConstructor(), key, supplier);
35  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [1/3]

static void org.turro.elephant.context.AbstractSessionObject< E >.remove ( HttpServletRequest  request,
HttpServletResponse  response,
String  key 
)
static

Definition at line 57 of file AbstractSessionObject.java.

57  {
58  remove(ElephantContext.getConstructor(request, response), key);
59  }
Here is the call graph for this function:

◆ remove() [2/3]

static void org.turro.elephant.context.AbstractSessionObject< E >.remove ( IConstructor  constructor,
String  key 
)
static

Definition at line 61 of file AbstractSessionObject.java.

61  {
62  if(constructor != null && !constructor.isHeadless()) {
63  constructor.removeSessionAttribute(key);
64  }
65  }

◆ remove() [3/3]

static void org.turro.elephant.context.AbstractSessionObject< E >.remove ( String  key)
static

Definition at line 53 of file AbstractSessionObject.java.

53  {
54  remove(Application.getApplication().getConstructor(), key);
55  }
Here is the call graph for this function:
Here is the caller graph for this function:

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