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

Public Member Functions

String getId ()
 
String getTitle ()
 
void setTitle (String title)
 
ContactServiceRole getRole ()
 
void setRole (ContactServiceRole role)
 
String getType ()
 
void setType (String type)
 
String getThematic ()
 
void setThematic (String thematic)
 
Date getCreation ()
 
void setCreation (Date creation)
 
Date getStartDate ()
 
void setStartDate (Date startDate)
 
Date getEndDate ()
 
void setEndDate (Date endDate)
 
double getPrice ()
 
void setPrice (double price)
 
double getTax ()
 
void setTax (double tax)
 
Periodicity getPeriodicity ()
 
void setPeriodicity (Periodicity periodicity)
 
String getRelatedURL ()
 
void setRelatedURL (String relatedURL)
 
String getText ()
 
void setText (String text)
 
String getWiki ()
 
void setWiki (String wiki)
 
Contact getContact ()
 
void setContact (Contact contact)
 
Contact getResponsible ()
 
void setResponsible (Contact responsible)
 
int getTimesSent ()
 
void setTimesSent (int timesSent)
 
Object entityId ()
 
boolean isEmpty ()
 
String getPlainText ()
 
boolean isInBusiness (IContact worker)
 
IContact getIContact ()
 
void setIContact (IContact contact)
 
IContact getIResponsible ()
 
void setIResponsible (IContact responsible)
 
String getImage ()
 
String getEventDate ()
 
FieldItSet getFields ()
 
ValueItSet getValues ()
 
Object getFieldValue (String label)
 
Collection< IValueItEntitygetRelated ()
 
MappingSet getSerializerMappings ()
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 
default Collection< Collection > collections ()
 

Protected Member Functions

void setId (String id)
 

Detailed Description

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

Definition at line 54 of file ContactService.java.

Member Function Documentation

◆ entityId()

Object org.turro.contacts.ContactService.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 239 of file ContactService.java.

239  {
240  return id;
241  }

◆ getContact()

Contact org.turro.contacts.ContactService.getContact ( )

Definition at line 212 of file ContactService.java.

212  {
213  return contact;
214  }
Here is the caller graph for this function:

◆ getCreation()

Date org.turro.contacts.ContactService.getCreation ( )

Definition at line 136 of file ContactService.java.

136  {
137  return creation;
138  }
Here is the caller graph for this function:

◆ getEndDate()

Date org.turro.contacts.ContactService.getEndDate ( )

Definition at line 152 of file ContactService.java.

152  {
153  return endDate;
154  }
Here is the caller graph for this function:

◆ getEventDate()

String org.turro.contacts.ContactService.getEventDate ( )

Definition at line 288 of file ContactService.java.

288  {
289  if(startDate != null && endDate != null) {
290  return EventDates.eventFormat(startDate, endDate);
291  } else if(startDate != null) {
292  return I_.get("Starts") + " " + EventDates.eventFormat(startDate);
293  } else if(endDate != null) {
294  return I_.get("Ends") + " " + EventDates.eventFormat(endDate);
295  }
296  return null;
297  }
Here is the call graph for this function:

◆ getFields()

FieldItSet org.turro.contacts.ContactService.getFields ( )

Implements org.turro.fieldit.IValueItEntity.

Definition at line 302 of file ContactService.java.

302  {
303  return GroupItUtil.getFields(ContactsPU.getObjectPath(this));
304  }
Here is the call graph for this function:

◆ getFieldValue()

Object org.turro.contacts.ContactService.getFieldValue ( String  label)

Implements org.turro.fieldit.IValueItEntity.

Definition at line 312 of file ContactService.java.

312  {
313  return FieldItUtil.getFieldValue(label, ContactsPU.getObjectPath(this));
314  }
Here is the call graph for this function:

◆ getIContact()

IContact org.turro.contacts.ContactService.getIContact ( )

Definition at line 262 of file ContactService.java.

262  {
263  return contact != null ? contact.getIContact() : null;
264  }
Here is the call graph for this function:

◆ getId()

String org.turro.contacts.ContactService.getId ( )

Definition at line 96 of file ContactService.java.

96  {
97  return id;
98  }
Here is the caller graph for this function:

◆ getImage()

String org.turro.contacts.ContactService.getImage ( )

Definition at line 280 of file ContactService.java.

280  {
281  FileAttach fileAttach = new FileAttach(ContactsPU.getObjectPath(this));
282  String faceFile = fileAttach.getPublicFile("/profile/face.png", false);
283  return !Strings.isBlank(faceFile) ? faceFile : null;
284  }
Here is the call graph for this function:

