BrightSide Workbench Full Report + Source Code
org.turro.user.activity.AbstractUserActivity Class Referenceabstract
Inheritance diagram for org.turro.user.activity.AbstractUserActivity:
Collaboration diagram for org.turro.user.activity.AbstractUserActivity:

Public Member Functions

void init ()
 
Set< ActivitygetActivity (IContact contact, Date from, ActivityType... type)
 
void end ()
 

Protected Member Functions

abstract Dao createDao ()
 
abstract Set< ActivityTypegetAllowed ()
 
abstract Set< ActivitygetActivity (IContact contact, Date from, Set< ActivityType > types)
 
Dao getDao ()
 

Detailed Description

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

Definition at line 33 of file AbstractUserActivity.java.

Member Function Documentation

◆ createDao()

abstract Dao org.turro.user.activity.AbstractUserActivity.createDao ( )
abstractprotected

◆ end()

void org.turro.user.activity.AbstractUserActivity.end ( )

Implements org.turro.user.activity.IUserActivity.

Definition at line 51 of file AbstractUserActivity.java.

51  {
52  dao = null;
53  }

◆ getActivity() [1/2]

Set<Activity> org.turro.user.activity.AbstractUserActivity.getActivity ( IContact  contact,
Date  from,
ActivityType...  type 
)

Implements org.turro.user.activity.IUserActivity.

Definition at line 41 of file AbstractUserActivity.java.

41  {
42  Set<ActivityType> types = EnumSet.copyOf(Arrays.asList(type));
43  if(types.stream().anyMatch(t -> getAllowed().contains(t))) {
44  return getActivity(contact, from, types);
45  } else {
46  return Collections.EMPTY_SET;
47  }
48  }
Set< Activity > getActivity(IContact contact, Date from, ActivityType... type)
abstract Set< ActivityType > getAllowed()
Here is the call graph for this function:

◆ getActivity() [2/2]

abstract Set<Activity> org.turro.user.activity.AbstractUserActivity.getActivity ( IContact  contact,
Date  from,
Set< ActivityType types 
)
abstractprotected

◆ getAllowed()

abstract Set<ActivityType> org.turro.user.activity.AbstractUserActivity.getAllowed ( )
abstractprotected

◆ getDao()

Dao org.turro.user.activity.AbstractUserActivity.getDao ( )
protected

Definition at line 63 of file AbstractUserActivity.java.

63  {
64  return dao;
65  }

◆ init()

void org.turro.user.activity.AbstractUserActivity.init ( )

Implements org.turro.user.activity.IUserActivity.

Definition at line 36 of file AbstractUserActivity.java.

36  {
37  dao = createDao();
38  }
Here is the call graph for this function:

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