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

Public Member Functions

void addToMenu (ElephantMenuBar bar)
 
- Public Member Functions inherited from org.turro.menu.ElephantMenu
 ElephantMenu ()
 
 ElephantMenu (String label)
 
 ElephantMenu (String label, String image)
 
ElephantMenuBar getMenuBar ()
 
ElephantMenu getParentMenu ()
 
ElephantSubmenu getParentSubmenu ()
 
ElephantSubmenu addSubmenu ()
 
int compareTo (ElephantMenu o)
 

Static Public Member Functions

static void showDossier (Dossier dossier)
 
static void showDossier (Long id)
 
static void showDossierActivity (Long id)
 
static void showIssue (Long id)
 
static void showCategory (Long id)
 
static void showProjectGrant (Long id)
 
static void showMyDossiers ()
 
static void showMyIssues ()
 
static void addSubtask (Issue issue, final Command command)
 
static void addRelation (Issue issue, final Command command)
 
static void addInformation (Issue issue, final Command command)
 
static void addDossierInformation (Dossier dossier, Command command)
 
static void showPending ()
 
- Static Public Member Functions inherited from org.turro.menu.ElephantMenu
static String makeInclude (String include)
 
static void showEntity (Object id, String attribute, String label, String include)
 
static void showEntity (Object id, String attribute, String label, String include, Map< String, Object > dynProps)
 
static void showZulFile (String label, String include)
 
static void showZulFile (String label, String include, Map< String, Object > dynProps)
 
static void showModalZulFile (String label, String source, Command command)
 
static void showModalZulFile (String label, String include, Map args, Command command)
 
static void showPopupZulFile (String label, String include)
 
static void showPopupZulFile (String label, String include, Map args)
 
static void showEntityModal (Object id, String attribute, String include, Command command)
 

Additional Inherited Members

- Protected Member Functions inherited from org.turro.menu.ElephantMenu
void addToSessionMenu (ElephantSubmenu submenu)
 
void addToToolsMenu (ElephantSubmenu submenu)
 

Detailed Description

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

Definition at line 48 of file DossierMenu.java.

Member Function Documentation

◆ addDossierInformation()

static void org.turro.dossier.zul.menu.DossierMenu.addDossierInformation ( Dossier  dossier,
Command  command 
)
static

Definition at line 176 of file DossierMenu.java.

176  {
177  HashMap<String, Object> map = new HashMap<>();
178  Issue issue = Issue.getDefaultIssue();
179  issue.setDossier(dossier);
180  map.put("issue", issue);
181  showModalZulFile("Issue", "/issue/addInformation.zul", map, command);
182  }
static void showModalZulFile(String label, String source, Command command)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addInformation()

static void org.turro.dossier.zul.menu.DossierMenu.addInformation ( Issue  issue,
final Command  command 
)
static

Definition at line 170 of file DossierMenu.java.

