BrightSide Workbench Full Report + Source Code
org.turro.user.activity.ActivityReport Class Reference

Public Member Functions

 ActivityReport (ActivitySet activities)
 
Map< String, Double[]> getByCategory ()
 
Map< String, Double > getProjectsByCategory ()
 
Map< String, Double > getChallengesByCategory ()
 
Map< String, Double > getSeenByCategory ()
 

Detailed Description

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

Definition at line 33 of file ActivityReport.java.

Constructor & Destructor Documentation

◆ ActivityReport()

org.turro.user.activity.ActivityReport.ActivityReport ( ActivitySet  activities)

Definition at line 37 of file ActivityReport.java.

37  {
38  this.activities = activities;
39  }

Member Function Documentation

◆ getByCategory()

Map<String, Double[]> org.turro.user.activity.ActivityReport.getByCategory ( )

Definition at line 41 of file ActivityReport.java.

41  {
42  return new AggregateMixMap(getProjectsByCategory(), getChallengesByCategory(), getSeenByCategory());
43  }
Map< String, Double > getSeenByCategory()
Map< String, Double > getChallengesByCategory()
Map< String, Double > getProjectsByCategory()
Here is the call graph for this function:

◆ getChallengesByCategory()

Map<String, Double> org.turro.user.activity.ActivityReport.getChallengesByCategory ( )

Definition at line 58 of file ActivityReport.java.

58  {
59  AggregateMap map = new AggregateMap();
60  for(Activity activity : activities) {
61  if(EnumSet.of(ActivityType.ACTIVITY_CHANGE).contains(activity.getType())) {
62  if(activity.getEntityPath().startsWith("/challenge/")) {
63  IElephantEntity parent = activity.getEntity().getParent().getParent();
64  if(parent != null && !parent.isEmpty()) map.inc(parent.getName());
65  }
66  }
67  }
68  return map;
69  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProjectsByCategory()

Map<String, Double> org.turro.user.activity.ActivityReport.getProjectsByCategory ( )

Definition at line 45 of file ActivityReport.java.

45  {
46  AggregateMap map = new AggregateMap();
47  for(Activity activity : activities) {
48  if(EnumSet.of(ActivityType.ACTIVITY_PARTICIPATE, ActivityType.ACTIVITY_FOLLOW).contains(activity.getType())) {
49  if(activity.getEntityPath().startsWith("/dossier/")) {
50  IElephantEntity parent = activity.getEntity().getParent();
51  if(parent != null && !parent.isEmpty()) map.inc(parent.getName());
52  }
53  }
54  }
55  return map;
56  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSeenByCategory()

Map<String, Double> org.turro.user.activity.ActivityReport.getSeenByCategory ( )

Definition at line 71 of file ActivityReport.java.

71  {
72  AggregateMap map = new AggregateMap();
73  for(Activity activity : activities) {
74  if(EnumSet.of(ActivityType.ACTIVITY_SEEN).contains(activity.getType())) {
75  if(activity.getEntityPath().startsWith("/dossier/")) {
76  IElephantEntity parent = activity.getEntity().getParent();
77  if(parent != null && !parent.isEmpty()) map.inc(parent.getName());
78  } else {
79  map.inc(Chars.backward() + " " + I_.get("Others"));
80  }
81  }
82  }
83  return map;
84  }
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: