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

Public Member Functions

String getId ()
 
void setId (String id)
 
String getEntityPath ()
 
void setEntityPath (String entityPath)
 
boolean isOnline ()
 
void setOnline (boolean online)
 
boolean isPublishable ()
 
void setPublishable (boolean publishable)
 
String getName ()
 
void setName (String name)
 
Date getCallDate ()
 
String getLocation ()
 
void setLocation (String location)
 
String getOnlineUrl ()
 
void setOnlineUrl (String onlineUrl)
 
void setCallDate (Date callDate)
 
Date getEndDate ()
 
void setEndDate (Date endDate)
 
String getText ()
 
void setText (String text)
 
String getWiki ()
 
void setWiki (String wiki)
 
Contact getOrganizer ()
 
void setOrganizer (Contact organizer)
 
String getIcalIdentifier ()
 
void setIcalIdentifier (String icalIdentifier)
 
Set< AttendeegetAttendees ()
 
void setAttendees (Set< Attendee > attendees)
 
WsServers getServers ()
 
void setServers (WsServers servers)
 
String getEventDate ()
 
Object entityId ()
 
boolean isEmpty ()
 
String getPlainText ()
 
IElephantEntity getEntity ()
 
void addAttendeesByEntity (boolean deep)
 
void addContact (Contact contact)
 
void attended ()
 
void attended (IContact contact)
 
boolean hasAttended ()
 
boolean hasAttended (IContact contact)
 
boolean hasPassed ()
 
long getDaysLeft ()
 
boolean isAssistant ()
 
boolean isAssistant (IContact contact)
 
boolean isAssistant (Contact contact)
 
TreeSet< AttendeegetSortedAttendees ()
 
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 ()
 

Detailed Description

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

Definition at line 65 of file Convocation.java.

Member Function Documentation

◆ addAttendeesByEntity()

void org.turro.contacts.Convocation.addAttendeesByEntity ( boolean  deep)

Definition at line 262 of file Convocation.java.

262  {
263  AssistantSet as = new AssistantSet();
264  Assistants.addAssistants(entityPath, deep, as, deep ? AssistantConstants.all() : null);
265  for(Assistant a : as) {
266  addContact((Contact) a.contact.getContact());
267  }
268  }
void addContact(Contact contact)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addContact()

void org.turro.contacts.Convocation.addContact ( Contact  contact)

Definition at line 270 of file Convocation.java.

270  {
271  if(contact != null) {
272  for(Attendee a : getAttendees()) {
273  if(a.exists(contact)) return;
274  }
275  Attendee a = new Attendee();
276  a.setContact(contact);
277  a.setConvocation(this);
278  getAttendees().add(a);
279  }
280  }
Set< Attendee > getAttendees()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ attended() [1/2]

void org.turro.contacts.Convocation.attended ( )

Definition at line 282 of file Convocation.java.

