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

Public Member Functions

Activity add (Date activityDate, String activityPath, String entityPath, String sortPath)
 
Date lastDate ()
 
 Activities (String reason)
 

Static Public Member Functions

static void generate ()
 
static void resetEntityPaths ()
 
static void addParticipants ()
 
static Set< String > getParticipants (String entityPath)
 
static Activities of (String reason)
 

Detailed Description

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

Definition at line 43 of file Activities.java.

Constructor & Destructor Documentation

◆ Activities()

org.turro.activity.Activities.Activities ( String  reason)

Definition at line 124 of file Activities.java.

124  {
125  this.reason = reason;
126  }
Here is the caller graph for this function:

Member Function Documentation

◆ add()

Activity org.turro.activity.Activities.add ( Date  activityDate,
String  activityPath,
String  entityPath,
String  sortPath 
)

Definition at line 45 of file Activities.java.

45  {
46  if(Strings.anyBlank(entityPath, activityPath, sortPath)) return null;
47  Activity activity = new Activity();
48  activity.setReason(reason);
49  activity.setActivityDate(activityDate);
50  activity.setActivityPath(activityPath);
51  activity.setEntityPath(entityPath);
52  activity.setSortPath(sortPath);
53  entityPaths.add(entityPath);
54  return dao.get().saveObject(activity);
55  }
Here is the call graph for this function:

◆ addParticipants()

static void org.turro.activity.Activities.addParticipants ( )
static

Definition at line 82 of file Activities.java.

82  {
83  Dao dao = new ElephantPU();
84  for(String entityPath : entityPaths) {
85  updateEntityPath(dao, entityPath);
86  }
87  entityPaths.clear();
88  }
Here is the caller graph for this function:

◆ generate()

static void org.turro.activity.Activities.generate ( )
static

Definition at line 66 of file Activities.java.

66  {
68  for(IElephantActivity activity : Instances.cached().byAnnotation(ElephantActivity.class, IElephantActivity.class)) {
69  activity.generate();
70  }
72  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParticipants()

static Set<String> org.turro.activity.Activities.getParticipants ( String  entityPath)
static

Definition at line 105 of file Activities.java.

105  {
106  AssistantSet participants = new AssistantSet();
107  Assistants.addAssistants(entityPath, true, participants, AssistantConstants.all());
108  return participants.stream().map(a -> a.contact.getId()).collect(Collectors.toSet());
109  }
Here is the call graph for this function:

◆ lastDate()

Date org.turro.activity.Activities.lastDate ( )

Definition at line 57 of file Activities.java.

57  {
58  return SqlClause.select("max(a.activityDate)").from("Activity a")
59  .where().equal("reason", reason)
60  .dao(dao.get())
61  .singleResult(Date.class, defaultDate);
62  }
Here is the caller graph for this function:

◆ of()

static Activities org.turro.activity.Activities.of ( String  reason)
static

Definition at line 117 of file Activities.java.

117  {
118  return new Activities(reason);
119  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetEntityPaths()

static void org.turro.activity.Activities.resetEntityPaths ( )
static

Definition at line 78 of file Activities.java.

78  {
79  entityPaths.clear();
80  }
Here is the caller graph for this function:

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