BrightSide Workbench Full Report + Source Code
org.turro.dossier.entity.Dossier Class Reference
Inheritance diagram for org.turro.dossier.entity.Dossier:
Collaboration diagram for org.turro.dossier.entity.Dossier:

Public Member Functions

Category getCategory ()
 
void setCategory (Category category)
 
String getUniquePath ()
 
void setUniquePath (String uniquePath)
 
Project getProject ()
 
void setProject (Project project)
 
Date getCreation ()
 
void setCreation (Date creation)
 
String getDescription ()
 
void setDescription (String description)
 
Set< FieldValuegetFieldValues ()
 
void setFieldValues (Set< FieldValue > fieldValues)
 
Long getId ()
 
void setId (Long id)
 
Set< IssuegetIssues ()
 
void setIssues (Set< Issue > issues)
 
Set< ParticipantgetParticipants ()
 
void setParticipants (Set< Participant > participants)
 
RelatedItem getRelated ()
 
DossierStatus getStatus ()
 
void setStatus (DossierStatus status)
 
boolean isPublishable ()
 
void setPublishable (boolean publishable)
 
DossierType getType ()
 
void setType (DossierType type)
 
Set< DossierVersiongetVersions ()
 
String getSearching ()
 
void setSearching (String searching)
 
void setVersions (Set< DossierVersion > versions)
 
Set< DescriptorValuegetDescriptors ()
 
void setDescriptors (Set< DescriptorValue > descriptors)
 
Set< WorthValuegetWorths ()
 
void setWorths (Set< WorthValue > worths)
 
Set< DossierOffergetOffers ()
 
void setOffers (Set< DossierOffer > offers)
 
Set< DossierVersiongetActiveVersions ()
 
Collection< IssuegetAllIssues ()
 
Collection< IssuegetAllPublishableIssues ()
 
Collection< IssuegetAllIssues (boolean publicOnly)
 
Collection< IssuegetOpenIssues ()
 
Collection< IssuegetOpenPublishableIssues ()
 
Collection< IssuegetOpenIssues (boolean publicOnly)
 
Collection< IssuegetClosedIssues ()
 
Collection< IssuegetClosedPublishableIssues ()
 
Collection< IssuegetClosedIssues (boolean publicOnly)
 
Collection< IssuegetIssuesByType (IssueType type)
 
Collection< String > getGroupings ()
 
Collection< IssuegetIssuesByGrouping (String grouping)
 
ParticipantSet< IDossierParticipantgetFullParticipants ()
 
void resetParticipants ()
 
boolean existsParticipant (IDossierParticipant participant)
 
List< IDossierParticipantgetRoleParticipants ()
 
List< IDossierParticipantgetFullRoleParticipants ()
 
DossierParticipationsList getParticipationsList ()
 
void resetParticipations ()
 
Collection< String > getPossibleDiscriminators ()
 
Map< String, Object > getFieldMap ()
 
String getFullDescription ()
 
String getFullDescription (boolean withSubject)
 
String getExtraDescription ()
 
String getPublishableDescription ()
 
String getLabeledPublishableDescription ()
 
Participant addOwner (IContact contact)
 
void addSubject (IContact contact)
 
Participant addAssistant (IContact contact)
 
Participant addOrReturnAssistant (IContact contact)
 
boolean isDirectOwner (IContact contact)
 
boolean isBranchAdmin (IContact contact)
 
List< IDossierParticipantgetDirectOwners ()
 
Participant getSubject ()
 
void setSubject (IContact subject)
 
IContact getDefaultResponsible ()
 
DescriptorSet getDescriptorSet ()
 
DescriptorValueSet getDescriptorValueSet ()
 
WorthSet getWorthSet ()
 
DossierDWReport getReport ()
 
String getDossierURL ()
 
IssueGraphModel getIssueGraphModel (boolean onlyMilestones, boolean onlyOpen)
 
DossierGanttWrapper getIssueGantt ()
 
Object entityId ()
 
boolean isEmpty ()
 
boolean isKnowledgeBase ()
 
DossierStageWrapper getStageWrapper ()
 
Date getLastActivity ()
 
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 53 of file Dossier.java.

Member Function Documentation

◆ addAssistant()

Participant org.turro.dossier.entity.Dossier.addAssistant ( IContact  contact)

Definition at line 548 of file Dossier.java.

