BrightSide Workbench Full Report + Source Code
org.turro.issue.wizard.DescriptionPanel Class Reference
Inheritance diagram for org.turro.issue.wizard.DescriptionPanel:
Collaboration diagram for org.turro.issue.wizard.DescriptionPanel:

Public Member Functions

boolean doEnter ()
 
boolean doLeave (boolean forwards)
 
void onChange $dossier ()
 
- Public Member Functions inherited from org.turro.zkoss.wizard.WizardPanelComposer
Object getObjectValue ()
 
void setObjectValue (Object objectValue)
 
boolean doFinish ()
 
boolean doCancel ()
 
void setShouldSkip (boolean shouldSkip)
 
void setFinalSplash (boolean finalSplash)
 
void setAllowPrior (boolean allowPrior)
 
void setAllowNext (boolean allowNext)
 
void setAllowFinish (boolean allowFinish)
 
void setAllowCancel (boolean allowCancel)
 
boolean isShouldSkip ()
 
boolean isFinalSplash ()
 
boolean isAllowPrior ()
 
boolean isAllowNext ()
 
boolean isAllowFinish ()
 
boolean isAllowCancel ()
 

Detailed Description

Member Function Documentation

◆ $dossier()

void onChange org.turro.issue.wizard.DescriptionPanel.$dossier ( )

Definition at line 127 of file elephant-dossier/src/main/java/org/turro/issue/wizard/DescriptionPanel.java.

Here is the call graph for this function:

◆ doEnter()

boolean org.turro.issue.wizard.DescriptionPanel.doEnter ( )

Reimplemented from org.turro.zkoss.wizard.WizardPanelComposer.

Definition at line 56 of file elephant-dossier/src/main/java/org/turro/issue/wizard/DescriptionPanel.java.

56  {
57  Application app = Application.getApplication();
58  IssueWizard iw = (IssueWizard) getObjectValue();
59  dossier.setObjectValue(iw.issue.getDossier());
60  dossier.setReadonly(!app.isInRole("issue:dossier"));
61  version.setDossier(dossier.getObjectValue());
62  if(iw.issue.getVersion() != null) {
63  version.setObjectValue(iw.issue.getVersion());
64  }
65  name.setValue(iw.issue.getDescription());
66  type.setObjectValue(iw.issue.getType());
67  grouping.setObjectValue(iw.issue.getGrouping());
68  priority.setObjectValue(iw.issue.getPriority());
69  publishable.setChecked(iw.issue.isPublishable());
70  milestone.setChecked(iw.issue.isMilestone());
71  return true;
72  }
Here is the call graph for this function:

◆ doLeave()

boolean org.turro.issue.wizard.DescriptionPanel.doLeave ( boolean  forwards)

Reimplemented from org.turro.zkoss.wizard.WizardPanelComposer.

Definition at line 75 of file elephant-dossier/src/main/java/org/turro/issue/wizard/DescriptionPanel.java.

75  {
76  ChangeCategory issueCat = new ChangeCategory(2, I_.get("Changes"));
77  IssueWizard iw = (IssueWizard) getObjectValue();
78  ChangeCategory cc = new ChangeCategory(4, I_.get("Participants"));
79  Application app = Application.getApplication();
80  IssueWrapper wrapper = new IssueWrapper(iw.issue);
81  iw.changes.addChange(new StringChange(issueCat, I_.get("Dossier"),
82  iw.issue.getDossier() != null ? iw.issue.getDossier().getDescription() : "",
83  dossier.getObjectValue() != null ? dossier.getObjectValue().getDescription() : ""));
84  iw.issue.setDossier(dossier.getObjectValue());
85  iw.changes.addChange(new StringChange(issueCat, I_.get("Version"),
86  iw.issue.getVersion() == null ? null : iw.issue.getVersion().getVersionId(),
87  version.getObjectValue() == null ? null : version.getObjectValue().getVersionId()));
88  iw.issue.setVersion(version.getObjectValue());
89  iw.changes.addChange(new StringChange(issueCat, I_.get("Description"),
90  iw.issue.getDescription(), name.getValue()));
91  iw.issue.setDescription(name.getValue());
92  iw.changes.addChange(new EnumChange(issueCat, I_.get("Type"),
93  iw.issue.getType(), type.getObjectValue()));
94  iw.issue.setType(type.getObjectValue());
95  iw.changes.addChange(new StringChange(issueCat, I_.get("Grouping"),
96  iw.issue.getGrouping(), grouping.getObjectValue()));
97  iw.issue.setGrouping(grouping.getObjectValue());
98  iw.changes.addChange(new EnumChange(issueCat, I_.get("Priority"),
99  iw.issue.getPriority(), priority.getObjectValue()));
100  iw.issue.setPriority(priority.getObjectValue());
101  iw.changes.addChange(new BooleanChange(issueCat, I_.get("Publishable"),
102  iw.issue.isPublishable(), publishable.isChecked()));
103  iw.issue.setPublishable(publishable.isChecked());
104  iw.changes.addChange(new BooleanChange(issueCat, I_.get("Milestone"),
105  iw.issue.isMilestone(), milestone.isChecked()));
106  iw.issue.setMilestone(milestone.isChecked());
107  if(!wrapper.hasReporter()) {
108  IssueParticipant ip = iw.issue.addReporter(Authentication.getIContact());
109  iw.changes.addChange(new UniqueString(cc, I_.byKey(ip.getRole().toString()), ip.getName()));
110  }
111  if(!wrapper.hasResponsible()) {
112  IssueParticipant ip = null;
113  if(app.isInRole("issue:participants")) {
114  //if can see participants
115  ip = iw.issue.addResponsible(Authentication.getIContact());
116  } else if(iw.issue.getDossier() != null) {
117  // otherwise, assign responsible to the first owner encountered
118  ip = iw.issue.addResponsible(iw.issue.getDossier().getDefaultResponsible());
119  }
120  iw.changes.addChange(new UniqueString(cc, I_.byKey(ip.getRole().toString()), ip.getName()));
121  }
122  return !forwards || (
123  iw.issue.getDossier() != null &&
124  !Strings.isBlank(iw.issue.getDescription()));
125  }
Here is the call graph for this function:

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