BrightSide Workbench Full Report + Source Code
org.turro.dossier.kanban.KanbanVM Class Reference

Public Member Functions

 KanbanVM ()
 
void showInfo (@BindingParam("item") WorkloadItem item)
 
void update ()
 
void selectEntity (@BindingParam("entity") Object entity)
 
void selectContact (@BindingParam("contact") IContact contact)
 
void showAttachments (@BindingParam("issue") Issue issue)
 
void addInformation (@BindingParam("issue") Issue issue)
 
void setSearchValue (String searchValue)
 
String getSearchValue ()
 
void setSelectedCategory (Category category)
 
Category getSelectedCategory ()
 
void setSelectedDossier (Dossier dossier)
 
Dossier getSelectedDossier ()
 
void setParticipant (IContact contact)
 
IContact getParticipant ()
 
Set< IssueStatusgetStatus ()
 
void setStatus (Set< IssueStatus > status)
 
Set< IssueTypegetTypes ()
 
void setTypes (Set< IssueType > types)
 
GroupsModel< WorkloadItem, Object, Object > getToDoModel ()
 
GroupsModel< WorkloadItem, Object, Object > getInProgressModel ()
 
GroupsModel< WorkloadItem, Object, Object > getDoneModel ()
 
String getToDoLabel ()
 
String getInProgressLabel ()
 
String getDoneLabel ()
 
GroupsModel< WorkloadItem, Object, Object > getColumnModel (int column)
 

Detailed Description

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

Definition at line 53 of file KanbanVM.java.

Constructor & Destructor Documentation

◆ KanbanVM()

org.turro.dossier.kanban.KanbanVM.KanbanVM ( )

Definition at line 58 of file KanbanVM.java.

58  {
59  query = new WorkloadQuery();
60  count = new long[4];
61  }

Member Function Documentation

◆ addInformation()

void org.turro.dossier.kanban.KanbanVM.addInformation ( @BindingParam("issue") Issue  issue)

Definition at line 115 of file KanbanVM.java.

115  {
116  DossierMenu.addInformation(issue, null);
117  }
Here is the call graph for this function:

◆ getColumnModel()

GroupsModel<WorkloadItem, Object, Object> org.turro.dossier.kanban.KanbanVM.getColumnModel ( int  column)

Definition at line 197 of file KanbanVM.java.