◆ getIResponsible()

IContact org.turro.contacts.ContactService.getIResponsible ( )

Definition at line 270 of file ContactService.java.

270  {
271  return responsible != null ? responsible.getIContact() : null;
272  }
Here is the call graph for this function:

◆ getPeriodicity()

Periodicity org.turro.contacts.ContactService.getPeriodicity ( )

Definition at line 176 of file ContactService.java.

176  {
177  return periodicity;
178  }

◆ getPlainText()

String org.turro.contacts.ContactService.getPlainText ( )

Definition at line 252 of file ContactService.java.

252  {
253  return HtmlContent.text(getText());
254  }
Here is the call graph for this function:

◆ getPrice()

double org.turro.contacts.ContactService.getPrice ( )

Definition at line 160 of file ContactService.java.

160  {
161  return price;
162  }
Here is the caller graph for this function:

◆ getRelated()

Collection<IValueItEntity> org.turro.contacts.ContactService.getRelated ( )

Implements org.turro.fieldit.IValueItEntity.

Definition at line 317 of file ContactService.java.

317  {
318  Collection<String> paths = FieldItUtil.related(ContactsPU.getObjectPath(this));
319  return new ArrayList<>();
320  }
Here is the call graph for this function:

◆ getRelatedURL()

String org.turro.contacts.ContactService.getRelatedURL ( )

Definition at line 184 of file ContactService.java.

184  {
185  return relatedURL;
186  }
Here is the caller graph for this function:

◆ getResponsible()

Contact org.turro.contacts.ContactService.getResponsible ( )

Definition at line 220 of file ContactService.java.

220  {
221  return responsible;
222  }
Here is the caller graph for this function:

◆ getRole()

ContactServiceRole org.turro.contacts.ContactService.getRole ( )

Definition at line 112 of file ContactService.java.

112  {
113  return role;
114  }

◆ getSerializerMappings()

MappingSet org.turro.contacts.ContactService.getSerializerMappings ( )

Definition at line 324 of file ContactService.java.

324  {
325  MappingSet set = new MappingSet();
326  set.addMapping(ContactService.class, 1,
327  new String[] { "title", "creation", "startDate", "endDate", "role", "type" },
328  new String[] { "thematic", "text", "contact", "responsible", "relatedURL", "timesSent",
329  "price", "tax", "periodicity" });
330  set.addMapping(Contact.class, 2,
331  new String[] { "id", "name" },
332  null);
333  return set;
334  }

◆ getStartDate()

Date org.turro.contacts.ContactService.getStartDate ( )

Definition at line 144 of file ContactService.java.

144  {
145  return startDate;
146  }
Here is the caller graph for this function:

◆ getTax()

double org.turro.contacts.ContactService.getTax ( )

Definition at line 168 of file ContactService.java.

168  {
169  return tax;
170  }
Here is the caller graph for this function:

◆ getText()

String org.turro.contacts.ContactService.getText ( )

Definition at line 192 of file ContactService.java.

192  {
193  return text;
194  }
Here is the caller graph for this function:

◆ getThematic()

String org.turro.contacts.ContactService.getThematic ( )

Definition at line 128 of file ContactService.java.

128  {
129  return thematic;
130  }

◆ getTimesSent()

int org.turro.contacts.ContactService.getTimesSent ( )

Definition at line 228 of file ContactService.java.

228  {
229  return timesSent;
230  }
Here is the caller graph for this function:

◆ getTitle()

String org.turro.contacts.ContactService.getTitle ( )

Definition at line 104 of file ContactService.java.

104  {
105  return title;
106  }
Here is the caller graph for this function:

◆ getType()

String org.turro.contacts.ContactService.getType ( )

Definition at line 120 of file ContactService.java.

120  {
121  return type;
122  }
Here is the caller graph for this function:

◆ getValues()

ValueItSet org.turro.contacts.ContactService.getValues ( )

Implements org.turro.fieldit.IValueItEntity.

Definition at line 307 of file ContactService.java.

307  {
308  return GroupItUtil.getValues(ContactsPU.getObjectPath(this));
309  }
Here is the call graph for this function:

◆ getWiki()

String org.turro.contacts.ContactService.getWiki ( )

Definition at line 200 of file ContactService.java.

200  {
201  // Compatible with non wiki version
202  if(Strings.isEmpty(wiki) && !Strings.isEmpty(text)) {
203  wiki = text;
204  }
205  return wiki;
206  }

◆ isEmpty()

boolean org.turro.contacts.ContactService.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 244 of file ContactService.java.

