BrightSide Workbench Full Report + Source Code
org.turro.elephant.context.AbstractSessionContext Class Referenceabstract
Inheritance diagram for org.turro.elephant.context.AbstractSessionContext:
Collaboration diagram for org.turro.elephant.context.AbstractSessionContext:

Public Member Functions

Attributes getAttributes ()
 
IConstructor getConstructor ()
 

Protected Member Functions

void setConstructor (IConstructor constructor)
 
 AbstractSessionContext ()
 

Static Protected Member Functions

static< T extends AbstractSessionContext > T getInstance (IConstructor constructor, String type, Supplier< T > onCreate)
 

Detailed Description

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

Definition at line 29 of file AbstractSessionContext.java.

Constructor & Destructor Documentation

◆ AbstractSessionContext()

org.turro.elephant.context.AbstractSessionContext.AbstractSessionContext ( )
protected

Definition at line 64 of file AbstractSessionContext.java.

64  {
65  this.attributes = new Attributes();
66  }

Member Function Documentation

◆ getAttributes()

Attributes org.turro.elephant.context.AbstractSessionContext.getAttributes ( )

Definition at line 33 of file AbstractSessionContext.java.

33  {
34  return attributes;
35  }

◆ getConstructor()

IConstructor org.turro.elephant.context.AbstractSessionContext.getConstructor ( )

Definition at line 41 of file AbstractSessionContext.java.

41  {
42  return constructor;
43  }

◆ getInstance()

static <T extends AbstractSessionContext> T org.turro.elephant.context.AbstractSessionContext.getInstance ( IConstructor  constructor,
String  type,
Supplier< T >  onCreate 
)
staticprotected

Definition at line 51 of file AbstractSessionContext.java.

51  {
52  String context = ElephantContext.getContextVariable(constructor) + type;
53  T sessionContext = (T) constructor.getSessionAttribute(context);
54  if(sessionContext == null) {
55  sessionContext = onCreate.get();
56  constructor.setSessionAttribute(context, sessionContext);
57  }
58  sessionContext.setConstructor(constructor);
59  return sessionContext;
60  }
void setSessionAttribute(String key, Object value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setConstructor()

void org.turro.elephant.context.AbstractSessionContext.setConstructor ( IConstructor  constructor)
protected

Definition at line 45 of file AbstractSessionContext.java.

45  {
46  this.constructor = constructor;
47  }

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