BrightSide Workbench Full Report + Source Code
org.turro.plugin.contacts.ContactRelations Class Reference

Static Public Member Functions

static List< IContactRelationgetBusiness (IContact contact, int mode)
 
static List< IContactRelationgetBusiness (String idContact, int mode)
 
static List< IContactRelationgetWorkers (IContact contact, int mode)
 
static List< IContactRelationgetWorkers (String idContact, int mode)
 
static List< IContactRelationgetRelations (IContact contact, int mode)
 
static List< IContactRelationgetRelations (String idContact, int mode)
 
static boolean checkBusiness (String businessId, String workerId)
 

Static Public Attributes

static final int MODE_ALL = 0
 

Detailed Description

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

Definition at line 30 of file ContactRelations.java.

Member Function Documentation

◆ checkBusiness()

static boolean org.turro.plugin.contacts.ContactRelations.checkBusiness ( String  businessId,
String  workerId 
)
static

Definition at line 70 of file ContactRelations.java.

70  {
71  return CompareUtil.compare(businessId, workerId) != 0 &&
72  getWorkers(businessId, MODE_ALL).stream().noneMatch(b -> b.getRelatedId().equals(workerId));
73  }
static List< IContactRelation > getWorkers(IContact contact, int mode)
Here is the call graph for this function:

◆ getBusiness() [1/2]

static List<IContactRelation> org.turro.plugin.contacts.ContactRelations.getBusiness ( IContact  contact,
int  mode 
)
static

Definition at line 34 of file ContactRelations.java.

34  {
35  return getBusiness(contact.getId(), mode);
36  }
static List< IContactRelation > getBusiness(IContact contact, int mode)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBusiness() [2/2]

static List<IContactRelation> org.turro.plugin.contacts.ContactRelations.getBusiness ( String  idContact,
int  mode 
)
static

Definition at line 38 of file ContactRelations.java.

38  {
39  List<IContactRelation> list = new ArrayList<>();
40  for(IContactRelationSolver process : Instances.cached().byAnnotation(ElephantRelationSolver.class, IContactRelationSolver.class)) {
41  if(checkMode(mode, process)) list.addAll(process.getBusiness(idContact));
42  }
43  return list;
44  }

◆ getRelations() [1/2]

static List<IContactRelation> org.turro.plugin.contacts.ContactRelations.getRelations ( IContact  contact,
int  mode 
)
static

Definition at line 58 of file ContactRelations.java.

58  {
59  return getRelations(contact.getId(), mode);
60  }
static List< IContactRelation > getRelations(IContact contact, int mode)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRelations() [2/2]

static List<IContactRelation> org.turro.plugin.contacts.ContactRelations.getRelations ( String  idContact,
int  mode 
)
static

Definition at line 62 of file ContactRelations.java.

62  {
63  List<IContactRelation> list = new ArrayList<>();
64  for(IContactRelationSolver process : Instances.cached().byAnnotation(ElephantRelationSolver.class, IContactRelationSolver.class)) {
65  if(checkMode(mode, process)) list.addAll(process.getRelations(idContact));
66  }
67  return list;
68  }

◆ getWorkers() [1/2]

static List<IContactRelation> org.turro.plugin.contacts.ContactRelations.getWorkers ( IContact  contact,
int  mode 
)
static

Definition at line 46 of file ContactRelations.java.

46  {
47  return getWorkers(contact.getId(), mode);
48  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWorkers() [2/2]

static List<IContactRelation> org.turro.plugin.contacts.ContactRelations.getWorkers ( String  idContact,
int  mode 
)
static

Definition at line 50 of file ContactRelations.java.

50  {
51  List<IContactRelation> list = new ArrayList<>();
52  for(IContactRelationSolver process : Instances.cached().byAnnotation(ElephantRelationSolver.class, IContactRelationSolver.class)) {
53  if(checkMode(mode, process)) list.addAll(process.getWorkers(idContact));
54  }
55  return list;
56  }

Member Data Documentation

◆ MODE_ALL

final int org.turro.plugin.contacts.ContactRelations.MODE_ALL = 0
static

Definition at line 32 of file ContactRelations.java.


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