BrightSide Workbench Full Report + Source Code
org.turro.elephant.web.tags.SessionTags Class Reference
Inheritance diagram for org.turro.elephant.web.tags.SessionTags:
Collaboration diagram for org.turro.elephant.web.tags.SessionTags:

Public Member Functions

List< String > tags ()
 
String path ()
 
String first ()
 
String current ()
 
String previous ()
 
void removeLast ()
 
void add (WebContext context)
 
void add (String tag)
 

Static Public Member Functions

static String key ()
 
static SessionTags get ()
 
static SessionTags get (HttpServletRequest request, HttpServletResponse response)
 
static SessionTags get (IConstructor constructor)
 
static void remove ()
 
static void remove (HttpServletRequest request, HttpServletResponse response)
 
static void remove (IConstructor constructor)
 
- Static Public Member Functions inherited from org.turro.elephant.context.AbstractSessionObject< E >
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 35 of file SessionTags.java.

Member Function Documentation

◆ add() [1/2]

void org.turro.elephant.web.tags.SessionTags.add ( String  tag)

Definition at line 69 of file SessionTags.java.

69  {
70  if(!Strings.isBlank(tag)) {
71  tags.add(tag);
72  }
73  }

◆ add() [2/2]

void org.turro.elephant.web.tags.SessionTags.add ( WebContext  context)

Definition at line 63 of file SessionTags.java.

63  {
64  if(context != null) {
65  add(context.getWebTag());
66  }
67  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ current()

String org.turro.elephant.web.tags.SessionTags.current ( )

Definition at line 49 of file SessionTags.java.

49  {
50  return !tags.isEmpty() ? tags.get(tags.size() - 1) : null;
51  }
Here is the caller graph for this function:

◆ first()

String org.turro.elephant.web.tags.SessionTags.first ( )

Definition at line 45 of file SessionTags.java.

45  {
46  return !tags.isEmpty() ? tags.get(0) : null;
47  }

◆ get() [1/3]

static SessionTags org.turro.elephant.web.tags.SessionTags.get ( )
static

Definition at line 81 of file SessionTags.java.

81  {
82  return AbstractSessionObject.get(key(), () -> new SessionTags());
83  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [2/3]

static SessionTags org.turro.elephant.web.tags.SessionTags.get ( HttpServletRequest  request,
HttpServletResponse  response 
)
static

Definition at line 85 of file SessionTags.java.

85  {
86  return AbstractSessionObject.get(request, response, key(), () -> new SessionTags());
87  }
Here is the call graph for this function:

◆ get() [3/3]

static SessionTags org.turro.elephant.web.tags.SessionTags.get ( IConstructor  constructor)
static

Definition at line 89 of file SessionTags.java.

89  {
90  return AbstractSessionObject.get(constructor, key(), () -> new SessionTags());
91  }
Here is the call graph for this function:

◆ key()

static String org.turro.elephant.web.tags.SessionTags.key ( )
static

Definition at line 77 of file SessionTags.java.

77  {
78  return "web-tags";
79  }
Here is the caller graph for this function:

◆ path()

String org.turro.elephant.web.tags.SessionTags.path ( )

Definition at line 41 of file SessionTags.java.

41  {
42  return tags.stream().collect(Collectors.joining("/"));
43  }
Here is the caller graph for this function:

◆ previous()

String org.turro.elephant.web.tags.SessionTags.previous ( )

Definition at line 53 of file SessionTags.java.

53  {
54  return tags.size() > 1 ? tags.get(tags.size() - 2) : null;
55  }
Here is the caller graph for this function:

◆ remove() [1/3]

static void org.turro.elephant.web.tags.SessionTags.remove ( )
static

Definition at line 93 of file SessionTags.java.

93  {
94  AbstractSessionObject.remove(key());
95  }
Here is the call graph for this function:

◆ remove() [2/3]

static void org.turro.elephant.web.tags.SessionTags.remove ( HttpServletRequest  request,
HttpServletResponse  response 
)
static

Definition at line 97 of file SessionTags.java.

97  {
98  AbstractSessionObject.remove(request, response, key());
99  }
Here is the call graph for this function:

◆ remove() [3/3]

static void org.turro.elephant.web.tags.SessionTags.remove ( IConstructor  constructor)
static

Definition at line 101 of file SessionTags.java.

101  {
102  AbstractSessionObject.remove(constructor, key());
103  }
Here is the call graph for this function:

◆ removeLast()

void org.turro.elephant.web.tags.SessionTags.removeLast ( )

Definition at line 57 of file SessionTags.java.

57  {
58  if(!tags.isEmpty()) {
59  tags.remove(tags.size() -1);
60  }
61  }
Here is the caller graph for this function:

◆ tags()

List<String> org.turro.elephant.web.tags.SessionTags.tags ( )

Definition at line 37 of file SessionTags.java.

37  {
38  return tags;
39  }

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