548  {
549  if(contact == null) return null;
550  Participant p = new Participant();
551  p.setDossier(this);
552  p.setCreation(new Date());
553  p.setIdContact(contact.getId());
554  p.setName(contact.getName());
555  p.setRole(ParticipantRole.PARTICIPANT_ASSISTANT);
556  getParticipants().add(p);
557  return p;
558  }
Set< Participant > getParticipants()
Definition: Dossier.java:175
Here is the call graph for this function:

◆ addOrReturnAssistant()

Participant org.turro.dossier.entity.Dossier.addOrReturnAssistant ( IContact  contact)

Definition at line 560 of file Dossier.java.

560  {
561  for(Participant p : getParticipants()) {
562  if(p.getIdContact().equals(contact.getId())) {
563  return p;
564  }
565  }
566  return addAssistant(contact);
567  }
Participant addAssistant(IContact contact)
Definition: Dossier.java:548
Here is the call graph for this function:

◆ addOwner()

Participant org.turro.dossier.entity.Dossier.addOwner ( IContact  contact)

Definition at line 525 of file Dossier.java.

525  {
526  if(contact == null) return null;
527  Participant p = new Participant();
528  p.setDossier(this);
529  p.setCreation(new Date());
530  p.setIdContact(contact.getId());
531  p.setName(contact.getName());
532  p.setRole(ParticipantRole.PARTICIPANT_OWNER);
533  getParticipants().add(p);
534  return p;
535  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSubject()

void org.turro.dossier.entity.Dossier.addSubject ( IContact  contact)

Definition at line 537 of file Dossier.java.

537  {
538  if(contact == null) return;
539  Participant p = new Participant();
540  p.setDossier(this);
541  p.setCreation(new Date());
542  p.setIdContact(contact.getId());
543  p.setName(contact.getName());
544  p.setRole(ParticipantRole.PARTICIPANT_SUBJECT);
545  getParticipants().add(p);
546  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ entityId()

Object org.turro.dossier.entity.Dossier.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 712 of file Dossier.java.

712  {
713  return id;
714  }

◆ existsParticipant()

boolean org.turro.dossier.entity.Dossier.existsParticipant ( IDossierParticipant  participant)

Definition at line 413 of file Dossier.java.

413  {
414  for(Participant p : getParticipants()) {
415  if(!Strings.isBlank(p.getIdContact()) && p.getIdContact().equals(participant.getIdContact())) {
416  return true;
417  }
418  }
419  return false;
420  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getActiveVersions()

Set<DossierVersion> org.turro.dossier.entity.Dossier.getActiveVersions ( )

Definition at line 269 of file Dossier.java.

269  {
270  TreeSet<DossierVersion> tdv = new TreeSet<>();
271  for(DossierVersion dv : versions) {
272  if(dv.isActive()) {
273  tdv.add(dv);
274  }
275  }
276  return tdv;
277  }
Here is the caller graph for this function:

◆ getAllIssues() [1/2]

Collection<Issue> org.turro.dossier.entity.Dossier.getAllIssues ( )

Definition at line 281 of file Dossier.java.

281  {
282  return getAllIssues(false);
283  }
Collection< Issue > getAllIssues()
Definition: Dossier.java:281

◆ getAllIssues() [2/2]

Collection<Issue> org.turro.dossier.entity.Dossier.getAllIssues ( boolean  publicOnly)

Definition at line 289 of file Dossier.java.

289  {
290  Dao dao = new DossierPU();
291  return dao.getResultList(
292  "select issue from Issue as issue " +
293  "where issue.dossier = ? " +
294  (publicOnly ? "and issue.publishable = TRUE " : "") +
295  "order by issue.issueDate",
296  new Object[] {
297  this
298  }
299  );
300  }

◆ getAllPublishableIssues()

Collection<Issue> org.turro.dossier.entity.Dossier.getAllPublishableIssues ( )

Definition at line 285 of file Dossier.java.

285  {
286  return getAllIssues(true);
287  }

◆ getCategory()

Category org.turro.dossier.entity.Dossier.getCategory ( )

Definition at line 111 of file Dossier.java.

111  {
112  return category;
113  }
Here is the caller graph for this function:

◆ getClosedIssues() [1/2]

Collection<Issue> org.turro.dossier.entity.Dossier.getClosedIssues ( )

Definition at line 335 of file Dossier.java.

335  {
336  return getClosedIssues(false);
337  }
Collection< Issue > getClosedIssues()
Definition: Dossier.java:335

◆ getClosedIssues() [2/2]

Collection<Issue> org.turro.dossier.entity.Dossier.getClosedIssues ( boolean  publicOnly)

Definition at line 343 of file Dossier.java.

343  {
344  Dao dao = new DossierPU();
345  return dao.getResultList(
346  "select issue from Issue as issue " +
347  "where issue.dossier = ? " +
348  (publicOnly ? "and issue.publishable = TRUE " : "") +
349  "and (issue.status = ? " +
350  "or issue.status = ? " +
351  "or issue.status = ?) " +
352  "order by issue.issueDate",
353  new Object[] {
354  this,
355  IssueStatus.STATUS_RESOLVED,
356  IssueStatus.STATUS_VERIFIED,
357  IssueStatus.STATUS_CLOSED
358  }
359  );
360  }

◆ getClosedPublishableIssues()

Collection<Issue> org.turro.dossier.entity.Dossier.getClosedPublishableIssues ( )

Definition at line 339 of file Dossier.java.

339  {
340  return getClosedIssues(false);
341  }

◆ getCreation()

Date org.turro.dossier.entity.Dossier.getCreation ( )

Definition at line 135 of file Dossier.java.

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

◆ getDefaultResponsible()

IContact org.turro.dossier.entity.Dossier.getDefaultResponsible ( )

Definition at line 620 of file Dossier.java.

620  {
621  for(Participant p : getParticipants()) {
622  if(p.getRole().equals(ParticipantRole.PARTICIPANT_OWNER)) {
623  return Contacts.getContactById(p.getIdContact());
624  }
625  }
626  if(getCategory() != null) {
627  IContact contact = getCategory().getDefaultResponsible(ParticipantRole.PARTICIPANT_OWNER);
628  if(contact != null && contact.isValid()) {
629  return contact;
630  }
631  }
632  for(Participant p : getParticipants()) {
633  if(p.getRole().equals(ParticipantRole.PARTICIPANT_ASSISTANT)) {
634  return Contacts.getContactById(p.getIdContact());
635  }
636  }
637  if(getCategory() != null) {
638  IContact contact = getCategory().getDefaultResponsible(ParticipantRole.PARTICIPANT_ASSISTANT);
639  if(contact != null && contact.isValid()) {
640  return contact;
641  }
642  }
643  return null;
644  }
IContact getDefaultResponsible(ParticipantRole role)
Definition: Category.java:280
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDescription()

String org.turro.dossier.entity.Dossier.getDescription ( )

Definition at line 143 of file Dossier.java.

143  {
144  return description;
145  }
Here is the caller graph for this function:

◆ getDescriptors()

Set<DescriptorValue> org.turro.dossier.entity.Dossier.getDescriptors ( )

Definition at line 231 of file Dossier.java.

231  {
232  Dao dao = new DossierPU();
233  if(id != null && id > 0 && dao.isNotLoaded(descriptors)) {
234  descriptors = dao.lazyLoader(Dossier.class, this, "descriptors").descriptors;
235  }
236  return descriptors;
237  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDescriptorSet()

DescriptorSet org.turro.dossier.entity.Dossier.getDescriptorSet ( )

Definition at line 650 of file Dossier.java.

650  {
651  if(_descriptors == null) {
652  _descriptors = new DescriptorSet(this);
653  }
654  return _descriptors;
655  }
Here is the caller graph for this function:

◆ getDescriptorValueSet()

DescriptorValueSet org.turro.dossier.entity.Dossier.getDescriptorValueSet ( )

Definition at line 659 of file Dossier.java.

659  {
660  if(_descriptorValues == null) {
661  _descriptorValues = new DescriptorValueSet(this);
662  }
663  return _descriptorValues;
664  }

◆ getDirectOwners()

List<IDossierParticipant> org.turro.dossier.entity.Dossier.getDirectOwners ( )

Definition at line 591 of file Dossier.java.

591  {
592  List<IDossierParticipant> list = new ArrayList<>();
593  for(Participant p : getParticipants()) {
594  if(p.getRole().equals(ParticipantRole.PARTICIPANT_OWNER)) {
595  list.add(p);
596  }
597  }
598  list.addAll(category.getDirectOwners());
599  return list;
600  }
List< IDossierParticipant > getDirectOwners()
Definition: Category.java:246
Here is the caller graph for this function:

◆ getDossierURL()

String org.turro.dossier.entity.Dossier.getDossierURL ( )

Definition at line 689 of file Dossier.java.

689  {
690  String path = null;
691  if(getStatus().isOpen()) {
692  path = (String) getFieldMap().get("dossierOpenUrl");
693  } else {
694  path = (String) getFieldMap().get("dossierClosedUrl");
695  }
696  return path == null ? null : path + getId();
697  }
Map< String, Object > getFieldMap()
Definition: Dossier.java:458
Here is the caller graph for this function:

◆ getExtraDescription()

String org.turro.dossier.entity.Dossier.getExtraDescription ( )

Definition at line 486 of file Dossier.java.

486  {
487  String s = "";
488  for(FieldValue fv : getFieldValues()) {
489  if(!Strings.isEmpty(fv.getValue()) && fv.getFieldDef().isDescription()) {
490  if(s.length() != 0) s += ", ";
491  s += fv.getObjectString(false).trim();
492  }
493  }
494  return s;
495  }
Set< FieldValue > getFieldValues()
Definition: Dossier.java:151

◆ getFieldMap()

Map<String, Object> org.turro.dossier.entity.Dossier.getFieldMap ( )

Definition at line 458 of file Dossier.java.

458  {
459  if(fieldMap == null) {
460  fieldMap = new FieldValueMap(this);
461  }
462  return fieldMap;
463  }
Here is the caller graph for this function:

◆ getFieldValues()

Set<FieldValue> org.turro.dossier.entity.Dossier.getFieldValues ( )

Definition at line 151 of file Dossier.java.

151  {
152  return fieldValues;
153  }
Here is the caller graph for this function:

◆ getFullDescription() [1/2]

String org.turro.dossier.entity.Dossier.getFullDescription ( )

Definition at line 467 of file Dossier.java.

467  {
468  return getFullDescription(true);
469  }
Here is the caller graph for this function:

◆ getFullDescription() [2/2]

String org.turro.dossier.entity.Dossier.getFullDescription ( boolean  withSubject)

Definition at line 471 of file Dossier.java.

471  {
472  Participant subject = withSubject ? getSubject() : null;
473  StringBuilder sb = new StringBuilder();
474  if(subject != null) {
475  sb.append(subject.getName());
476  sb.append(Chars.forward().spaced());
477  }
478  sb.append(description);
479  if(category != null) {
480  sb.append(Chars.forward().spaced());
481  sb.append(category.getFullDescription());
482  }
483  return sb.toString();
484  }

◆ getFullParticipants()

ParticipantSet<IDossierParticipant> org.turro.dossier.entity.Dossier.getFullParticipants ( )

Definition at line 399 of file Dossier.java.

399  {
400  if(_participants == null) {
401  _participants = new ParticipantSet<>(getParticipants());
402  if(category != null) {
403  _participants.addAll(category.getFullParticipants());
404  }
405  }
406  return _participants;
407  }
ParticipantSet< IDossierParticipant > getFullParticipants()
Definition: Category.java:270
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFullRoleParticipants()

List<IDossierParticipant> org.turro.dossier.entity.Dossier.getFullRoleParticipants ( )

Definition at line 426 of file Dossier.java.

426  {
427  return getFullParticipants().stream().filter(p -> p.hasRole()).toList();
428  }
ParticipantSet< IDossierParticipant > getFullParticipants()
Definition: Dossier.java:399

◆ getGroupings()

Collection<String> org.turro.dossier.entity.Dossier.getGroupings ( )

Definition at line 374 of file Dossier.java.

374  {
375  Dao dao = new DossierPU();
376  return dao.getResultList(
377  "select distinct i.grouping " +
378  "from Issue i " +
379  "where i.dossier = ?",
380  new Object[] { this });
381  }

◆ getId()

Long org.turro.dossier.entity.Dossier.getId ( )

Definition at line 159 of file Dossier.java.

159  {
160  return id;
161  }
Here is the caller graph for this function:

◆ getIssueGantt()

DossierGanttWrapper org.turro.dossier.entity.Dossier.getIssueGantt ( )

Definition at line 705 of file Dossier.java.

705  {
706  return new DossierGanttWrapper(this);
707  }

◆ getIssueGraphModel()

IssueGraphModel org.turro.dossier.entity.Dossier.getIssueGraphModel ( boolean  onlyMilestones,
boolean  onlyOpen 
)

Definition at line 701 of file Dossier.java.

701  {
702  return new IssueGraphModel(this, onlyMilestones, onlyOpen);
703  }

◆ getIssues()

Set<Issue> org.turro.dossier.entity.Dossier.getIssues ( )

Definition at line 167 of file Dossier.java.

167  {
168  return issues;
169  }

◆ getIssuesByGrouping()

Collection<Issue> org.turro.dossier.entity.Dossier.getIssuesByGrouping ( String  grouping)

Definition at line 383 of file Dossier.java.

383  {
384  Dao dao = new DossierPU();
385  return dao.getResultList(
386  "select i " +
387  "from Issue i " +
388  "where i.dossier = ? " +
389  "and i.grouping = ?",
390  new Object[] { this, grouping });
391  }

◆ getIssuesByType()

Collection<Issue> org.turro.dossier.entity.Dossier.getIssuesByType ( IssueType  type)

Definition at line 362 of file Dossier.java.

362  {
363  Dao dao = new DossierPU();
364  return dao.getResultList(
365  "select i " +
366  "from Issue i " +
367  "where i.dossier = ? " +
368  "and i.type = ?",
369  new Object[] { this, type });
370  }
Here is the caller graph for this function:

◆ getLabeledPublishableDescription()

String org.turro.dossier.entity.Dossier.getLabeledPublishableDescription ( )

Definition at line 510 of file Dossier.java.

510  {
511  String s = "";
512  for(FieldValue fv : getFieldValues()) {
513  if(!Strings.isEmpty(fv.getValue()) &&
514  fv.getFieldDef().isDescription() &&
515  fv.getFieldDef().isPublishable()) {
516  if(s.length() != 0 && !s.endsWith(", ")) s += ", ";
517  s += fv.getLabeledObjectString().trim();
518  }
519  }
520  return s;
521  }

◆ getLastActivity()

Date org.turro.dossier.entity.Dossier.getLastActivity ( )

Definition at line 739 of file Dossier.java.

739  {
740  Date last = getCreation();
741  if(project != null) {
742  last = assignLast(project.getStartDate(), last);
743  last = assignLast(project.getApprovedDate(), last);
744  last = assignLast(project.getChangePhase(), last);
745  last = assignLast(project.getEndDate(), last);
746  last = assignLast(project.getOppositingEndDate(), last);
747  }
748  return last;
749  }

◆ getOffers()

Set<DossierOffer> org.turro.dossier.entity.Dossier.getOffers ( )

Definition at line 255 of file Dossier.java.

255  {
256  Dao dao = new DossierPU();
257  if(id != null && id > 0 && dao.isNotLoaded(offers)) {
258  offers = dao.lazyLoader(Dossier.class, this, "offers").offers;
259  }
260  return offers;
261  }
Here is the call graph for this function:

◆ getOpenIssues() [1/2]

Collection<Issue> org.turro.dossier.entity.Dossier.getOpenIssues ( )

Definition at line 302 of file Dossier.java.

302  {
303  return getOpenIssues(false);
304  }
Collection< Issue > getOpenIssues()
Definition: Dossier.java:302

◆ getOpenIssues() [2/2]

Collection<Issue> org.turro.dossier.entity.Dossier.getOpenIssues ( boolean  publicOnly)

Definition at line 310 of file Dossier.java.

310  {
311  Dao dao = new DossierPU();
312  return dao.getResultList(
313  "select issue from Issue as issue " +
314  "where issue.dossier = ? " +
315  (publicOnly ? "and issue.publishable = TRUE " : "") +
316  "and (issue.status = ? " +
317  "or issue.status = ? " +
318  "or issue.status = ? " +
319  "or issue.status = ? " +
320  "or issue.status = ? " +
321  "or issue.status = ?) " +
322  "order by issue.issueDate",
323  new Object[] {
324  this,
325  IssueStatus.STATUS_NEW,
326  IssueStatus.STATUS_INCOMPLETE,
327  IssueStatus.STATUS_STARTED,
328  IssueStatus.STATUS_REOPENED,
329  IssueStatus.STATUS_REUNION,
330  IssueStatus.STATUS_FROZEN
331  }
332  );
333  }

◆ getOpenPublishableIssues()

Collection<Issue> org.turro.dossier.entity.Dossier.getOpenPublishableIssues ( )

Definition at line 306 of file Dossier.java.

306  {
307  return getOpenIssues(true);
308  }

◆ getParticipants()

Set<Participant> org.turro.dossier.entity.Dossier.getParticipants ( )

Definition at line 175 of file Dossier.java.

175  {
176  Dao dao = new DossierPU();
177  if(id != null && id > 0 && dao.isNotLoaded(participants)) {
178  participants = dao.lazyLoader(Dossier.class, this, "participants").participants;
179  }
180  return participants;
181  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParticipationsList()

DossierParticipationsList org.turro.dossier.entity.Dossier.getParticipationsList ( )

Definition at line 436 of file Dossier.java.

436  {
437  if(_participations == null) {
438  _participations = new DossierParticipationsList(this);
439  }
440  return _participations;
441  }
Here is the caller graph for this function:

◆ getPossibleDiscriminators()

Collection<String> org.turro.dossier.entity.Dossier.getPossibleDiscriminators ( )

Definition at line 449 of file Dossier.java.

449  {
450  Dao dao = new DossierPU();
451  return dao.getResultList("select distinct discriminator from Participant");
452  }

◆ getProject()

Project org.turro.dossier.entity.Dossier.getProject ( )

Definition at line 127 of file Dossier.java.

127  {
128  return project;
129  }
Here is the caller graph for this function:

◆ getPublishableDescription()

String org.turro.dossier.entity.Dossier.getPublishableDescription ( )

Definition at line 497 of file Dossier.java.

497  {
498  String s = "";
499  for(FieldValue fv : getFieldValues()) {
500  if(!Strings.isEmpty(fv.getValue()) &&
501  fv.getFieldDef().isDescription() &&
502  fv.getFieldDef().isPublishable()) {
503  if(s.length() != 0 && !s.endsWith(", ")) s += ", ";
504  s += fv.getObjectString(false).trim();
505  }
506  }
507  return s;
508  }

◆ getRelated()

RelatedItem org.turro.dossier.entity.Dossier.getRelated ( )

Definition at line 187 of file Dossier.java.

187  {
188  return related;
189  }
Here is the caller graph for this function:

◆ getReport()

DossierDWReport org.turro.dossier.entity.Dossier.getReport ( )

Definition at line 681 of file Dossier.java.

681  {
682  if(_report == null) {
683  _report = new DossierDWReport();
684  _report.setReportValues(this);
685  }
686  return _report;
687  }
Here is the call graph for this function:

◆ getRoleParticipants()

List<IDossierParticipant> org.turro.dossier.entity.Dossier.getRoleParticipants ( )

Definition at line 422 of file Dossier.java.

422  {
423  return new ParticipantSet<IDossierParticipant>(getParticipants()).stream().filter(p -> p.hasRole()).toList();
424  }

◆ getSearching()

String org.turro.dossier.entity.Dossier.getSearching ( )

Definition at line 219 of file Dossier.java.

219  {
220  return searching;
221  }
Here is the caller graph for this function:

◆ getSerializerMappings()

MappingSet org.turro.dossier.entity.Dossier.getSerializerMappings ( )

Definition at line 760 of file Dossier.java.

760  {
761  MappingSet set = new MappingSet();
762  set.addMapping(Dossier.class, 1,
763  new String[] { "id", "description", "creation", "type", "status", "publishable" },
764  new String[] { "category", "versions", "participants", "fieldValues",
765  "project", "descriptors" });
766  set.addMapping(Category.class, 2,
767  new String[] { "id", "description" },
768  null);
769  set.addMapping(DossierVersion.class, 2,
770  new String[] { "versionId", "releaseDate", "active" },
771  null);
772  set.addMapping(Participant.class, 2,
773  new String[] { "name", "idContact", "role", "showAllAttachments", "showParticipants",
774  "showAllIssues", "receiveAllEmails", "bindingVote", "discriminator", "driver", "coordinator",
775  "beneficiary", "offerer", "research", "funding", "support", "consortium", "admin" },
776  null);
777  set.addMapping(FieldValue.class, 2,
778  new String[] { "value" },
779  null);
780  set.addMapping(Project.class, 2,
781  new String[] { "projectCode", "projectTitle", "phase", "estimatedBudget",
782  "assignedBudget", "startDate", "approvedDate", "oppositingEndDate", "endDate", "goal" },
783  new String[] { "matchCriteria" });
784  set.addMapping(GrantMatchCriteria.class, 3,
785  new String[] { "hiring", "idi", "investment", "startUp" },
786  null);
787  set.addMapping(DescriptorValue.class, 2,
788  new String[] { "wiki" },
789  null);
790  return set;
791  }

◆ getStageWrapper()

DossierStageWrapper org.turro.dossier.entity.Dossier.getStageWrapper ( )

Definition at line 730 of file Dossier.java.

730  {
731  if(status == null) {
732  status = DossierStatus.DOSSIER_OPENED;
733  }
734  return new DossierStageWrapper(this);
735  }

◆ getStatus()

DossierStatus org.turro.dossier.entity.Dossier.getStatus ( )

Definition at line 191 of file Dossier.java.

191  {
192  return status;
193  }
Here is the caller graph for this function:

◆ getSubject()

Participant org.turro.dossier.entity.Dossier.getSubject ( )

Definition at line 602 of file Dossier.java.

602  {
603  for(Participant p : getParticipants()) {
604  if(p.getRole().equals(ParticipantRole.PARTICIPANT_SUBJECT)) {
605  return p;
606  }
607  }
608  return null;
609  }

◆ getType()

DossierType org.turro.dossier.entity.Dossier.getType ( )

Definition at line 207 of file Dossier.java.

207  {
208  return type;
209  }
Here is the caller graph for this function:

◆ getUniquePath()

String org.turro.dossier.entity.Dossier.getUniquePath ( )

Definition at line 119 of file Dossier.java.

119  {
120  return uniquePath;
121  }

◆ getVersions()

Set<DossierVersion> org.turro.dossier.entity.Dossier.getVersions ( )

Definition at line 215 of file Dossier.java.

215  {
216  return versions;
217  }
Here is the caller graph for this function:

◆ getWorths()

Set<WorthValue> org.turro.dossier.entity.Dossier.getWorths ( )

Definition at line 243 of file Dossier.java.

243  {
244  Dao dao = new DossierPU();
245  if(id != null && id > 0 && dao.isNotLoaded(worths)) {
246  worths = dao.lazyLoader(Dossier.class, this, "worths").worths;
247  }
248  return worths;
249  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWorthSet()

WorthSet org.turro.dossier.entity.Dossier.getWorthSet ( )

Definition at line 670 of file Dossier.java.

670  {
671  if(_worths == null) {
672  _worths = new WorthSet(this);
673  }
674  return _worths;
675  }

◆ isBranchAdmin()

boolean org.turro.dossier.entity.Dossier.isBranchAdmin ( IContact  contact)

Definition at line 580 of file Dossier.java.

580  {
581  for(IDossierParticipant p : getParticipationsList()) {
582  if(p.getRole().equals(ParticipantRole.PARTICIPANT_OWNER) &&
583  contact.getId().equals(p.getIdContact()) &&
584  p.isAdmin()) {
585  return true;
586  }
587  }
588  return false;
589  }
DossierParticipationsList getParticipationsList()
Definition: Dossier.java:436
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isDirectOwner()

boolean org.turro.dossier.entity.Dossier.isDirectOwner ( IContact  contact)

Definition at line 569 of file Dossier.java.

569  {
570  for(IDossierParticipant p : getDirectOwners()) {
571  if(p.getRole().equals(ParticipantRole.PARTICIPANT_OWNER)) {
572  if(contact.getId().equals(p.getIdContact())) {
573  return true;
574  }
575  }
576  }
577  return category.isDirectOwner(contact);
578  }
boolean isDirectOwner(IContact contact)
Definition: Category.java:224
List< IDossierParticipant > getDirectOwners()
Definition: Dossier.java:591
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.dossier.entity.Dossier.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 717 of file Dossier.java.

717  {
718  return Strings.isBlank(description) || category == null;
719  }
Here is the caller graph for this function:

◆ isKnowledgeBase()

boolean org.turro.dossier.entity.Dossier.isKnowledgeBase ( )

Definition at line 723 of file Dossier.java.

723  {
724  if(category != null) {
725  return category.isKnowledgeBase();
726  }
727  return false;
728  }

◆ isPublishable()

boolean org.turro.dossier.entity.Dossier.isPublishable ( )

Definition at line 199 of file Dossier.java.

199  {
200  return publishable;
201  }

◆ resetParticipants()

void org.turro.dossier.entity.Dossier.resetParticipants ( )

Definition at line 409 of file Dossier.java.

409  {
410  _participants = null;
411  }

◆ resetParticipations()

void org.turro.dossier.entity.Dossier.resetParticipations ( )

Definition at line 443 of file Dossier.java.

443  {
444  _participations = null;
445  }

◆ setCategory()

void org.turro.dossier.entity.Dossier.setCategory ( Category  category)

Definition at line 115 of file Dossier.java.

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

◆ setCreation()

void org.turro.dossier.entity.Dossier.setCreation ( Date  creation)

Definition at line 139 of file Dossier.java.

139  {
140  this.creation = creation;
141  }
Here is the caller graph for this function:

◆ setDescription()

void org.turro.dossier.entity.Dossier.setDescription ( String  description)

Definition at line 147 of file Dossier.java.

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

◆ setDescriptors()

void org.turro.dossier.entity.Dossier.setDescriptors ( Set< DescriptorValue descriptors)

Definition at line 239 of file Dossier.java.

239  {
240  this.descriptors = descriptors;
241  }

◆ setFieldValues()

void org.turro.dossier.entity.Dossier.setFieldValues ( Set< FieldValue fieldValues)

Definition at line 155 of file Dossier.java.

155  {
156  this.fieldValues = fieldValues;
157  }

◆ setId()

void org.turro.dossier.entity.Dossier.setId ( Long  id)

Definition at line 163 of file Dossier.java.

163  {
164  this.id = id;
165  }

◆ setIssues()

void org.turro.dossier.entity.Dossier.setIssues ( Set< Issue issues)

Definition at line 171 of file Dossier.java.

171  {
172  this.issues = issues;
173  }

◆ setOffers()

void org.turro.dossier.entity.Dossier.setOffers ( Set< DossierOffer offers)

Definition at line 263 of file Dossier.java.

263  {
264  this.offers = offers;
265  }

◆ setParticipants()

void org.turro.dossier.entity.Dossier.setParticipants ( Set< Participant participants)

Definition at line 183 of file Dossier.java.

183  {
184  this.participants = participants;
185  }

◆ setProject()

void org.turro.dossier.entity.Dossier.setProject ( Project  project)

Definition at line 131 of file Dossier.java.

131  {
132  this.project = project;
133  }

◆ setPublishable()

void org.turro.dossier.entity.Dossier.setPublishable ( boolean  publishable)

Definition at line 203 of file Dossier.java.

203  {
204  this.publishable = publishable;
205  }

◆ setSearching()

void org.turro.dossier.entity.Dossier.setSearching ( String  searching)

Definition at line 223 of file Dossier.java.

223  {
224  this.searching = searching;
225  }
Here is the caller graph for this function:

◆ setStatus()

void org.turro.dossier.entity.Dossier.setStatus ( DossierStatus  status)

Definition at line 195 of file Dossier.java.

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

◆ setSubject()

void org.turro.dossier.entity.Dossier.setSubject ( IContact  subject)

Definition at line 611 of file Dossier.java.

611  {
612  Participant p = getSubject();
613  if(p != null) {
614  p.setIdContact(subject.getId());
615  } else {
616  addSubject(subject);
617  }
618  }
void addSubject(IContact contact)
Definition: Dossier.java:537

◆ setType()

void org.turro.dossier.entity.Dossier.setType ( DossierType  type)

Definition at line 211 of file Dossier.java.

211  {
212  this.type = type;
213  }

◆ setUniquePath()

void org.turro.dossier.entity.Dossier.setUniquePath ( String  uniquePath)

Definition at line 123 of file Dossier.java.

123  {
124  this.uniquePath = uniquePath;
125  }

◆ setVersions()

void org.turro.dossier.entity.Dossier.setVersions ( Set< DossierVersion versions)

Definition at line 227 of file Dossier.java.

227  {
228  this.versions = versions;
229  }

◆ setWorths()

void org.turro.dossier.entity.Dossier.setWorths ( Set< WorthValue worths)

Definition at line 251 of file Dossier.java.

251  {
252  this.worths = worths;
253  }

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