170  {
171  HashMap<String, Object> map = new HashMap<>();
172  map.put("issue", issue == null ? Issue.getDefaultIssue() : issue);
173  showModalZulFile("Issue", "/issue/addInformation.zul", map, command);
174  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addRelation()

static void org.turro.dossier.zul.menu.DossierMenu.addRelation ( Issue  issue,
final Command  command 
)
static

Definition at line 150 of file DossierMenu.java.

150  {
151  EntityCombobox issuebox = new EntityCombobox();
152  issuebox.setRoot("issue");
153  Dialogs.title(I_.get("Relation"))
154  .width("550px")
155  .height("250px")
156  .addField(DialogField.field("Type").onEditor(() -> new SubtaskTypeSelection()))
157  .addField(DialogField.field("Issue").onEditor(() -> issuebox))
158  .onOk(dialogs -> {
159  Issue nissue = Issue.getDefaultIssue();
160  nissue.setDossier(issue.getDossier());
161  IssuePredecessorType type = dialogs.<SubtaskTypeSelection>getEditor("Type").getValue();
162  Issue rissue = (Issue) dialogs.<EntityCombobox>getEditor("Issue").getEntity();
163  if(type != null && rissue != null) {
164  Subtask subtask = new Subtask(issue, type);
165  subtask.save(new DossierPU(), rissue);
166  }
167  }).emptyCancel().show();
168  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSubtask()

static void org.turro.dossier.zul.menu.DossierMenu.addSubtask ( Issue  issue,
final Command  command 
)
static

Definition at line 133 of file DossierMenu.java.

133  {
134  Dialogs.title(I_.get("Subtask"))
135  .width("550px")
136  .height("220px")
137  .addField(DialogField.field("Type").onEditor(() -> new SubtaskTypeSelection()))
138  .onOk(dialogs -> {
139  Issue nissue = Issue.getDefaultIssue();
140  nissue.setDossier(issue.getDossier());
141  IssuePredecessorType type = dialogs.<SubtaskTypeSelection>getEditor("Type").getValue();
142  if(type != null) {
143  Subtask subtask = new Subtask(issue, type);
144  showModalZulFile("Issue", "/issue/addInformation.zul",
145  Map.of("issue", nissue, "subtask", subtask), command);
146  }
147  }).emptyCancel().show();
148  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addToMenu()

void org.turro.dossier.zul.menu.DossierMenu.addToMenu ( ElephantMenuBar  bar)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 51 of file DossierMenu.java.

51  {
52  bar.addMenu("Dossiers", Permission.from("dossier:list", "issue:list"))
53  .addSubmenu()
54  .addMenuitem("My dossiers", "dossier", "/dossier/dossiers.zul", true, Permission.from("dossier:list"))
55  .addMenuitem("Knowledge base", "kbase", "/issue/knowledgeBase.zul", true)
56  .addMenuitem("My issues", "issue", "/issue/workload.zul", true, Permission.from("issue:list"))
57  .addMenuitem("Kanban", "/issue/kanban.zul", Permission.from("issue:list"))
58  .addMenuitem("Gantt", "gantt", "/dossier/gantt.zul", Permission.from("issue:list"))
59  .addMenuitem("Task view", "task", "/dossier/taskView.zul", Permission.from("issue:list"))
60  .addMenuitem("Graph", "graph", "/dossier/issueGraph.zul", Permission.from("issue:list"))
61  .addMenuitem("Pending votes", "ok", "/dossier/pendingVotes.zul", Permission.from("issue:list"))
62  .addMenuitem("Pending petitions", "/dossier/pendingPetitions.zul", Permission.from("dossier:all"))
63  .addMenuitem("Worksheets", "issue", "/issue/worksheet.zul", false, Permission.from("worksheet:list"))
64  .addMenuitem("Workload", "piechart", "/dossier/workload.zul")
65  .addMenuSeparator()
66  .addMenuitem("Categories", "/dossier/categories.zul", Permission.from("category:list"))
67  .addMenuitem("Project grants", "handshelp", "/dossier/projectGrants.zul", Permission.from("dossier:all"))
68  .addMenuitem("Field definitions", "/dossier/fielddefs.zul", Permission.from("dossier-field:list"))
69  .addMenuitem("Pending to register", (EventListener) (Event event) -> {
70  Framework frame = Framework.getCurrent();
71  frame.getDesktop().removeAttribute("dossierId");
72  frame.addContent(I_.get("Pending to register"), "/issue/registry.zul");
73  }, Permission.from("register:list"))
74  .addMenuSeparator()
75  .addMenuitem("New Dossier", "dossier_new", (EventListener) (Event event) -> {
76  DossierMenu.showDossier(0L);
77  }, Permission.from("dossier:new"))
78  .addMenuitem("New Issue", "issue_new", (EventListener) (Event event) -> {
79  addInformation(null, null);
80  }, true, Permission.from("issue:new"))
81  .addToolbarSeparator(true);
82  }
static void addInformation(Issue issue, final Command command)
Here is the call graph for this function:

◆ showCategory()

static void org.turro.dossier.zul.menu.DossierMenu.showCategory ( Long  id)
static

Definition at line 117 of file DossierMenu.java.

117  {
118  showEntityModal(id, "categoryId", "/dossier/categoryEdit.zul", null);
119  }
static void showEntityModal(Object id, String attribute, String include, Command command)
Here is the call graph for this function:

◆ showDossier() [1/2]

static void org.turro.dossier.zul.menu.DossierMenu.showDossier ( Dossier  dossier)
static

Definition at line 84 of file DossierMenu.java.

84  {
85  HashMap<String, Object> map = new HashMap<>();
86  map.put("dossierGenerated", dossier);
87  if(DossierType.TYPE_PROJECT.equals(dossier.getType())) {
88  showEntity(dossier.getId(), "dossierId", "Project", "/dossier/project.zul");
89  } else {
90  showEntity(dossier.getId(), "dossierId", "Dossier", "/dossier/dossier.zul", map);
91  }
92  }
static void showEntity(Object id, String attribute, String label, String include)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showDossier() [2/2]

static void org.turro.dossier.zul.menu.DossierMenu.showDossier ( Long  id)
static

Definition at line 94 of file DossierMenu.java.

94  {
95  DossierType type = checkType(id);
96  if(DossierType.TYPE_PROJECT.equals(type)) {
97  showEntity(id, "dossierId", "Project", "/dossier/project.zul");
98  } else {
99  showEntity(id, "dossierId", "Dossier", "/dossier/dossier.zul");
100  }
101  }
Here is the call graph for this function:

◆ showDossierActivity()

static void org.turro.dossier.zul.menu.DossierMenu.showDossierActivity ( Long  id)
static

Definition at line 103 of file DossierMenu.java.

103  {
104  showEntity(id, "dossierId", "Activity", "/dossier/activity.zul");
105  }
Here is the call graph for this function:

◆ showIssue()

static void org.turro.dossier.zul.menu.DossierMenu.showIssue ( Long  id)
static

Definition at line 113 of file DossierMenu.java.

113  {
114  showEntity(id, "issueId", "Issue", "/issue/issue.zul");
115  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showMyDossiers()

static void org.turro.dossier.zul.menu.DossierMenu.showMyDossiers ( )
static

Definition at line 125 of file DossierMenu.java.

125  {
126  showZulFile("My dossiers", "/dossier/dossiers.zul");
127  }
static void showZulFile(String label, String include)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showMyIssues()

static void org.turro.dossier.zul.menu.DossierMenu.showMyIssues ( )
static

Definition at line 129 of file DossierMenu.java.

129  {
130  showZulFile("My issues", "/issue/workload.zul");
131  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showPending()

static void org.turro.dossier.zul.menu.DossierMenu.showPending ( )
static

Definition at line 184 of file DossierMenu.java.

184  {
185  showZulFile("Pending petitions", "/dossier/pendingPetitions.zul");
186  }
Here is the call graph for this function:

◆ showProjectGrant()

static void org.turro.dossier.zul.menu.DossierMenu.showProjectGrant ( Long  id)
static

Definition at line 121 of file DossierMenu.java.

121  {
122  showEntity(id, "projectGrantId", "Project grant", "/dossier/projectGrant.zul", null);
123  }
Here is the call graph for this function:
Here is the caller graph for this function:

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