BrightSide Workbench Full Report + Source Code
org.turro.action.content.ContentContext Class Reference

Static Public Member Functions

static Object getContent (String context, Supplier onDefault)
 
static Object getContent (String context)
 
static void putContent (String context, Object data)
 
static void removeContent (String context)
 

Detailed Description

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

Definition at line 32 of file ContentContext.java.

Member Function Documentation

◆ getContent() [1/2]

static Object org.turro.action.content.ContentContext.getContent ( String  context)
static

Definition at line 47 of file ContentContext.java.

47  {
48  SingleContent sc = contexts.get(context);
49  return sc != null ? sc.getObject() : null;
50  }
Here is the call graph for this function:

◆ getContent() [2/2]

static Object org.turro.action.content.ContentContext.getContent ( String  context,
Supplier  onDefault 
)
static

Definition at line 36 of file ContentContext.java.

36  {
37  Object obj = getContent(context);
38  if(obj == null) {
39  obj = onDefault.get();
40  if(obj != null) {
41  putContent(context, obj);
42  }
43  }
44  return obj;
45  }
static Object getContent(String context, Supplier onDefault)
static void putContent(String context, Object data)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ putContent()

static void org.turro.action.content.ContentContext.putContent ( String  context,
Object  data 
)
static

Definition at line 52 of file ContentContext.java.

52  {
53  SingleContent sc = new SingleContent(new Date(), data);
54  contexts.put(context, sc);
55  }
Here is the caller graph for this function:

◆ removeContent()

static void org.turro.action.content.ContentContext.removeContent ( String  context)
static

Definition at line 57 of file ContentContext.java.

57  {
58  contexts.remove(context);
59  purge();
60  }
Here is the caller graph for this function:

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