BrightSide Workbench Full Report + Source Code
org.turro.contacts.profile.ProfileRelation Class Reference

Public Member Functions

 ProfileRelation (BusinessRelation relation, ProfilePolicies policies, PublishPolicy policy)
 
Profile getBusiness ()
 
Profile getContact ()
 
boolean getHasPosition ()
 
String getPosition ()
 
boolean getHasDates ()
 
String getDates ()
 
BusinessRelation getRelation ()
 
boolean isValidated ()
 
boolean isInRange ()
 
boolean isInRange (Date date)
 

Detailed Description

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

Definition at line 30 of file ProfileRelation.java.

Constructor & Destructor Documentation

◆ ProfileRelation()

org.turro.contacts.profile.ProfileRelation.ProfileRelation ( BusinessRelation  relation,
ProfilePolicies  policies,
PublishPolicy  policy 
)

Definition at line 36 of file ProfileRelation.java.

36  {
37  this.relation = relation;
38  this.policies = policies;
39  this.policy = policy;
40  }

Member Function Documentation

◆ getBusiness()

Profile org.turro.contacts.profile.ProfileRelation.getBusiness ( )

Definition at line 42 of file ProfileRelation.java.

42  {
43  return new Profile(relation.getBusiness());
44  }
Here is the call graph for this function:

◆ getContact()

Profile org.turro.contacts.profile.ProfileRelation.getContact ( )

Definition at line 46 of file ProfileRelation.java.

46  {
47  return new Profile(relation.getContact());
48  }
Here is the call graph for this function:

◆ getDates()

String org.turro.contacts.profile.ProfileRelation.getDates ( )

Definition at line 62 of file ProfileRelation.java.

62  {
63  return relation.getDatesString();
64  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHasDates()

boolean org.turro.contacts.profile.ProfileRelation.getHasDates ( )

Definition at line 58 of file ProfileRelation.java.

58  {
59  return !Strings.isBlank(getDates()) && policies.getPolicy(relation, "dates").allows(policy);
60  }
PublishPolicy getPolicy(Object obj, String element)
boolean allows(PublishPolicy policy)
Here is the call graph for this function:

◆ getHasPosition()

boolean org.turro.contacts.profile.ProfileRelation.getHasPosition ( )

Definition at line 50 of file ProfileRelation.java.

50  {
51  return !Strings.isBlank(getPosition()) && policies.getPolicy(relation, "position").allows(policy);
52  }
Here is the call graph for this function:

◆ getPosition()

String org.turro.contacts.profile.ProfileRelation.getPosition ( )

Definition at line 54 of file ProfileRelation.java.

54  {
55  return relation.getDescription();
56  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRelation()

BusinessRelation org.turro.contacts.profile.ProfileRelation.getRelation ( )

Definition at line 66 of file ProfileRelation.java.

66  {
67  return relation;
68  }
Here is the caller graph for this function:

◆ isInRange() [1/2]

boolean org.turro.contacts.profile.ProfileRelation.isInRange ( )

Definition at line 74 of file ProfileRelation.java.

74  {
75  return isInRange(new Date());
76  }

◆ isInRange() [2/2]

boolean org.turro.contacts.profile.ProfileRelation.isInRange ( Date  date)

Definition at line 78 of file ProfileRelation.java.

78  {
79  return Dates.inRange(relation.getStartDate(), relation.getEndDate(), date);
80  }
Here is the call graph for this function:

◆ isValidated()

boolean org.turro.contacts.profile.ProfileRelation.isValidated ( )

Definition at line 70 of file ProfileRelation.java.

70  {
71  return relation.isValidated();
72  }
Here is the call graph for this function:

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