BrightSide Workbench Full Report + Source Code
org.turro.contacts.proposal.ContactProposal Class Reference
Inheritance diagram for org.turro.contacts.proposal.ContactProposal:
Collaboration diagram for org.turro.contacts.proposal.ContactProposal:

Public Member Functions

 ContactProposal (Contact proposal)
 
 ContactProposal (Contact proposal, String reason)
 
 ContactProposal (Contact proposal, boolean exists)
 
void reload ()
 
Contact getDestination ()
 
void setDestination (Contact destination)
 
String getReason ()
 
void setReason (String reason)
 
boolean isNoAction ()
 
void setNoAction (boolean noAction)
 
String getDescription ()
 
List< GenericAttributegetAttributes ()
 
Contact getProposal ()
 
boolean isSureNew ()
 
boolean isProbablyNew ()
 
boolean isDuplicated ()
 
void clearInactiveAttributes ()
 
int compareTo (ContactProposal o)
 

Detailed Description

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

Definition at line 35 of file ContactProposal.java.

Constructor & Destructor Documentation

◆ ContactProposal() [1/3]

org.turro.contacts.proposal.ContactProposal.ContactProposal ( Contact  proposal)

Definition at line 42 of file ContactProposal.java.

42  {
43  this(proposal, null);
44  }

◆ ContactProposal() [2/3]

org.turro.contacts.proposal.ContactProposal.ContactProposal ( Contact  proposal,
String  reason 
)

Definition at line 46 of file ContactProposal.java.

46  {
47  this.proposal = proposal;
48  this.reason = reason;
49  this.exists = false;
50  addAttributes();
51  }

◆ ContactProposal() [3/3]

org.turro.contacts.proposal.ContactProposal.ContactProposal ( Contact  proposal,
boolean  exists 
)

Definition at line 53 of file ContactProposal.java.

53  {
54  this.proposal = proposal;
55  this.reason = null;
56  this.exists = exists;
57  addAttributes();
58  }

Member Function Documentation

◆ clearInactiveAttributes()

void org.turro.contacts.proposal.ContactProposal.clearInactiveAttributes ( )

Definition at line 171 of file ContactProposal.java.

171  {
172  Iterator<GenericAttribute> it = attributes.iterator();
173  while(it.hasNext()) {
174  if(!it.next().isActive()) {
175  it.remove();
176  }
177  }
178  }

◆ compareTo()

int org.turro.contacts.proposal.ContactProposal.compareTo ( ContactProposal  o)

Definition at line 194 of file ContactProposal.java.

194  {
195  int result = CompareUtil.compare(proposal.getName(), o.proposal.getName());
196  if(result == 0) {
197  result = CompareUtil.compare(proposal.getGlobalIdentifier(), o.proposal.getGlobalIdentifier());
198  }
199  if(result == 0) {
200  CompareUtil.compare(this.toString(), o.toString());
201  }
202  return result;
203  }
Here is the call graph for this function:

◆ getAttributes()

List<GenericAttribute> org.turro.contacts.proposal.ContactProposal.getAttributes ( )

Definition at line 97 of file ContactProposal.java.

97  {
98  return attributes;
99  }

◆ getDescription()

String org.turro.contacts.proposal.ContactProposal.getDescription ( )

Definition at line 93 of file ContactProposal.java.

93  {
94  return proposal.getName();
95  }
Here is the call graph for this function:

◆ getDestination()

Contact org.turro.contacts.proposal.ContactProposal.getDestination ( )

Definition at line 64 of file ContactProposal.java.

64  {
65  return destination;
66  }
Here is the caller graph for this function:

◆ getProposal()

Contact org.turro.contacts.proposal.ContactProposal.getProposal ( )

Definition at line 101 of file ContactProposal.java.

101  {
102  return proposal;
103  }

◆ getReason()

String org.turro.contacts.proposal.ContactProposal.getReason ( )

Definition at line 77 of file ContactProposal.java.

77  {
78  return reason;
79  }

◆ isDuplicated()

boolean org.turro.contacts.proposal.ContactProposal.isDuplicated ( )

Definition at line 123 of file ContactProposal.java.

123  {
124  for(GenericAttribute ga : attributes) {
125  if(!ga.getRelated().isEmpty() && ga.duplication.equals(DuplicationType.NOT_ALLOWED)) {
126  return true;
127  }
128  }
129  return false;
130  }

◆ isNoAction()

boolean org.turro.contacts.proposal.ContactProposal.isNoAction ( )

Definition at line 85 of file ContactProposal.java.

85  {
86  return noAction;
87  }
Here is the caller graph for this function:

◆ isProbablyNew()

boolean org.turro.contacts.proposal.ContactProposal.isProbablyNew ( )

Definition at line 114 of file ContactProposal.java.

114  {
115  for(GenericAttribute ga : attributes) {
116  if(!ga.getRelated().isEmpty() && !ga.duplication.equals(DuplicationType.ALLOW_DUPLICATES)) {
117  return false;
118  }
119  }
120  return true;
121  }

◆ isSureNew()

boolean org.turro.contacts.proposal.ContactProposal.isSureNew ( )

Definition at line 105 of file ContactProposal.java.

105  {
106  for(GenericAttribute ga : attributes) {
107  if(!ga.getRelated().isEmpty()) {
108  return false;
109  }
110  }
111  return true;
112  }
Here is the caller graph for this function:

◆ reload()

void org.turro.contacts.proposal.ContactProposal.reload ( )

Definition at line 60 of file ContactProposal.java.

60  {
61  addAttributes();
62  }
Here is the caller graph for this function:

◆ setDestination()

void org.turro.contacts.proposal.ContactProposal.setDestination ( Contact  destination)

Definition at line 68 of file ContactProposal.java.

68  {
69  if(destination == null && this.destination != null) {
70  for(GenericAttribute ga : attributes) {
71  ga.setActive(true);
72  }
73  }
74  this.destination = destination;
75  }
Here is the caller graph for this function:

◆ setNoAction()

void org.turro.contacts.proposal.ContactProposal.setNoAction ( boolean  noAction)

Definition at line 89 of file ContactProposal.java.

89  {
90  this.noAction = noAction;
91  }

◆ setReason()

void org.turro.contacts.proposal.ContactProposal.setReason ( String  reason)

Definition at line 81 of file ContactProposal.java.

81  {
82  this.reason = reason;
83  }

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