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

Public Member Functions

 DossierEdit () throws InterruptedException
 
 DossierEdit (String title, String border, boolean closable) throws InterruptedException
 
void setSubject (Contact newValue)
 
Dossier applyChanges (Dossier dossier)
 
- Public Member Functions inherited from org.turro.elephant.zkoss.ModalWindow
 ModalWindow (String title, String border, boolean closable)
 
 ModalWindow ()
 
int getResult ()
 
void setResult (int result)
 
Object getResultValue ()
 
void setResultValue (Object resultValue)
 
void show (Page page, Command command)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.elephant.zkoss.ModalWindow
int result
 
Object resultValue
 

Detailed Description

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

Definition at line 37 of file DossierEdit.java.

Constructor & Destructor Documentation

◆ DossierEdit() [1/2]

org.turro.dossier.zul.dossier.DossierEdit.DossierEdit ( ) throws InterruptedException

Definition at line 41 of file DossierEdit.java.

41  {
42  super();
43  }

◆ DossierEdit() [2/2]

org.turro.dossier.zul.dossier.DossierEdit.DossierEdit ( String  title,
String  border,
boolean  closable 
) throws InterruptedException

Definition at line 45 of file DossierEdit.java.

45  {
46  super(title, border, closable);
47  }

Member Function Documentation

◆ applyChanges()

Dossier org.turro.dossier.zul.dossier.DossierEdit.applyChanges ( Dossier  dossier)

Definition at line 53 of file DossierEdit.java.

53  {
54  if(dossier.getId() == null && dossier.getParticipants().isEmpty()) {
55  DossierWrapper dw = new DossierWrapper(dossier);
56  if(!dw.isOwner() && !dw.isAssistant()) {
57  dossier.addOwner(Authentication.getIContact());
58  }
59  }
60  if(subject != null) {
61  Participant s = new Participant();
62  s.setCreation(new Date());
63  s.setIdContact(subject.getId());
64  s.setName(subject.getName());
65  s.setRole(ParticipantRole.PARTICIPANT_SUBJECT);
66  s.setDossier(dossier);
67  dossier.getParticipants().add(s);
68  }
69  Iterator<DossierVersion> it = dossier.getVersions().iterator();
70  while(it.hasNext()) {
71  DossierVersion or = it.next();
72  if(or.isEmpty()) {
73  or.setDossier(null);
74  it.remove();
75  }
76  }
77  dossier = new DossierWrapper(dossier).save();
78  SystemLogger.getInstance().doLog(SystemLogType.LOG_INFO, dossier, "saved",
79  dossier.getFullDescription());
80  return dossier;
81  }
Here is the call graph for this function:

◆ setSubject()

void org.turro.dossier.zul.dossier.DossierEdit.setSubject ( Contact  newValue)

Definition at line 49 of file DossierEdit.java.

49  {
50  subject = newValue;
51  }

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