197  {
198  List<List<WorkloadItem>> data = new ArrayList<>();
199  List<String> headers = new ArrayList<>();
200  List<WorkloadItem> loading = null;
201 
202  IssueStage stage = null;
203  count[column] = 0;
204 
205  for(final WorkloadItem item : getModel()) {
206  if(WorkloadSet.getKanbanColumn(item) == column) {
207  IssueStage current = WorkloadSet.getStage(item);
208  if(!(current.equals(stage))) {
209  stage = current;
210  headers.add(stage.toString());
211  loading = new ArrayList<>();
212  data.add(loading);
213  }
214  if(loading != null) {
215  loading.add(item);
216  count[column]++;
217  }
218  }
219  }
220 
221  return new SimpleGroupsModel<>(data, headers);
222  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDoneLabel()

String org.turro.dossier.kanban.KanbanVM.getDoneLabel ( )

Definition at line 193 of file KanbanVM.java.

193  {
194  return I_.get("Done") + " (" + count[3] + ")";
195  }
Here is the call graph for this function:

◆ getDoneModel()

GroupsModel<WorkloadItem, Object, Object> org.turro.dossier.kanban.KanbanVM.getDoneModel ( )

Definition at line 181 of file KanbanVM.java.

181  {
182  return getColumnModel(3);
183  }
GroupsModel< WorkloadItem, Object, Object > getColumnModel(int column)
Definition: KanbanVM.java:197
Here is the call graph for this function:

◆ getInProgressLabel()

String org.turro.dossier.kanban.KanbanVM.getInProgressLabel ( )

Definition at line 189 of file KanbanVM.java.

189  {
190  return I_.get("In progress") + " (" + count[2] + ")";
191  }
Here is the call graph for this function:

◆ getInProgressModel()

GroupsModel<WorkloadItem, Object, Object> org.turro.dossier.kanban.KanbanVM.getInProgressModel ( )

Definition at line 177 of file KanbanVM.java.

177  {
178  return getColumnModel(2);
179  }
Here is the call graph for this function:

◆ getParticipant()

IContact org.turro.dossier.kanban.KanbanVM.getParticipant ( )

Definition at line 151 of file KanbanVM.java.

151  {
152  return query.getByParticipant();
153  }
Here is the call graph for this function:

◆ getSearchValue()

String org.turro.dossier.kanban.KanbanVM.getSearchValue ( )

Definition at line 124 of file KanbanVM.java.

124  {
125  return query.getSearchValue();
126  }
Here is the call graph for this function:

◆ getSelectedCategory()

Category org.turro.dossier.kanban.KanbanVM.getSelectedCategory ( )

Definition at line 133 of file KanbanVM.java.

133  {
134  return query.getCategory();
135  }
Here is the call graph for this function:

◆ getSelectedDossier()

Dossier org.turro.dossier.kanban.KanbanVM.getSelectedDossier ( )

Definition at line 142 of file KanbanVM.java.

142  {
143  return query.getDossier();
144  }
Here is the call graph for this function:

◆ getStatus()

Set<IssueStatus> org.turro.dossier.kanban.KanbanVM.getStatus ( )

Definition at line 155 of file KanbanVM.java.

155  {
156  return query.getStatus();
157  }
Here is the call graph for this function:

◆ getToDoLabel()

String org.turro.dossier.kanban.KanbanVM.getToDoLabel ( )

Definition at line 185 of file KanbanVM.java.

185  {
186  return I_.get("To do") + " (" + count[1] + ")";
187  }
Here is the call graph for this function:

◆ getToDoModel()

GroupsModel<WorkloadItem, Object, Object> org.turro.dossier.kanban.KanbanVM.getToDoModel ( )

Definition at line 173 of file KanbanVM.java.

173  {
174  return getColumnModel(1);
175  }
Here is the call graph for this function:

◆ getTypes()

Set<IssueType> org.turro.dossier.kanban.KanbanVM.getTypes ( )

Definition at line 164 of file KanbanVM.java.

164  {
165  return query.getTypes();
166  }
Here is the call graph for this function:

◆ selectContact()

void org.turro.dossier.kanban.KanbanVM.selectContact ( @BindingParam("contact") IContact  contact)

Definition at line 96 of file KanbanVM.java.

96  {
97  setParticipant(contact);
98  }
void setParticipant(IContact contact)
Definition: KanbanVM.java:146
Here is the call graph for this function:

◆ selectEntity()

void org.turro.dossier.kanban.KanbanVM.selectEntity ( @BindingParam("entity") Object  entity)

Definition at line 81 of file KanbanVM.java.

81  {
82  if(entity instanceof Category) {
83  setSelectedCategory((Category) entity);
84  setSelectedDossier(null);
85  } else if(entity instanceof Dossier) {
86  setSelectedDossier((Dossier) entity);
87  setSelectedCategory(null);
88  } else {
89  setSelectedCategory(null);
90  setSelectedDossier(null);
91  }
92  }
void setSelectedCategory(Category category)
Definition: KanbanVM.java:128
void setSelectedDossier(Dossier dossier)
Definition: KanbanVM.java:137
Here is the call graph for this function:

◆ setParticipant()

void org.turro.dossier.kanban.KanbanVM.setParticipant ( IContact  contact)

Definition at line 146 of file KanbanVM.java.

146  {
147  query.setByParticipant(contact);
148  _model = null;
149  }
void setByParticipant(IContact byParticipant)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSearchValue()

void org.turro.dossier.kanban.KanbanVM.setSearchValue ( String  searchValue)

Definition at line 119 of file KanbanVM.java.

119  {
120  query.setSearchValue(searchValue);
121  _model = null;
122  }
Here is the call graph for this function:

◆ setSelectedCategory()

void org.turro.dossier.kanban.KanbanVM.setSelectedCategory ( Category  category)

Definition at line 128 of file KanbanVM.java.

128  {
129  query.setCategory(category);
130  _model = null;
131  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSelectedDossier()

void org.turro.dossier.kanban.KanbanVM.setSelectedDossier ( Dossier  dossier)

Definition at line 137 of file KanbanVM.java.

137  {
138  query.setDossier(dossier);
139  _model = null;
140  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStatus()

void org.turro.dossier.kanban.KanbanVM.setStatus ( Set< IssueStatus status)

Definition at line 159 of file KanbanVM.java.

159  {
160  query.setStatus(status);
161  _model = null;
162  }
void setStatus(Set< IssueStatus > status)
Here is the call graph for this function:

◆ setTypes()

void org.turro.dossier.kanban.KanbanVM.setTypes ( Set< IssueType types)

Definition at line 168 of file KanbanVM.java.

168  {
169  query.setTypes(types);
170  _model = null;
171  }
void setTypes(Set< IssueType > types)
Here is the call graph for this function:

◆ showAttachments()

void org.turro.dossier.kanban.KanbanVM.showAttachments ( @BindingParam("issue") Issue  issue)

Definition at line 101 of file KanbanVM.java.

101  {
102  Application app = Application.getApplication();
103  IssueWrapper iw = new IssueWrapper(issue);
104  if(app.isInRole("issue:show") &&
105  (app.isInRole("issue:all") || iw.isFullParticipant())) {
106  IssueAttachTree iat = new IssueAttachTree();
107  iat.setEntity(issue);
108  iat.setChanges(new Changes());
109  SelectionDialog.showComponent(Framework.getCurrent().getPage(), I_.get("Attachments"),
110  iat, "80%", "80%", null);
111  }
112  }
Here is the call graph for this function:

◆ showInfo()

void org.turro.dossier.kanban.KanbanVM.showInfo ( @BindingParam("item") WorkloadItem  item)

Definition at line 64 of file KanbanVM.java.

64  {
65  Application app = Application.getApplication();
66  IssueWrapper iw = new IssueWrapper(item.getIssue());
67  if(app.isInRole("issue:show") &&
68  (app.isInRole("issue:all") || iw.isFullParticipant())) {
69  DossiersInfo.popup(item.getIssue());
70  }
71  }
Here is the call graph for this function:

◆ update()

void org.turro.dossier.kanban.KanbanVM.update ( )

Definition at line 75 of file KanbanVM.java.

75  {
76  _model = null;
77  }

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