244  {
245  return Strings.isBlank(title) || Strings.isBlank(text) || role == null ||
246  Strings.isBlank(type) || Strings.isBlank(thematic) || Strings.isBlank(relatedURL) ||
247  contact == null || responsible == null;
248  }
Here is the caller graph for this function:

◆ isInBusiness()

boolean org.turro.contacts.ContactService.isInBusiness ( IContact  worker)

Definition at line 256 of file ContactService.java.

256  {
257  return contact.isInBusiness(worker);
258  }
boolean isInBusiness(Contact worker)
Definition: Contact.java:648
Here is the call graph for this function:

◆ setContact()

void org.turro.contacts.ContactService.setContact ( Contact  contact)

Definition at line 216 of file ContactService.java.

216  {
217  this.contact = contact;
218  }

◆ setCreation()

void org.turro.contacts.ContactService.setCreation ( Date  creation)

Definition at line 140 of file ContactService.java.

140  {
141  this.creation = creation;
142  }

◆ setEndDate()

void org.turro.contacts.ContactService.setEndDate ( Date  endDate)

Definition at line 156 of file ContactService.java.

156  {
157  this.endDate = endDate;
158  }
Here is the caller graph for this function:

◆ setIContact()

void org.turro.contacts.ContactService.setIContact ( IContact  contact)

Definition at line 266 of file ContactService.java.

266  {
267  this.contact = contact != null ? (Contact) contact.getContact() : null;
268  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setId()

void org.turro.contacts.ContactService.setId ( String  id)
protected

Definition at line 100 of file ContactService.java.

100  {
101  this.id = id;
102  }

◆ setIResponsible()

void org.turro.contacts.ContactService.setIResponsible ( IContact  responsible)

Definition at line 274 of file ContactService.java.

274  {
275  this.responsible = responsible != null ? (Contact) responsible.getContact() : null;
276  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPeriodicity()

void org.turro.contacts.ContactService.setPeriodicity ( Periodicity  periodicity)

Definition at line 180 of file ContactService.java.

180  {
181  this.periodicity = periodicity;
182  }
Here is the caller graph for this function:

◆ setPrice()

void org.turro.contacts.ContactService.setPrice ( double  price)

Definition at line 164 of file ContactService.java.

164  {
165  this.price = price;
166  }
Here is the caller graph for this function:

◆ setRelatedURL()

void org.turro.contacts.ContactService.setRelatedURL ( String  relatedURL)

Definition at line 188 of file ContactService.java.

188  {
189  this.relatedURL = relatedURL;
190  }
Here is the caller graph for this function:

◆ setResponsible()

void org.turro.contacts.ContactService.setResponsible ( Contact  responsible)

Definition at line 224 of file ContactService.java.

224  {
225  this.responsible = responsible;
226  }

◆ setRole()

void org.turro.contacts.ContactService.setRole ( ContactServiceRole  role)

Definition at line 116 of file ContactService.java.

116  {
117  this.role = role;
118  }
Here is the caller graph for this function:

◆ setStartDate()

void org.turro.contacts.ContactService.setStartDate ( Date  startDate)

Definition at line 148 of file ContactService.java.

148  {
149  this.startDate = startDate;
150  }
Here is the caller graph for this function:

◆ setTax()

void org.turro.contacts.ContactService.setTax ( double  tax)

Definition at line 172 of file ContactService.java.

172  {
173  this.tax = tax;
174  }
Here is the caller graph for this function:

◆ setText()

void org.turro.contacts.ContactService.setText ( String  text)

Definition at line 196 of file ContactService.java.

196  {
197  this.text = text;
198  }
Here is the caller graph for this function:

◆ setThematic()

void org.turro.contacts.ContactService.setThematic ( String  thematic)

Definition at line 132 of file ContactService.java.

132  {
133  this.thematic = thematic;
134  }
Here is the caller graph for this function:

◆ setTimesSent()

void org.turro.contacts.ContactService.setTimesSent ( int  timesSent)

Definition at line 232 of file ContactService.java.

232  {
233  this.timesSent = timesSent;
234  }
Here is the caller graph for this function:

◆ setTitle()

void org.turro.contacts.ContactService.setTitle ( String  title)

Definition at line 108 of file ContactService.java.

108  {
109  this.title = title;
110  }
Here is the caller graph for this function:

◆ setType()

void org.turro.contacts.ContactService.setType ( String  type)

Definition at line 124 of file ContactService.java.

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

◆ setWiki()

void org.turro.contacts.ContactService.setWiki ( String  wiki)

Definition at line 208 of file ContactService.java.

208  {
209  this.wiki = wiki;
210  }
Here is the caller graph for this function:

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