282  {
283  attended(Authentication.getIContact());
284  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ attended() [2/2]

void org.turro.contacts.Convocation.attended ( IContact  contact)

Definition at line 286 of file Convocation.java.

286  {
287  WhereClause wc = new WhereClause();
288  wc.addClause("update from Attendee a");
289  wc.addClause("set a.attended = TRUE");
290  wc.addClause("where a.convocation.id = :id");
291  wc.addNamedValue("id", id);
292  wc.addClause("and a.contact.id = :cid");
293  wc.addNamedValue("cid", contact.getId());
294  new ContactsPU().executeUpdate(wc);
295  }
Here is the call graph for this function:

◆ entityId()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 242 of file Convocation.java.

242  {
243  return id;
244  }

◆ getAttendees()

Set<Attendee> org.turro.contacts.Convocation.getAttendees ( )

Definition at line 210 of file Convocation.java.

210  {
211  return attendees;
212  }
Here is the caller graph for this function:

◆ getCallDate()

Date org.turro.contacts.Convocation.getCallDate ( )

Definition at line 141 of file Convocation.java.

141  {
142  return callDate;
143  }
Here is the caller graph for this function:

◆ getDaysLeft()

long org.turro.contacts.Convocation.getDaysLeft ( )

Definition at line 312 of file Convocation.java.

312  {
313  return TimeUnit.DAYS.convert(callDate.getTime() - new Date().getTime(), TimeUnit.MILLISECONDS);
314  }
Here is the caller graph for this function:

◆ getEndDate()

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

Definition at line 165 of file Convocation.java.

165  {
166  return endDate;
167  }

◆ getEntity()

IElephantEntity org.turro.contacts.Convocation.getEntity ( )

Definition at line 258 of file Convocation.java.

258  {
259  return Entities.getController(entityPath);
260  }
Here is the call graph for this function:

◆ getEntityPath()

String org.turro.contacts.Convocation.getEntityPath ( )

Definition at line 109 of file Convocation.java.

109  {
110  return entityPath;
111  }

◆ getEventDate()

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

Definition at line 228 of file Convocation.java.

228  {
229  if(callDate != null && endDate != null) {
230  return EventDates.eventFormat(callDate, endDate);
231  } else if(callDate != null) {
232  return I_.get("Starts") + " " + EventDates.eventFormat(callDate);
233  } else if(endDate != null) {
234  return I_.get("Ends") + " " + EventDates.eventFormat(endDate);
235  }
236  return null;
237  }
Here is the call graph for this function:

◆ getIcalIdentifier()

String org.turro.contacts.Convocation.getIcalIdentifier ( )

Definition at line 202 of file Convocation.java.

202  {
203  return icalIdentifier;
204  }

◆ getId()

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

Definition at line 101 of file Convocation.java.

101  {
102  return id;
103  }
Here is the caller graph for this function:

◆ getLocation()

String org.turro.contacts.Convocation.getLocation ( )

Definition at line 145 of file Convocation.java.

145  {
146  return location;
147  }

◆ getName()

String org.turro.contacts.Convocation.getName ( )

Definition at line 133 of file Convocation.java.

133  {
134  return name;
135  }
Here is the caller graph for this function:

◆ getOnlineUrl()

String org.turro.contacts.Convocation.getOnlineUrl ( )

Definition at line 153 of file Convocation.java.

153  {
154  return onlineUrl;
155  }

◆ getOrganizer()

Contact org.turro.contacts.Convocation.getOrganizer ( )

Definition at line 194 of file Convocation.java.

194  {
195  return organizer;
196  }
Here is the caller graph for this function:

◆ getPlainText()

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

Definition at line 254 of file Convocation.java.

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

◆ getSerializerMappings()

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

Definition at line 349 of file Convocation.java.

349  {
350  MappingSet set = new MappingSet();
351  set.addMapping(Convocation.class, 1,
352  new String[] { "id", "entityPath", "name", "onLine", "publishable",
353  "callDate", "endDate", "organizer" },
354  new String[] { "text", "location", "onLineUrl", "icalIdentifier", "attendees" });
355  set.addMapping(Attendee.class, 2,
356  new String[] { "id" },
357  new String[] { "contact" });
358  set.addMapping(Contact.class, 3,
359  new String[] { "id" },
360  null);
361  return set;
362  }

◆ getServers()

WsServers org.turro.contacts.Convocation.getServers ( )

Definition at line 218 of file Convocation.java.

218  {
219  return servers;
220  }

◆ getSortedAttendees()

TreeSet<Attendee> org.turro.contacts.Convocation.getSortedAttendees ( )

Definition at line 341 of file Convocation.java.

341  {
342  TreeSet<Attendee> set = new TreeSet(new AttendeeComparator());
343  set.addAll(attendees);
344  return set;
345  }

◆ getText()

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

Definition at line 173 of file Convocation.java.

173  {
174  return text;
175  }
Here is the caller graph for this function:

◆ getWiki()

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

Definition at line 181 of file Convocation.java.

181  {
182  // Compatible with non wiki version
183  if(Strings.isEmpty(wiki) && !Strings.isEmpty(text)) {
184  wiki = text;
185  }
186  return wiki;
187  }

◆ hasAttended() [1/2]

boolean org.turro.contacts.Convocation.hasAttended ( )

Definition at line 297 of file Convocation.java.

297  {
298  return hasAttended(Authentication.getIContact());
299  }
Here is the call graph for this function:

◆ hasAttended() [2/2]

boolean org.turro.contacts.Convocation.hasAttended ( IContact  contact)

Definition at line 301 of file Convocation.java.

301  {
302  for(Attendee a : getAttendees()) {
303  if(a.isAttended() && a.getIContact().getId().equals(contact.getId())) return true;
304  }
305  return false;
306  }
Here is the call graph for this function:

◆ hasPassed()

boolean org.turro.contacts.Convocation.hasPassed ( )

Definition at line 308 of file Convocation.java.

308  {
309  return endDate.before(new Date());
310  }

◆ isAssistant() [1/3]

boolean org.turro.contacts.Convocation.isAssistant ( )

Definition at line 316 of file Convocation.java.

316  {
317  return isAssistant(Authentication.getIContact());
318  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAssistant() [2/3]

boolean org.turro.contacts.Convocation.isAssistant ( Contact  contact)

Definition at line 327 of file Convocation.java.

327  {
328  if(contact != null) {
329  if(organizer != null) {
330  if(CompareUtil.compare(organizer.getId(), contact.getId()) == 0) {
331  return true;
332  }
333  }
334  for(Attendee a : getAttendees()) {
335  if(a.exists(contact)) return true;
336  }
337  }
338  return false;
339  }
Here is the call graph for this function:

◆ isAssistant() [3/3]

boolean org.turro.contacts.Convocation.isAssistant ( IContact  contact)

Definition at line 320 of file Convocation.java.

320  {
321  if(contact != null && contact.isValid()) {
322  return isAssistant((Contact) contact.getContact());
323  }
324  return false;
325  }
Here is the call graph for this function:

◆ isEmpty()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 247 of file Convocation.java.

247  {
248  return Strings.isBlank(name) || Strings.isBlank(text) || callDate == null ||
249  endDate == null || organizer == null;
250  }

◆ isOnline()

boolean org.turro.contacts.Convocation.isOnline ( )

Definition at line 117 of file Convocation.java.

117  {
118  return online;
119  }

◆ isPublishable()

boolean org.turro.contacts.Convocation.isPublishable ( )

Definition at line 125 of file Convocation.java.

125  {
126  return publishable;
127  }

◆ setAttendees()

void org.turro.contacts.Convocation.setAttendees ( Set< Attendee attendees)

Definition at line 214 of file Convocation.java.

214  {
215  this.attendees = attendees;
216  }

◆ setCallDate()

void org.turro.contacts.Convocation.setCallDate ( Date  callDate)

Definition at line 161 of file Convocation.java.

161  {
162  this.callDate = callDate;
163  }
Here is the caller graph for this function:

◆ setEndDate()

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

Definition at line 169 of file Convocation.java.

169  {
170  this.endDate = endDate;
171  }
Here is the caller graph for this function:

◆ setEntityPath()

void org.turro.contacts.Convocation.setEntityPath ( String  entityPath)

Definition at line 113 of file Convocation.java.

113  {
114  this.entityPath = entityPath;
115  }

◆ setIcalIdentifier()

void org.turro.contacts.Convocation.setIcalIdentifier ( String  icalIdentifier)

Definition at line 206 of file Convocation.java.

206  {
207  this.icalIdentifier = icalIdentifier;
208  }

◆ setId()

void org.turro.contacts.Convocation.setId ( String  id)

Definition at line 105 of file Convocation.java.

105  {
106  this.id = id;
107  }

◆ setLocation()

void org.turro.contacts.Convocation.setLocation ( String  location)

Definition at line 149 of file Convocation.java.

149  {
150  this.location = location;
151  }

◆ setName()

void org.turro.contacts.Convocation.setName ( String  name)

Definition at line 137 of file Convocation.java.

137  {
138  this.name = name;
139  }

◆ setOnline()

void org.turro.contacts.Convocation.setOnline ( boolean  online)

Definition at line 121 of file Convocation.java.

121  {
122  this.online = online;
123  }

◆ setOnlineUrl()

void org.turro.contacts.Convocation.setOnlineUrl ( String  onlineUrl)

Definition at line 157 of file Convocation.java.

157  {
158  this.onlineUrl = onlineUrl;
159  }

◆ setOrganizer()

void org.turro.contacts.Convocation.setOrganizer ( Contact  organizer)

Definition at line 198 of file Convocation.java.

198  {
199  this.organizer = organizer;
200  }

◆ setPublishable()

void org.turro.contacts.Convocation.setPublishable ( boolean  publishable)

Definition at line 129 of file Convocation.java.

129  {
130  this.publishable = publishable;
131  }

◆ setServers()

void org.turro.contacts.Convocation.setServers ( WsServers  servers)

Definition at line 222 of file Convocation.java.

222  {
223  this.servers = servers;
224  }

◆ setText()

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

Definition at line 177 of file Convocation.java.

177  {
178  this.text = text;
179  }

◆ setWiki()

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

Definition at line 189 of file Convocation.java.

189  {
190  this.wiki = wiki;
191  this.text = WikiCompiler.source(this.wiki).html();
192  }

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