BrightSide Workbench Full Report + Source Code
org.turro.tags.TagCloud Class Reference

Static Public Member Functions

static TagSet getTags (IConstructor constructor, String root)
 
static void toggleTags (IConstructor constructor, String root)
 
static void resetContext (IConstructor constructor, String root)
 
static List< String > getIdentifiers (IConstructor constructor, String root)
 
static List< Long > getIdentifiersAsLong (IConstructor constructor, String root)
 
static boolean hasSelected (IConstructor constructor, String root)
 

Detailed Description

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

Definition at line 32 of file TagCloud.java.

Member Function Documentation

◆ getIdentifiers()

static List<String> org.turro.tags.TagCloud.getIdentifiers ( IConstructor  constructor,
String  root 
)
static

Definition at line 60 of file TagCloud.java.

60  {
61  TagSet set = (TagSet) constructor.getSessionAttribute(TAGS_CONTEXT + "-" + root);
62  if(set != null) {
63  return set.getIdentifiers(root);
64  }
65  return Collections.EMPTY_LIST;
66  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIdentifiersAsLong()

static List<Long> org.turro.tags.TagCloud.getIdentifiersAsLong ( IConstructor  constructor,
String  root 
)
static

Definition at line 68 of file TagCloud.java.

68  {
69  return getIdentifiers(constructor, root).stream().map(s -> Long.valueOf(s)).collect(Collectors.toList());
70  }
static List< String > getIdentifiers(IConstructor constructor, String root)
Definition: TagCloud.java:60
Here is the call graph for this function:

◆ getTags()

static TagSet org.turro.tags.TagCloud.getTags ( IConstructor  constructor,
String  root 
)
static

Definition at line 36 of file TagCloud.java.

36  {
37  TagSet tags = (TagSet) constructor.getSessionAttribute(TAGS_CONTEXT + "-" + root);
38  if(tags == null) {
39  tags = Tags.getAvailables(root);
40  constructor.setSessionAttribute(TAGS_CONTEXT + "-" + root, tags);
41  }
42  return tags;
43  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasSelected()

static boolean org.turro.tags.TagCloud.hasSelected ( IConstructor  constructor,
String  root 
)
static

Definition at line 72 of file TagCloud.java.

72  {
73  TagSet set = (TagSet) constructor.getSessionAttribute(TAGS_CONTEXT + "-" + root);
74  if(set != null) {
75  return !(set.getSelected().isEmpty());
76  }
77  return false;
78  }
Here is the call graph for this function:

◆ resetContext()

static void org.turro.tags.TagCloud.resetContext ( IConstructor  constructor,
String  root 
)
static

Definition at line 56 of file TagCloud.java.

56  {
57  constructor.removeSessionAttribute(TAGS_CONTEXT + "-" + root);
58  }
Here is the call graph for this function:

◆ toggleTags()

static void org.turro.tags.TagCloud.toggleTags ( IConstructor  constructor,
String  root 
)
static

Definition at line 45 of file TagCloud.java.

45  {
46  KeyValueMap kvm = MarkerHelper.getObfuscatedParameters();
47  if(kvm != null && kvm.containsKey("tag")) {
48  TagSet set = (TagSet) constructor.getSessionAttribute(TAGS_CONTEXT + "-" + root);
49  if(set != null) {
50  set.toggle(kvm.get("tag"));
51  set.markSiblingsFromSelection(root);
52  }
53  }
54  }
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: